Skip to content

Commit b477134

Browse files
committed
MC-38651: [MFTF] AdminMediaGalleryAssertUsedInLinkPagesGridTest failed because of bad design
1 parent 8653503 commit b477134

21 files changed

+273
-20
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminCmsPageFillOutBasicFieldsActionGroup">
12+
<annotations>
13+
<description>Fills out the Page details (Page Title, Content and URL Key) on the Admin Page creation/edit page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="title" type="string" defaultValue="{{_defaultCmsPage.title}}"/>
17+
<argument name="contentHeading" type="string" defaultValue="{{_defaultCmsPage.content_heading}}"/>
18+
<argument name="content" type="string" defaultValue="{{_defaultCmsPage.content}}"/>
19+
<argument name="urlKey" type="string" defaultValue="{{_defaultCmsPage.identifier}}"/>
20+
</arguments>
21+
22+
<fillField selector="{{CmsNewPagePageBasicFieldsSection.pageTitle}}" userInput="{{title}}" stepKey="fillTitle"/>
23+
<conditionalClick selector="{{CmsNewPagePageContentSection.header}}" dependentSelector="{{CmsNewPagePageContentSection.contentHeading}}" visible="false" stepKey="expandContentTabIfCollapsed"/>
24+
<fillField selector="{{CmsNewPagePageContentSection.contentHeading}}" userInput="{{contentHeading}}" stepKey="fillContentHeading"/>
25+
<scrollTo selector="{{CmsNewPagePageContentSection.content}}" stepKey="scrollToPageContent"/>
26+
<fillField selector="{{CmsNewPagePageContentSection.content}}" userInput="{{content}}" stepKey="fillContent"/>
27+
<conditionalClick selector="{{CmsNewPagePageSeoSection.header}}" dependentSelector="{{CmsNewPagePageSeoSection.urlKey}}" visible="false" stepKey="clickExpandSearchEngineOptimisationIfCollapsed"/>
28+
<fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{urlKey}}" stepKey="fillUrlKey"/>
29+
</actionGroup>
30+
</actionGroups>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminSaveAndContinueEditCmsPageActionGroup">
12+
<annotations>
13+
<description>Clicks on the Save and Continue button and see success message.</description>
14+
</annotations>
15+
16+
<scrollToTopOfPage stepKey="scrollToTopOfThePage"/>
17+
<waitForElementVisible selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="waitForSaveAndContinueButton"/>
18+
<click selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="clickSaveAndContinueButton"/>
19+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
20+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the page." stepKey="seeSuccessMessage"/>
21+
</actionGroup>
22+
</actionGroups>

app/code/Magento/Cms/Test/Mftf/ActionGroup/SaveAndContinueEditCmsPageActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="SaveAndContinueEditCmsPageActionGroup">
1212
<annotations>
13-
<description>Clicks on the Save and Continue button.</description>
13+
<description>DEPRECATED. Use AdminSaveAndContinueEditCmsPageActionGroup instead. Clicks on the Save and Continue button.</description>
1414
</annotations>
1515

1616
<waitForElementVisible time="10" selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="waitForSaveAndContinueVisibility"/>

app/code/Magento/MediaGalleryCmsUi/Test/Mftf/ActionGroup/FillOutCustomCMSPageContentActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="FillOutCustomCMSPageContentActionGroup">
1212
<annotations>
13-
<description>Fills out the Page details (Page Title, Content and URL Key)</description>
13+
<description>DEPRECATED. Use AdminCmsPageFillOutBasicFieldsActionGroup and other AGs from CMS module. Fills out the Page details (Page Title, Content and URL Key)</description>
1414
</annotations>
1515

