Skip to content

Commit a7a6e33

Browse files
committed
#436: Cannot Drag and Drop Image to Upload Area in Banner, Slide in Safari, IE11 - Added extends to action groups
1 parent 7e59fb7 commit a7a6e33

File tree

4 files changed

+20
-38
lines changed

4 files changed

+20
-38
lines changed

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/ContentTypeBannerActionGroup/AddInvalidBannerBackgroundToStageActionGroup.xml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,5 @@
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10-
<actionGroup name="addInvalidBannerBackgroundToStage">
11-
<arguments>
12-
<argument name="property"/>
13-
<argument name="section" defaultValue="BannerOnBackend"/>
14-
</arguments>
15-
<comment userInput="Attach invalid Banner background to PageBuilder stage" stepKey="commentAttach"/>
16-
<moveMouseOver selector="{{section.emptyBanner('1')}}" stepKey="hoverBanner"/>
17-
<attachFile userInput="{{property.value}}" selector="{{section.uploadImageInput}}" stepKey="attachSectionBackgroundFileOnStage"/>
18-
<waitForPageLoad stepKey="waitForPageLoad"/>
19-
<waitForElementVisible selector="{{section.invalidUploadTitle}}" stepKey="waitForInvalidUploadTitle"/>
20-
<waitForElementVisible selector="{{section.invalidUploadMessage(property.errorMessage)}}" stepKey="waitForInvalidUploadMessage"/>
21-
<waitForElementVisible selector="{{section.invalidUploadOkBtn}}" stepKey="waitForInvalidUploadBtn"/>
22-
<click selector="{{section.invalidUploadOkBtn}}" stepKey="clickInvalidUploadBtn"/>
23-
<waitForElementNotVisible selector="{{ImageOnStageWithoutImageUploaded.invalidUploadTitle}}" stepKey="waitForModalGone"/>
24-
<dontSeeElementInDOM selector="{{section.imageOnStage('1', property.fileName)}}" stepKey="waitForImagePreview"/>
25-
<dontSeeElementInDOM selector="{{section.imageSourceByIndex('1', property.fileName)}}" stepKey="waitForImageSource"/>
26-
</actionGroup>
10+
<actionGroup name="addInvalidBannerBackgroundToStage" extends="addInvalidImageToStage" />
2711
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/ContentTypeImageActionGroup/AddInvalidImageToStageActionGroup.xml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,21 @@
1111
<arguments>
1212
<argument name="property"/>
1313
<argument name="section" defaultValue="ImageOnStageWithoutImageUploaded"/>
14+
<argument name="sectionArea" defaultValue="ImageOnStageWithoutImageUploaded.base('1')" />
15+
<argument name="attachInput" defaultValue="ImageOnStageWithoutImageUploaded.attachImageBtn" />
16+
<argument name="imagePreview" defaultValue="ImageOnStageWithoutImageUploaded.imagePreview"/>
17+
<argument name="imageSource" defaultValue=""/>
1418
</arguments>
15-
<comment userInput="Attach invalid image A to PageBuilder stage" stepKey="commentAttach"/>
16-
<attachFile userInput="{{property.value}}" selector="{{section.attachImageBtn}}" stepKey="attachImageFileOnStage"/>
19+
<comment userInput="Attach invalid image or background to PageBuilder" stepKey="commentAttach"/>
20+
<moveMouseOver selector="{{sectionArea}}" stepKey="hoverSectionArea"/>
21+
<attachFile userInput="{{property.value}}" selector="{{attachInput}}" stepKey="attachFile"/>
1722
<waitForPageLoad stepKey="waitForPageLoad"/>
1823
<waitForElementVisible selector="{{section.invalidUploadTitle}}" stepKey="waitForInvalidUploadTitle"/>
1924
<waitForElementVisible selector="{{section.invalidUploadMessage(property.errorMessage)}}" stepKey="waitForInvalidUploadMessage"/>
2025
<waitForElementVisible selector="{{section.invalidUploadOkBtn}}" stepKey="waitForInvalidUploadBtn"/>
2126
<click selector="{{section.invalidUploadOkBtn}}" stepKey="clickInvalidUploadBtn"/>
2227
<waitForElementNotVisible selector="{{section.invalidUploadTitle}}" stepKey="waitForModalGone"/>
23-
<dontSeeElementInDOM selector="{{section.imagePreview}}" stepKey="waitForImagePreview"/>
24-
<dontSeeElementInDOM selector="{{section.imageSource(property.fileName)}}" stepKey="waitForImageSource"/>
28+
<dontSeeElementInDOM selector="{{imagePreview}}" stepKey="waitForImagePreview"/>
29+
<dontSeeElementInDOM selector="{{imageSource}}" stepKey="waitForImageSource"/>
2530
</actionGroup>
2631
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/ContentTypeSliderActionGroup/AddInvalidSliderBackgroundToStageActionGroup.xml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,5 @@
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10-
<actionGroup name="addInvalidSliderBackgroundToStage">
11-
<arguments>
12-
<argument name="property"/>
13-
<argument name="section" defaultValue="SlideOnBackend"/>
14-
</arguments>
15-
<comment userInput="Attach invalid slide background to PageBuilder stage" stepKey="commentAttach"/>
16-
<moveMouseOver selector="{{section.emptySlide('1')}}" stepKey="hoverSection"/>
17-
<attachFile userInput="{{property.value}}" selector="{{section.uploadImageInput}}" stepKey="attachSectionBackgroundFileOnStage"/>
18-
<waitForPageLoad stepKey="waitForPageLoad"/>
19-
<waitForElementVisible selector="{{section.invalidUploadTitle}}" stepKey="waitForInvalidUploadTitle"/>
20-
<waitForElementVisible selector="{{section.invalidUploadMessage(property.errorMessage)}}" stepKey="waitForInvalidUploadMessage"/>
21-
<waitForElementVisible selector="{{section.invalidUploadOkBtn}}" stepKey="waitForInvalidUploadBtn"/>
22-
<click selector="{{section.invalidUploadOkBtn}}" stepKey="clickInvalidUploadBtn"/>
23-
<waitForElementNotVisible selector="{{section.invalidUploadTitle}}" stepKey="waitForModalGone"/>
24-
<dontSeeElementInDOM selector="{{section.backgroundImage('1', property.fileName)}}" stepKey="waitForImagePreview"/>
25-
<dontSeeElementInDOM selector="{{section.imageSourceByIndex('1', property.fileName)}}" stepKey="waitForImageSource"/>
26-
</actionGroup>
10+
<actionGroup name="addInvalidSliderBackgroundToStage" extends="addInvalidImageToStage"/>
2711
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderImageTest/ImageInvalidTypeValidationTest.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
</actionGroup>
3939
<actionGroup ref="addInvalidImageToStage" stepKey="addInvalidImageToStage">
4040
<argument name="property" value="PageBuilderImage_InvalidFileType"/>
41+
<argument name="imageSource" value="ImageOnStageWithoutImageUploaded.imageSource(PageBuilderImage_InvalidFileType.fileName)"/>
4142
</actionGroup>
4243
<!-- Add Banner Background Image to Stage -->
4344
<comment userInput="Add Banner Background Image to Stage" stepKey="commentAddBannerToStage"/>
@@ -46,6 +47,10 @@
4647
</actionGroup>
4748
<actionGroup ref="addInvalidBannerBackgroundToStage" stepKey="addInvalidBannerBackgroundToStage">
4849
<argument name="property" value="PageBuilderImage_InvalidFileType"/>
50+
<argument name="section" value="BannerOnBackend"/>
51+
<argument name="attachInput" value="BannerOnBackend.uploadImageInput" />
52+
<argument name="imagePreview" value="BannerOnBackend.backgroundImage('1', PageBuilderImage_InvalidFileType.fileName)"/>
53+
<argument name="imageSource" value="BannerOnBackend.imageSourceByIndex('1', PageBuilderImage_InvalidFileType.fileName)"/>
4954
</actionGroup>
5055
<!-- Add Slide Background Image to Stage -->
5156
<comment userInput="Add Slide Background Image to Stage" stepKey="commentAddSliderToStage"/>
@@ -54,6 +59,10 @@
5459
</actionGroup>
5560
<actionGroup ref="addInvalidSliderBackgroundToStage" stepKey="addInvalidSliderBackgroundToStage">
5661
<argument name="property" value="PageBuilderImage_InvalidFileType"/>
62+
<argument name="section" value="SlideOnBackend"/>
63+
<argument name="attachInput" value="SlideOnBackend.uploadImageInput" />
64+
<argument name="imagePreview" value="SlideOnBackend.backgroundImage('1', PageBuilderImage_InvalidFileType.fileName)"/>
65+
<argument name="imageSource" value="SlideOnBackend.imageSourceByIndex('1', PageBuilderImage_InvalidFileType.fileName)"/>
5766
</actionGroup>
5867
</test>
5968
</tests>

0 commit comments

Comments
 (0)