Skip to content

Commit b778bb0

Browse files
author
joiecaquicla
committed
Merge branch '636-functional-tests-on-mobile-viewport' of github.com:joweecaquicla/magento2-page-builder into 636-functional-tests-on-mobile-viewport
2 parents a7ab7c4 + eba4acc commit b778bb0

File tree

3 files changed

+88
-31
lines changed

3 files changed

+88
-31
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Test/ViewportSwitcherMobile/ViewportSwitcherMobileDuplicateContentTypesFromOnHoverOptionMenusTest.xml

Lines changed: 51 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,16 @@
5656
<argument name="contentType" value="PageBuilderRowContentType"/>
5757
</actionGroup>
5858
<seeNumberOfElements selector="{{RowOnStage.allRows}}" userInput="2" stepKey="see2RowsStage"/>
59-
<seeElement selector="{{RowOnStage.backgroundColor('1', PageBuilderBackgroundColor_Hex_Grey.rgb)}}" stepKey="seeBackgroundColorRow1Stage"/>
60-
<seeElement selector="{{RowOnStage.backgroundColor('2', PageBuilderBackgroundColor_Hex_Grey.rgb)}}" stepKey="seeBackgroundColorRow2Stage"/>
59+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="seeBackgroundColorRow1Stage">
60+
<argument name="selector" value="{{RowOnStage.backgroundPath('1')}}"/>
61+
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Hex_Grey.rgb}}"/>
62+
<argument name="cssProperty" value="backgroundColor"/>
63+
</actionGroup>
64+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="seeBackgroundColorRow2Stage">
65+
<argument name="selector" value="{{RowOnStage.backgroundPath('2')}}"/>
66+
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Hex_Grey.rgb}}"/>
67+
<argument name="cssProperty" value="backgroundColor"/>
68+
</actionGroup>
6169
<!-- Validate Edit Panel For Duplicate -->
6270
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuForRow2">
6371
<argument name="contentType" value="PageBuilderRowContentType"/>
@@ -74,30 +82,60 @@
7482
<actionGroup ref="openPageBuilderForAttribute" stepKey="openPageBuilderForDescription"/>
7583
<!-- Validate Stage After Save Desktop Viewport -->
7684
<seeNumberOfElements selector="{{RowOnStage.allRows}}" userInput="2" stepKey="see2RowsStageAfterSave"/>
77-
<seeElement selector="{{RowOnStage.backgroundColor('1', PageBuilderBackgroundColor_Hex_Grey.rgb)}}" stepKey="seeBackgroundColorRow1StageAfterSave"/>
78-
<seeElement selector="{{RowOnStage.backgroundColor('2', PageBuilderBackgroundColor_Hex_Grey.rgb)}}" stepKey="seeBackgroundColorRow2StageAfterSave"/>
85+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="seeBackgroundColorRow1Stage2">
86+
<argument name="selector" value="{{RowOnStage.backgroundPath('1')}}"/>
87+
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Hex_Grey.rgb}}"/>
88+
<argument name="cssProperty" value="backgroundColor"/>
89+
</actionGroup>
90+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="seeBackgroundColorRow2Stage2">
91+
<argument name="selector" value="{{RowOnStage.backgroundPath('2')}}"/>
92+
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Hex_Grey.rgb}}"/>
93+
<argument name="cssProperty" value="backgroundColor"/>
94+
</actionGroup>
7995
<!-- Validate Stage After Save Mobile Viewport -->
8096
<actionGroup ref="AdminSwitchPageBuilderViewportActionGroup" stepKey="switchToMobileViewportAfterSave">
8197
<argument name="viewportButton" value="mobile"/>
8298
<argument name="viewportStage" value="mobile"/>
8399
</actionGroup>
84100
<seeNumberOfElements selector="{{RowOnStage.allRows}}" userInput="2" stepKey="see2RowsStageAfterSave2"/>
85-
<seeElement selector="{{RowOnStage.backgroundColor('1', PageBuilderBackgroundColor_Hex_Grey.rgb)}}" stepKey="seeBackgroundColorRow1StageAfterSave2"/>
86-
<seeElement selector="{{RowOnStage.backgroundColor('2', PageBuilderBackgroundColor_Hex_Grey.rgb)}}" stepKey="seeBackgroundColorRow2StageAfterSave2"/>
101+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="seeBackgroundColorRow1Stage3">
102+
<argument name="selector" value="{{RowOnStage.backgroundPath('1')}}"/>
103+
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Hex_Grey.rgb}}"/>
104+
<argument name="cssProperty" value="backgroundColor"/>
105+
</actionGroup>
106+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="seeBackgroundColorRow2Stage3">
107+
<argument name="selector" value="{{RowOnStage.backgroundPath('2')}}"/>
108+
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Hex_Grey.rgb}}"/>
109+
<argument name="cssProperty" value="backgroundColor"/>
110+
</actionGroup>
87111
<!-- Navigate To Storefront -->
88112
<actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToProductStorefront">
89113
<argument name="page" value="$$createProduct.name$$.html"/>
90114
</actionGroup>
91-
<!-- Validate Storefront Desktop -->
92115
<scrollTo selector="{{StorefrontProductInfoMainSection.productDescription}}" stepKey="scrollToProductDescription"/>
116+
<!-- Validate Storefront Desktop -->
93117
<seeNumberOfElements selector="{{RowOnStorefront.allRows}}" userInput="2" stepKey="see2RowsStorefront"/>
94-
<seeElement selector="{{RowOnStorefront.backgroundColor('1', PageBuilderBackgroundColor_Hex_Grey.rgb)}}" stepKey="seeBackgroundColorRow1Storefront"/>
95-
<seeElement selector="{{RowOnStorefront.backgroundColor('2', PageBuilderBackgroundColor_Hex_Grey.rgb)}}" stepKey="seeBackgroundColorRow2Storefront"/>
118+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="seeBackgroundColorRow1Storefront">
119+
<argument name="selector" value="{{RowOnStorefront.backgroundPath('1')}}"/>
120+
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Hex_Grey.rgb}}"/>
121+
<argument name="cssProperty" value="backgroundColor"/>
122+
</actionGroup>
123+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="seeBackgroundColorRow2Storefront">
124+
<argument name="selector" value="{{RowOnStorefront.backgroundPath('2')}}"/>
125+
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Hex_Grey.rgb}}"/>
126+
<argument name="cssProperty" value="backgroundColor"/>
127+
</actionGroup>
96128
<!-- Validate Storefront Mobile -->
97129
<resizeWindow width="767" height="1000" stepKey="resizeWindowToMobile"/>
98-
<scrollTo selector="{{StorefrontProductInfoMainSection.productDescription}}" stepKey="scrollToProductDescription2"/>
99130
<seeNumberOfElements selector="{{RowOnStorefront.allRows}}" userInput="2" stepKey="see2RowsStorefront2"/>
100-
<seeElement selector="{{RowOnStorefront.backgroundColor('1', PageBuilderBackgroundColor_Hex_Grey.rgb)}}" stepKey="seeBackgroundColorRow1Storefront2"/>
101-
<seeElement selector="{{RowOnStorefront.backgroundColor('2', PageBuilderBackgroundColor_Hex_Grey.rgb)}}" stepKey="seeBackgroundColorRow2Storefront2"/>
102-
</test>
131+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="seeBackgroundColorRow1Storefront2">
132+
<argument name="selector" value="{{RowOnStorefront.backgroundPath('1')}}"/>
133+
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Hex_Grey.rgb}}"/>
134+
<argument name="cssProperty" value="backgroundColor"/>
135+
</actionGroup>
136+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="seeBackgroundColorRow2Storefront2">
137+
<argument name="selector" value="{{RowOnStorefront.backgroundPath('2')}}"/>
138+
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Hex_Grey.rgb}}"/>
139+
<argument name="cssProperty" value="backgroundColor"/>
140+
</actionGroup></test>
103141
</tests>