1616
<arguments>

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,19 @@
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="AdminMediaGalleryAssertUsedInLinkPagesGridTest">
10+
<test name="AdminMediaGalleryAssertUsedInLinkPagesGridTest" deprecated="Use AdminMediaGalleryAssertUsedInLinkedPagesGridTest instead">
1111
<annotations>
1212
<features value="AdminMediaGalleryUsedInBlocksFilter"/>
1313
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1168"/>
14-
<title value="Used in pages link"/>
14+
<title value="DEPRECATED. Used in pages 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 pages"/>
1818
<severity value="CRITICAL"/>
1919
<group value="media_gallery_ui"/>
20+
<skip>
21+
<issueId value="DEPRECATED">Use AdminMediaGalleryAssertUsedInLinkedPagesGridTest instead</issueId>
22+
</skip>
2023
</annotations>
2124
<before>
2225
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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="AdminMediaGalleryAssertUsedInLinkedPagesGridTest">
11+
<annotations>
12+
<features value="MediaGalleryCmsUi"/>
13+
<stories value="Story 58: User sees entities where asset is used in" />
14+
<title value="Used in pages link"/>
15+
<description value="User filters assets used in pages"/>
16+
<severity value="CRITICAL"/>
17+
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1168"/>
18+
<testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/1320712/scenarios/4951848"/>
19+
<group value="media_gallery_ui"/>
20+
</annotations>
21+
22+
<before>
23+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
24+
<actionGroup ref="AdminEnhancedMediaGalleryDeletedAllImagesActionGroup" stepKey="deleteAllMediaGalleryImages"/>
25+
</before>
26+
27+
<after>
28+
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/>
29+
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="resetMediaGalleryGridFilters"/>
30+
<actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolder"/>
31+
<actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/>
32+
<actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertFolderWasDeleted"/>
33+
<actionGroup ref="AdminEnhancedMediaGalleryDeletedAllImagesActionGroup" stepKey="deleteAllMediaGalleryImages"/>
34+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
35+
</after>
36+
37+
<actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="navigateToCreateNewPage"/>
38+
<actionGroup ref="AdminCmsPageFillOutBasicFieldsActionGroup" stepKey="fillBasicPageFields"/>
39+
<actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/>
40+
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="resetMediaGalleryGridFilters"/>
41+
<actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/>
42+
<actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"/>
43+
<actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertNewFolderCreated"/>
44+
<actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage">
45+
<argument name="image" value="ImageUpload3"/>
46+
</actionGroup>
47+
<actionGroup ref="AdminMediaGalleryClickImageInGridActionGroup" stepKey="selectContentImageInGrid">
48+
<argument name="imageName" value="{{ImageMetadata.title}}"/>
49+
</actionGroup>
50+
<actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="clickAddSelectedContentImage"/>
51+
<actionGroup ref="AdminSaveAndContinueEditCmsPageActionGroup" stepKey="saveCmsPageAndContinue"/>
52+
53+
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/>
54+
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="resetMediaGalleryGridFiltersAgain"/>
55+
<actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolder"/>
56+
<actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetails"/>
57+
<actionGroup ref="AdminEnhancedMediaGalleryClickEntityUsedInActionGroup" stepKey="clickUsedInPages">
58+
<argument name="entityName" value="Pages"/>
59+
</actionGroup>
60+
<actionGroup ref="AdminAssertMediaGalleryFilterPlaceHolderGridActionGroup" stepKey="assertFilterApplied">
61+
<argument name="filterPlaceholder" value="{{ImageMetadata.title}}"/>
62+
</actionGroup>
63+
<actionGroup ref="AdminDeleteCmsPageFromGridActionGroup" stepKey="deleteCmsPage">
64+
<argument name="urlKey" value="{{_defaultCmsPage.identifier}}"/>
65+
</actionGroup>
66+
67+
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFiltersInPageGrid"/>
68+
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/>
69+
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="resetMediaGalleryGridFiltersAndAgain"/>
70+
<actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolderAgain"/>
71+
<actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetailsToVerifyEmptyUsedIn"/>
72+
<actionGroup ref="AssertAdminEnhancedMediaGalleryUsedInSectionNotDisplayedActionGroup" stepKey="assertThereIsNoUsedInSection"/>
73+
<actionGroup ref="AdminEnhancedMediaGalleryCloseViewDetailsActionGroup" stepKey="closeDetails"/>
74+
</test>
75+
</tests>

app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminEnhancedMediaGalleryCloseViewDetailsActionGroup.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="AdminEnhancedMediaGalleryCloseViewDetailsActionGroup">
1212
<annotations>
13-
<description>Closes View Details panel</description>
13+
<description>Closes View Details panel of Media Gallery image.</description>
1414
</annotations>
1515

1616
<click selector="{{AdminEnhancedMediaGalleryViewDetailsSection.cancel}}" stepKey="clickCancel"/>
17-
<wait time="1" stepKey="waitForElementRender"/>
17+
<waitForElementNotVisible selector="{{AdminEnhancedMediaGalleryViewDetailsSection.modalTitle}}" stepKey="waitForElementRender"/>
1818
</actionGroup>
1919
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<actionGroups xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
8+
<actionGroup name="AdminEnhancedMediaGalleryDeletedAllImagesActionGroup">
9+
<annotations>
10+
<description>Open Media Gallery page and delete all images</description>
11+
</annotations>
12+
<amOnPage url="{{AdminStandaloneMediaGalleryPage.url}}" stepKey="openMediaGalleryPage"/>
13+
<!-- It sometimes is loading too long for default 10s -->
14+
<waitForPageLoad time="60" stepKey="waitForPageFullyLoaded"/>
15+
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearExistingFilters"/>
16+
<helper class="\Magento\MediaGalleryUi\Test\Mftf\Helper\MediaGalleryUiHelper" method="deleteAllImagesUsingMassAction" stepKey="deleteAllImagesUsingMassAction">
17+
<argument name="emptyRow">{{AdminMediaGalleryGridSection.noDataMessage}}</argument>
18+
<argument name="deleteImagesButton">{{AdminEnhancedMediaGalleryMassActionSection.deleteImages}}</argument>
19+
<argument name="checkImage">{{AdminEnhancedMediaGalleryMassActionSection.massActionCheckboxAll}}</argument>
20+
<argument name="deleteSelectedButton">{{AdminEnhancedMediaGalleryMassActionSection.deleteSelected}}</argument>
21+
<argument name="modalAcceptButton">{{AdminEnhancedMediaGalleryDeleteModalSection.confirmDelete}}</argument>
22+
<argument name="successMessageContainer">{{AdminMediaGalleryMessagesSection.success}}</argument>
23+
<argument name="successMessage">been successfully deleted</argument>
24+
</helper>
25+
</actionGroup>
26+
</actionGroups>

app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminEnhancedMediaGalleryUploadImageActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<argument name="image"/>
1818
</arguments>
1919

20+
<waitForPageLoad stepKey="waitForPageFullyLoaded"/>
2021
<attachFile selector="{{AdminEnhancedMediaGalleryActionsSection.upload}}" userInput="{{image.value}}" stepKey="uploadImage"/>
2122
<waitForPageLoad stepKey="waitForPageLoad"/>
2223
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>

app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminEnhancedMediaGalleryViewImageDetailsActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515

1616
<click selector="{{AdminEnhancedMediaGalleryImageActionsSection.openContextMenu}}" stepKey="openContextMenu"/>
1717
<click selector="{{AdminEnhancedMediaGalleryImageActionsSection.viewDetails}}" stepKey="viewDetails"/>
18-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
18+
<waitForElementVisible selector="{{AdminEnhancedMediaGalleryViewDetailsSection.modalTitle}}" stepKey="waitForLoadingMaskToDisappear"/>
1919
</actionGroup>
2020
</actionGroups>

0 commit comments

Comments
 (0)