File tree Expand file tree Collapse file tree 4 files changed +20
-38
lines changed
app/code/Magento/PageBuilder/Test/Mftf
ContentTypeBannerActionGroup
ContentTypeImageActionGroup
ContentTypeSliderActionGroup
Test/AdminPageBuilderImageTest Expand file tree Collapse file tree 4 files changed +20
-38
lines changed Original file line number Diff line number Diff line change 7
7
-->
8
8
<actionGroups xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
9
9
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" />
27
11
</actionGroups >
Original file line number Diff line number Diff line change 11
11
<arguments >
12
12
<argument name =" property" />
13
13
<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 =" " />
14
18
</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" />
17
22
<waitForPageLoad stepKey =" waitForPageLoad" />
18
23
<waitForElementVisible selector =" {{section.invalidUploadTitle}}" stepKey =" waitForInvalidUploadTitle" />
19
24
<waitForElementVisible selector =" {{section.invalidUploadMessage(property.errorMessage)}}" stepKey =" waitForInvalidUploadMessage" />
20
25
<waitForElementVisible selector =" {{section.invalidUploadOkBtn}}" stepKey =" waitForInvalidUploadBtn" />
21
26
<click selector =" {{section.invalidUploadOkBtn}}" stepKey =" clickInvalidUploadBtn" />
22
27
<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" />
25
30
</actionGroup >
26
31
</actionGroups >
Original file line number Diff line number Diff line change 7
7
-->
8
8
<actionGroups xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
9
9
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" />
27
11
</actionGroups >
Original file line number Diff line number Diff line change 38
38
</actionGroup >
39
39
<actionGroup ref =" addInvalidImageToStage" stepKey =" addInvalidImageToStage" >
40
40
<argument name =" property" value =" PageBuilderImage_InvalidFileType" />
41
+ <argument name =" imageSource" value =" ImageOnStageWithoutImageUploaded.imageSource(PageBuilderImage_InvalidFileType.fileName)" />
41
42
</actionGroup >
42
43
<!-- Add Banner Background Image to Stage -->
43
44
<comment userInput =" Add Banner Background Image to Stage" stepKey =" commentAddBannerToStage" />
46
47
</actionGroup >
47
48
<actionGroup ref =" addInvalidBannerBackgroundToStage" stepKey =" addInvalidBannerBackgroundToStage" >
48
49
<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)" />
49
54
</actionGroup >
50
55
<!-- Add Slide Background Image to Stage -->
51
56
<comment userInput =" Add Slide Background Image to Stage" stepKey =" commentAddSliderToStage" />
54
59
</actionGroup >
55
60
<actionGroup ref =" addInvalidSliderBackgroundToStage" stepKey =" addInvalidSliderBackgroundToStage" >
56
61
<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)" />
57
66
</actionGroup >
58
67
</test >
59
68
</tests >
You can’t perform that action at this time.
0 commit comments