app/code/Magento/PageBuilder/Test/Mftf/Test/ViewportSwitcherMobile/ViewportSwitcherMobileEditContentTypesFromOnClickOptionMenusTest.xml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,22 @@
6060
</actionGroup>
6161
<actionGroup ref="saveEditPanelSettingsFullScreen" stepKey="saveEditFormForSlide"/>
6262
<!-- Validate Stage -->
63-
<seeElement selector="{{SlideOnBackend.backgroundColor('1', PageBuilderBackgroundColor_Plaintext_Green.rgb)}}" stepKey="seeBackgroundColorSlideStage"/>
63+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="seeBackgroundColorSlideStage">
64+
<argument name="selector" value="{{SlideOnBackend.backgroundPath('1')}}"/>
65+
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Plaintext_Green.rgb}}"/>
66+
<argument name="cssProperty" value="backgroundColor"/>
67+
</actionGroup>
6468
<!-- Save Product -->
6569
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen"/>
6670
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
6771
<actionGroup ref="ExpandAdminProductSectionActionGroup" stepKey="expandAdminProductSection"/>
6872
<actionGroup ref="openPageBuilderForAttribute" stepKey="openPageBuilderForDescription"/>
6973
<!-- Validate Stage After Save Desktop Viewport -->
70-
<seeElement selector="{{SlideOnBackend.backgroundColor('1', PageBuilderBackgroundColor_Plaintext_Green.rgb)}}" stepKey="seeBackgroundColorSlideStageAfterSave"/>
74+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="seeBackgroundColorSlideStageAfterSave">
75+
<argument name="selector" value="{{SlideOnBackend.backgroundPath('1')}}"/>
76+
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Plaintext_Green.rgb}}"/>
77+
<argument name="cssProperty" value="backgroundColor"/>
78+
</actionGroup>
7179
<!-- Validate Edit Panel After Save -->
7280
<actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditMenuForSlideAfterSave">
7381
<argument name="section" value="SlideOnBackend"/>
@@ -81,7 +89,11 @@
8189
<argument name="viewportButton" value="mobile"/>
8290
<argument name="viewportStage" value="mobile"/>
8391
</actionGroup>
84-
<seeElement selector="{{SlideOnBackend.backgroundColor('1', PageBuilderBackgroundColor_Plaintext_Green.rgb)}}" stepKey="seeBackgroundColorSlideStageAfterSave2"/>
92+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="seeBackgroundColorSlideStageAfterSave2">
93+
<argument name="selector" value="{{SlideOnBackend.backgroundPath('1')}}"/>
94+
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Plaintext_Green.rgb}}"/>
95+
<argument name="cssProperty" value="backgroundColor"/>
96+
</actionGroup>
8597
<!-- Validate Edit Panel After Save -->
8698
<actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditMenuForSlideAfterSave2">
8799
<argument name="section" value="SlideOnBackend"/>
@@ -94,12 +106,19 @@
94106
<actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToProductStorefront">
95107
<argument name="page" value="$$createProduct.name$$.html"/>
96108
</actionGroup>
97-
<!-- Validate Storefront Desktop -->
98109
<scrollTo selector="{{StorefrontProductInfoMainSection.productDescription}}" stepKey="scrollToProductDescription"/>
99-
<seeElement selector="{{SlideOnFrontend.backgroundColor('1', PageBuilderBackgroundColor_Plaintext_Green.rgb)}}" stepKey="seeBackgroundColorSlideStorefront"/>
110+
<!-- Validate Storefront Desktop -->
111+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="seeBackgroundColorSlideStorefront">
112+
<argument name="selector" value="{{SlideOnFrontend.backgroundPath('1')}}"/>
113+
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Plaintext_Green.rgb}}"/>
114+
<argument name="cssProperty" value="backgroundColor"/>
115+
</actionGroup>
100116
<!-- Validate Storefront Mobile -->
101117
<resizeWindow width="767" height="1000" stepKey="resizeWindowToMobile"/>
102-
<scrollTo selector="{{StorefrontProductInfoMainSection.productDescription}}" stepKey="scrollToProductDescription2"/>
103-
<seeElement selector="{{SlideOnFrontend.backgroundColor('1', PageBuilderBackgroundColor_Plaintext_Green.rgb)}}" stepKey="seeBackgroundColorSlideStorefront2"/>
118+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="seeBackgroundColorSlideStorefront2">
119+
<argument name="selector" value="{{SlideOnFrontend.backgroundPath('1')}}"/>
120+
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Plaintext_Green.rgb}}"/>
121+
<argument name="cssProperty" value="backgroundColor"/>
122+
</actionGroup>
104123
</test>
105124
</tests>

0 commit comments

Comments
 (0)