Skip to content

Commit 76d6278

Browse files
authored
Merge pull request #36 from engcom-Foxtrot/MC-39756
MC-39756: An image added to the Content via Page Builder is not counted in "Used In" counter.
2 parents 199a328 + 00680be commit 76d6278

File tree

3 files changed

+128
-0
lines changed

3 files changed

+128
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminOpenSelectImageFromGalleryActionGroup">
11+
<annotations>
12+
<description>Open selected Image from Gallery.</description>
13+
</annotations>
14+
15+
<waitForElementVisible selector="{{ImageOnStageWithoutImageUploaded.selectFromGalleryBtn}}" stepKey="seeSelectFromGalleryBtn"/>
16+
<click selector="{{ImageOnStageWithoutImageUploaded.selectFromGalleryBtn}}" stepKey="clickSelectFromGalleryBtn"/>
17+
<waitForElementVisible selector="{{AdminEnhancedMediaGalleryMassActionSection.deleteImages}}" stepKey="waitForAnimation"/>
18+
</actionGroup>
19+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
9+
<suite name="PageBuilderNewMediaGalleryRenditionsSuite">
10+
<before>
11+
<actionGroup ref="AdminEnableWYSIWYGActionGroup" stepKey="disableWYSIWYG" />
12+
<magentoCLI command="config:set {{MediaGalleryConfigDataEnabled.path}} {{MediaGalleryConfigDataEnabled.value}}" stepKey="enableEnhancedMediaGallery"/>
13+
<magentoCLI command="config:set {{MediaGalleryRenditionsDataEnabled.path}} {{MediaGalleryRenditionsDataEnabled.value}}" stepKey="enableMediaGalleryRenditions"/>
14+
</before>
15+
<after>
16+
<magentoCLI command="config:set {{MediaGalleryRenditionsDataDisabled.path}} {{MediaGalleryRenditionsDataDisabled.value}}" stepKey="disableMediaGalleryRenditions"/>
17+
<magentoCLI command="config:set {{MediaGalleryConfigDataDisabled.path}} {{MediaGalleryConfigDataDisabled.value}}" stepKey="disableEnhancedMediaGallery"/>
18+
<actionGroup ref="AdminEnableWYSIWYGActionGroup" stepKey="enableWYSIWYG" />
19+
</after>
20+
<include>
21+
<group name="page_builder_new_media_gallery_renditions"/>
22+
</include>
23+
</suite>
24+
</suites>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="PageBuilderCMSPageCreatePageWithImageTest">
11+
<annotations>
12+
<features value="PageBuilder"/>
13+
<stories value="CMS Page"/>
14+
<title value="Create CMS Page with Image"/>
15+
<description value="Create CMS Page with Image and verify Page is counted in Image 'used in' section"/>
16+
<severity value="MAJOR"/>
17+
<group value="page_builder_new_media_gallery_renditions"/>
18+
</annotations>
19+
<before>
20+
<createData entity="_defaultCmsPage" stepKey="createCMSPage"/>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
22+
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGalleryBefore"/>
23+
<actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridBefore"/>
24+
<actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/>
25+
<actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder">
26+
<argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/>
27+
</actionGroup>
28+
<actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage">
29+
<argument name="image" value="ImageUpload3"/>
30+
</actionGroup>
31+
</before>
32+
<after>
33+
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGalleryAfter"/>
34+
<actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultViewAfter"/>
35+
<actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolderAfter">
36+
<argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/>
37+
</actionGroup>
38+
<actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage"/>
39+
<actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/>
40+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
41+
<deleteData createDataKey="createCMSPage" stepKey="deleteCmsPage"/>
42+
</after>
43+
44+
<!-- Open CMS Page on admin-->
45+
<actionGroup ref="AdminOpenCmsPageActionGroup" stepKey="openEditPage">
46+
<argument name="page_id" value="$$createCMSPage.id$$"/>
47+
</actionGroup>
48+
49+
<!-- Add the Image to CMS Page -->
50+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
51+
<actionGroup ref="dragContentTypeToStage" stepKey="dragRowToRootContainer">
52+
<argument name="contentType" value="PageBuilderRowContentType"/>
53+
<argument name="containerTargetType" value="PageBuilderRootContainerContentType"/>
54+
</actionGroup>
55+
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSection">
56+
<argument name="contentType" value="PageBuilderImageContentType"/>
57+
</actionGroup>
58+
<actionGroup ref="dragContentTypeToStage" stepKey="dragImageIntoStage">
59+
<argument name="contentType" value="PageBuilderImageContentType"/>
60+
</actionGroup>
61+
<actionGroup ref="AdminOpenSelectImageFromGalleryActionGroup" stepKey="openMediaGallery"/>
62+
<actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGrid"/>
63+
<actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectMediaGalleryFolder">
64+
<argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/>
65+
</actionGroup>
66+
<actionGroup ref="AdminMediaGalleryClickImageInGridActionGroup" stepKey="selectFirstImage">
67+
<argument name="imageName" value="{{ImageMetadata.title}}"/>
68+
</actionGroup>
69+
<actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="clickAddSelectedCategoryImage"/>
70+
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen"/>
71+
72+
<!-- Save CMS Page -->
73+
<actionGroup ref="AdminSaveAndContinueEditCmsPageActionGroup" stepKey="saveCmsPageAndContinue"/>
74+
75+
<!-- Check if Image have "used in" data section -->
76+
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/>
77+
<actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/>
78+
<actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectMediaGalleryFolderToCheck">
79+
<argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/>
80+
</actionGroup>
81+
<actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetails"/>
82+
<actionGroup ref="AssertAdminEnhancedMediaGalleryUsedInSectionDisplayedActionGroup"
83+
stepKey="assertUsedInSectionDisplayed"/>
84+
</test>
85+
</tests>

0 commit comments

Comments
 (0)