Skip to content

Commit b07c483

Browse files
committed
MC-38488: [MFTF] AdminMediaGalleryAssertUsedInLinkBlocksGridTest failed because of bad design
1 parent 32ed03c commit b07c483

File tree

3 files changed

+93
-3
lines changed

3 files changed

+93
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminMediaGalleryAssertImageUsedInLinkBlocksGridTest">
11+
<annotations>
12+
<features value="AdminMediaGalleryUsedInBlocksFilter"/>
13+
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1168"/>
14+
<title value="Used in blocks link"/>
15+
<stories value="Story 58: User sees entities where asset is used in" />
16+
<testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/1320712/scenarios/4951848"/>
17+
<description value="User filters assets used in blocks"/>
18+
<severity value="CRITICAL"/>
19+
<group value="media_gallery_ui"/>
20+
</annotations>
21+
<before>
22+
<createData entity="_defaultBlock" stepKey="block" />
23+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
24+
</before>
25+
<after>
26+
<actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/>
27+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
28+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterTest">
29+
<argument name="tags" value="block_html"/>
30+
</actionGroup>
31+
</after>
32+
33+
<actionGroup ref="NavigateToCreatedCMSBlockPageActionGroup" stepKey="navigateToCreatedCMSBlockPage">
34+
<argument name="CMSBlockPage" value="$$block$$"/>
35+
</actionGroup>
36+
<click selector="{{CmsWYSIWYGSection.InsertImageBtn}}" stepKey="clickInsertImageIcon" />
37+
<waitForPageLoad stepKey="waitForInitialPageLoad" />
38+
<waitForPageLoad stepKey="waitForSecondaryPageLoad" />
39+
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/>
40+
<actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/>
41+
<actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder">
42+
<argument name="name" value="blockImage"/>
43+
</actionGroup>
44+
<actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertNewFolderCreated">
45+
<argument name="name" value="blockImage"/>
46+
</actionGroup>
47+
<waitForPageLoad stepKey="waitForGridToLoadAfterNewFolderCreated"/>
48+
<actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage">
49+
<argument name="image" value="ImageUpload3"/>
50+
</actionGroup>
51+
<actionGroup ref="AdminMediaGalleryClickImageInGridActionGroup" stepKey="selectContentImageInGrid">
52+
<argument name="imageName" value="{{ImageMetadata.title}}"/>
53+
</actionGroup>
54+
<actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="clickAddSelectedContentImage"/>
55+
<click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="saveBlock"/>
56+
57+
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/>
58+
<actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/>
59+
<actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolder">
60+
<argument name="name" value="blockImage"/>
61+
</actionGroup>
62+
<actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetails"/>
63+
<actionGroup ref="AdminEnhancedMediaGalleryClickEntityUsedInActionGroup" stepKey="clickUsedInBlocks">
64+
<argument name="entityName" value="Blocks"/>
65+
</actionGroup>
66+
<wait time="5" stepKey="waitForAssertLoads"/>
67+
<reloadPage stepKey="reloadBlocksGridPage"/>
68+
<waitForPageLoad stepKey="waitForBlocksGridPageLoad"/>
69+
<actionGroup ref="AdminAssertMediaGalleryFilterPlaceHolderGridActionGroup" stepKey="assertFilterApplied">
70+
<argument name="filterPlaceholder" value="{{ImageMetadata.title}}"/>
71+
</actionGroup>
72+
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilterInBlocksGrid"/>
73+
74+
<deleteData createDataKey="block" stepKey="deleteBlock"/>
75+
76+
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/>
77+
<actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultViewAgain"/>
78+
<actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCreatedFolderAgain">
79+
<argument name="name" value="blockImage"/>
80+
</actionGroup>
81+
<actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetailsToVerifyEmptyUsedIn"/>
82+
<actionGroup ref="AssertAdminEnhancedMediaGalleryUsedInSectionNotDisplayedActionGroup" stepKey="assertThereIsNoUsedInSection"/>
83+
<actionGroup ref="AdminEnhancedMediaGalleryCloseViewDetailsActionGroup" stepKey="closeImageDetails"/>
84+
85+
<actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/>
86+
<actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertFolderWasDeleted">
87+
<argument name="name" value="blockImage"/>
88+
</actionGroup>
89+
</test>
90+
</tests>

app/code/Magento/MediaGalleryCmsUi/Test/Mftf/Test/AdminMediaGalleryAssertUsedInLinkBlocksGridTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
-->
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10-
<test name="AdminMediaGalleryAssertUsedInLinkBlocksGridTest">
10+
<test name="AdminMediaGalleryAssertUsedInLinkBlocksGridTest" deprecated="Use AdminMediaGalleryAssertImageUsedInLinkBlocksGridTest instead">
1111
<annotations>
1212
<features value="AdminMediaGalleryUsedInBlocksFilter"/>
1313
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1168"/>
14-
<title value="Used in blocks link"/>
14+
<title value="Deprecated. Used in blocks link"/>
1515
<stories value="Story 58: User sees entities where asset is used in" />
1616
<testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/1320712/scenarios/4951848"/>
1717
<description value="User filters assets used in blocks"/>

app/code/Magento/MediaGalleryUi/Test/Mftf/Section/AdminEnhancedMediaGalleryImageActionsSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<section name="AdminEnhancedMediaGalleryImageActionsSection">
1111
<element name="openContextMenu" type="button" selector=".three-dots"/>
1212
<element name="contextMenuItem" type="block" selector="//div[@class='media-gallery-image']//ul[@class='action-menu _active']//li//a[@class='action-menu-item']"/>
13-
<element name="viewDetails" type="button" selector="[data-ui-id='action-image-details']"/>
13+
<element name="viewDetails" type="button" selector="//ul[@class='action-menu _active']//a[@class='action-menu-item' and contains(text(), 'View Details')]"/>
1414
<element name="delete" type="button" selector="[data-ui-id='action-delete']"/>
1515
<element name="edit" type="button" selector="[data-ui-id='action-edit']"/>
1616
<element name="imageInGrid" type="button" selector="//li[@data-ui-id='title'and text()='{{imageTitle}}']/parent::*/parent::*/parent::div//img[@class='media-gallery-image-column']" parameterized="true"/>

0 commit comments

Comments
 (0)