-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1094 : [MFTF] User deletes images using Delete button #1384
Changes from 5 commits
87a8600
d13511a
84cdd20
b87f750
9f990f1
82c22c7
ef12835
c71147e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminAssertMediaGalleryAssetDeletedActionGroup"> | ||
<annotations> | ||
<description>Verify image has been deleted from the Enhanced media gallery.</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="imageName" type="string" defaultValue=""/> | ||
</arguments> | ||
|
||
<see userInput='You have successfully removed the image "{{imageName}}"' stepKey="verifyDeleteImage"/> | ||
</actionGroup> | ||
</actionGroups> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminMediaGalleryImageDeleteActionGroup"> | ||
<annotations> | ||
<description>Delete image from the Enhanced Media Gallery using header delete button</description> | ||
</annotations> | ||
<waitForElementVisible selector="{{AdminMediaGalleryHeaderButtonsSection.deleteSelected}}" stepKey="waitForDeleteSelectedButton"/> | ||
<click selector="{{AdminMediaGalleryHeaderButtonsSection.deleteSelected}}" stepKey="ClickDeleteSelectedButton"/> | ||
<waitForLoadingMaskToDisappear stepKey="waitForDeleteModal"/> | ||
<click selector="{{AdminEnhancedMediaGalleryDeleteModalSection.confirmDelete}}" stepKey="confirmDelete"/> | ||
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/> | ||
</actionGroup> | ||
</actionGroups> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminMediaGalleryDeleteImageFileTest"> | ||
<annotations> | ||
<features value="MediaGallery"/> | ||
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1094"/> | ||
<title value="Deleting new image file functionality in Enhanced Media Gallery"/> | ||
<stories value="Deleting new image file functionality in Enhanced Media Gallery"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add the |
||
<testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/1054245/scenarios/4756652"/> | ||
<description value="Deleting new image file functionality in Enhanced Media Gallery"/> | ||
<severity value="CRITICAL"/> | ||
<group value="media_gallery_ui"/> | ||
</annotations> | ||
<before> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||
<actionGroup ref="AdminOpenMediaGalleryForPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> | ||
</before> | ||
<after> | ||
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the logout is not required as every test is executed in an isolated session |
||
</after> | ||
|
||
<actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> | ||
<argument name="image" value="ImageUpload"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminMediaGalleryClickImageInGridActionGroup" stepKey="selectImageInGrid"> | ||
<argument name="imageName" value="{{ImageUpload.file}}"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminMediaGalleryImageDeleteActionGroup" stepKey="deleteImage"/> | ||
<actionGroup ref="AdminAssertMediaGalleryAssetDeletedActionGroup" stepKey="verifyImageIsDeleted"> | ||
<argument name="imageName" value="{{ImageUpload.filename}}"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add this verification to existing
AssertEnhancedMediaGalleryImageDeletedActionGroup
(it would be good to rename that actionGroup toAssertAdminEnhancedMediaGalleryImageDeletedActionGroup
)