Skip to content

Commit 4b2b642

Browse files
committed
MC-3228: Add Missing P0-P1 MFTF Tests For Slider
- Fixing slide stage upload tests & supporting action group - Addressing CR feedback
1 parent f54d010 commit 4b2b642

File tree

3 files changed

+70
-65
lines changed

3 files changed

+70
-65
lines changed

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/StageActionGroup.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@
8383
<waitForElementVisible selector="{{PageBuilderStage.onHoverSelectFromGalleryButton(contentType.role, index)}}" stepKey="waitForSelectFromGallery"/>
8484
<click selector="{{PageBuilderStage.onHoverSelectFromGalleryButton(contentType.role, index)}}" stepKey="clickSelectFromGallery"/>
8585
<waitForPageLoad stepKey="waitForPageLoad1"/>
86-
<waitForElementVisible selector="{{MediaGallerySection.InsertFile}}" stepKey="waitForAddSelectedFilesButton"/>
87-
<seeElement selector="{{MediaGallerySection.InsertFile}}" stepKey="seeAddSelectedFilesButton"/>
86+
<waitForElementVisible selector="{{MediaGallerySection.CreateFolder}}" stepKey="waitForAddSelectedFilesButton"/>
87+
<seeElement selector="{{MediaGallerySection.CreateFolder}}" stepKey="seeAddSelectedFilesButton"/>
88+
<waitForElementVisible selector="{{MediaGallerySection.StorageRootArrow}}" stepKey="waitForStorageRootArrow"/>
89+
<seeElement selector="{{MediaGallerySection.StorageRootArrow}}" stepKey="seeStorageRootArrow"/>
8890
<click selector="{{MediaGallerySection.CancelBtn}}" stepKey="clickCancelButton"/>
8991
<waitForPageLoad stepKey="waitForPageLoad2"/>
9092
</actionGroup>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderSlideItemCommonTest.xml

Lines changed: 64 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@
10931093
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
10941094
<!-- Validate Stage -->
10951095
<comment userInput="Validate Stage" stepKey="commentValidateStage"/>
1096-
<seeElement selector="{{SlideOnBackend.messageContent('1', PageBuilderSlideItemMessage_Long.value)}}" stepKey="seeSlide1ContentDisplayedAdmin"/>
1096+
<seeElement selector="{{SlideOnBackend.messageContent('1', PageBuilderSlideItemMessage_Long.value)}}" stepKey="seeSlide1ContentStage"/>
10971097
<executeJS function="{{PageBuilderStage.computedHeightOnStage(PageBuilderSliderContentType.role, '1')}}" stepKey="slideNewHeightStage"/>
10981098
<assertGreaterThan stepKey="assertSlideHeightGrewStage">
10991099
<expectedResult type="variable">slideInitialHeightStage</expectedResult>
@@ -1103,7 +1103,7 @@
11031103
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage2"/>
11041104
<!-- Validate Stage 2 -->
11051105
<comment userInput="Validate Stage 2" stepKey="commentValidateStage2"/>
1106-
<seeElement selector="{{SlideOnBackend.messageContent('1', PageBuilderSlideItemMessage_Long.value)}}" stepKey="test"/>
1106+
<seeElement selector="{{SlideOnBackend.messageContent('1', PageBuilderSlideItemMessage_Long.value)}}" stepKey="seeSlide1ContentStage2"/>
11071107
<executeJS function="{{PageBuilderStage.computedHeightOnStage(PageBuilderSliderContentType.role, '1')}}" stepKey="slideNewHeightStage2"/>
11081108
<assertEquals stepKey="assertSlideHeightSameStage">
11091109
<expectedResult type="variable">slideNewHeightStage</expectedResult>
@@ -1113,15 +1113,14 @@
11131113
<comment userInput="Validate Storefront" stepKey="commentValidateStorefront"/>
11141114
<switchToNextTab stepKey="switchToNextTab"/>
11151115
<reloadPage stepKey="reloadPage2"/>
1116-
<seeElement selector="{{SlideOnFrontend.messageContent('1', PageBuilderSlideItemMessage_Long.value)}}" stepKey="test2"/>
1116+
<seeElement selector="{{SlideOnFrontend.messageContent('1', PageBuilderSlideItemMessage_Long.value)}}" stepKey="seeSlide1ContentStorefront"/>
11171117
<executeJS function="{{PageBuilderStoreFront.computedHeight(PageBuilderSliderContentType.role, '0')}}" stepKey="slideNewHeightStorefront"/>
11181118
<assertGreaterThan stepKey="assertSlideHeightGrewStorefront">
11191119
<expectedResult type="variable">slideInitialHeightStorefront</expectedResult>
11201120
<actualResult type="variable">slideNewHeightStorefront</actualResult>
11211121
</assertGreaterThan>
11221122
</test>
11231123
<test name="SlideItemUploadImageFromStage">
1124-
<!--todo: fix after merging in wysiwyg banner branch-->
11251124
<annotations>
11261125
<features value="PageBuilder"/>
11271126
<stories value="Slider"/>
@@ -1136,68 +1135,66 @@
11361135
</annotations>
11371136
<before>
11381137
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
1139-
<createData entity="_defaultCmsPage" stepKey="createPreReqCMSPage" />
1138+
<createData entity="_defaultCmsPage" stepKey="createPreReqCMSPage"/>
1139+
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToContentCreatedCMSPage1">
1140+
<argument name="CMSPage" value="$$createPreReqCMSPage$$"/>
1141+
</actionGroup>
11401142
</before>
11411143
<after>
11421144
<deleteData createDataKey="createPreReqCMSPage" stepKey="deleteCreatePreReqCMSPage"/>
1145+
<actionGroup ref="navigateToMediaGallery" stepKey="navigateToMediaGallery"/>
1146+
<actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="NavigateToFolder">
1147+
<argument name="FolderName" value="{{PageBuilderBackgroundImage_JPG.path}}"/>
1148+
</actionGroup>
1149+
<actionGroup ref="DeleteImageFromStorageActionGroup" stepKey="DeleteImageFromStorage">
1150+
<argument name="Image" value="PageBuilderBackgroundImage_JPG"/>
1151+
</actionGroup>
11431152
<actionGroup ref="logout" stepKey="logout"/>
11441153
</after>
1145-
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToContentCreatedCMSPage1">
1146-
<argument name="CMSPage" value="$$createPreReqCMSPage$$"/>
1147-
</actionGroup>
1154+
<!-- Add Slider -->
1155+
<comment userInput="Add Slider" stepKey="commentAddSlider"/>
11481156
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup">
11491157
<argument name="group" value="PageBuilderSliderContentType"/>
11501158
</actionGroup>
1151-
<actionGroup ref="dragContentTypeToStage" stepKey="dragSliderIntoStage">
1159+
<actionGroup ref="dragContentTypeToStageAndExpectEditPanel" stepKey="dragSliderOntoStage">
11521160
<argument name="contentType" value="PageBuilderSliderContentType"/>
11531161
</actionGroup>
11541162
<actionGroup ref="closeEditPanelSettings" stepKey="closeEditPanelSettings"/>
1155-
<!--Verify there are 2 buttons when hovering-->
1163+
<!-- Verify On Hover Upload Button Work-->
1164+
<comment userInput="Verify On Hover Upload Buttons Work" stepKey="commentVerifyButtons"/>
11561165
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unFocusSlide"/>
1157-
<comment userInput="Verify there are 2 buttons when hovering" stepKey="commentVerifyButtons" />
1158-
<actionGroup ref="verifyUploadImageButtons" stepKey="verifyUploadImageButtons" >
1166+
<actionGroup ref="verifyUploadImageButtons" stepKey="verifyUploadImageButtons">
11591167
<argument name="contentType" value="PageBuilderSliderContentType"/>
1160-
<argument name="section" value="PageBuilderStage"/>
11611168
</actionGroup>
1162-
<!--Upload image from local machine -->
1163-
<comment userInput="Upload image from local machine" stepKey="commentUploadImageFromLocal" />
1164-
<attachFile userInput="{{PageBuilderImageProperty_JPG.value}}" selector="{{PageBuilderStage.uploadImageInput('1')}}" stepKey="attachImageFromLocalToStage"/>
1165-
<waitForPageLoad stepKey="waitForPageLoad4" />
1166-
<waitForElementVisible selector="{{ImageOnConfigurationPanel.imageSource(PageBuilderImageProperty_JPG.fileName)}}" stepKey="waitForMainImageSource1"/>
1167-
<!--Upload image from Media Gallery Storage -->
1168-
<comment userInput="Upload image from Media Gallery Storage" stepKey="commentUploadImageFromStorage"/>
1169-
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unFocusSlide2"/>
1170-
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStage(PageBuilderSliderContentType.role)}}" stepKey="onMouseOverContentTypeStage"/>
1171-
<waitForElementVisible selector="{{ImageOnStage.selectFromGalleryImageBtn}}" stepKey="seeSelectFromGalleryBtn2" />
1172-
<click selector="{{ImageOnStage.selectFromGalleryImageBtn}}" stepKey="clickSelectFromGallery" />
1173-
<waitForPageLoad stepKey="waitForPageLoad2" />
1174-
<waitForLoadingMaskToDisappear stepKey="waitForLoading2" />
1175-
<actionGroup ref="CreateImageFolder" stepKey="createImageFolder">
1176-
<argument name="ImageFolder" value="ImageFolder"/>
1177-
</actionGroup>
1178-
<actionGroup ref="attachImage" stepKey="attachImageFile1">
1179-
<argument name="Image" value="PageBuilderBackgroundImage_JPG"/>
1169+
<attachFile selector="{{PageBuilderStage.uploadImageInput('1')}}" userInput="{{PageBuilderImageProperty_JPG.value}}" stepKey="attachImageFromLocalToStage"/>
1170+
<waitForPageLoad stepKey="waitForPageLoad"/>
1171+
<actionGroup ref="validateBackgroundImage" stepKey="validateBackgroundImageStage">
1172+
<argument name="section" value="SlideOnBackend"/>
1173+
<argument name="backgroundImage" value="PageBuilderBackgroundImage_JPG"/>
1174+
</actionGroup>
1175+
<actionGroup ref="verifySelectFromGalleryButtonWorks" stepKey="verifySelectFromGalleryButtonWorks">
1176+
<argument name="contentType" value="PageBuilderSliderContentType"/>
11801177
</actionGroup>
1181-
<actionGroup ref="saveImage" stepKey="saveImage"/>
1182-
<waitForElement selector="{{ImageOnConfigurationPanel.imageSource(PageBuilderBackgroundImage_JPG.fileName)}}" stepKey="seeImageInDOM"/>
1183-
<!--Verify uploaded image is displayed on slide-out-->
1184-
<comment userInput="Verify uploaded image is displayed on slide-out" stepKey="commentVerifyImageOnSlideout"/>
1178+
<!-- Verify Edit Panel -->
1179+
<comment userInput="Verify Edit Panel" stepKey="commentVerifyEditPanel"/>
11851180
<actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditPanel">
11861181
<argument name="section" value="SlideOnBackend"/>
11871182
</actionGroup>
1188-
<actionGroup ref="seeImageUploadedOnSlideOut" stepKey="seeImageOnSlideOut1">
1183+
<actionGroup ref="seeImageUploadedOnSlideOut" stepKey="seeImageOnSlideOut">
11891184
<argument name="property" value="PageBuilderBackgroundImage_JPG"/>
11901185
</actionGroup>
1191-
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
1186+
<actionGroup ref="closeEditPanelSettings" stepKey="closeEditPanelSettings2"/>
11921187
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
11931188
<!-- Validate Storefront -->
11941189
<comment userInput="Validate Storefront" stepKey="commentValidateStorefront"/>
1195-
<amOnPage url="$$createPreReqCMSPage.identifier$$" stepKey="amOnCmsStorefront" />
1196-
<waitForPageLoad stepKey="waitForPageLoad3" />
1197-
<waitForElement selector="{{PageBuilderStoreFront.imageSourceOnFrontEnd(PageBuilderBackgroundImage_JPG.fileName)}}" stepKey="seeMainImageSourceOnFrontend"/>
1190+
<amOnPage url="$$createPreReqCMSPage.identifier$$" stepKey="amOnCmsStorefront"/>
1191+
<waitForPageLoad stepKey="waitForPageLoad4"/>
1192+
<actionGroup ref="validateBackgroundImage" stepKey="validateBackgroundImageStorefront">
1193+
<argument name="section" value="SlideOnFrontend"/>
1194+
<argument name="backgroundImage" value="PageBuilderBackgroundImage_JPG"/>
1195+
</actionGroup>
11981196
</test>
11991197
<test name="SlideItemVerifyStageUploadImageButtonsForEachAppearance">
1200-
<!--todo: fix after merging in wysiwyg banner branch-->
12011198
<annotations>
12021199
<features value="PageBuilder"/>
12031200
<stories value="Slider"/>
@@ -1212,64 +1209,70 @@
12121209
</annotations>
12131210
<before>
12141211
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
1215-
<createData entity="_defaultCmsPage" stepKey="createPreReqCMSPage" />
1212+
<createData entity="_defaultCmsPage" stepKey="createPreReqCMSPage"/>
1213+
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToContentCreatedCMSPage1">
1214+
<argument name="CMSPage" value="$$createPreReqCMSPage$$"/>
1215+
</actionGroup>
12161216
</before>
12171217
<after>
12181218
<deleteData createDataKey="createPreReqCMSPage" stepKey="deleteCreatePreReqCMSPage"/>
12191219
<actionGroup ref="logout" stepKey="logout"/>
12201220
</after>
1221-
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToContentCreatedCMSPage1">
1222-
<argument name="CMSPage" value="$$createPreReqCMSPage$$"/>
1223-
</actionGroup>
1221+
<!-- Add Slider -->
1222+
<comment userInput="Add Slider" stepKey="commentAddSlider"/>
12241223
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup">
12251224
<argument name="group" value="PageBuilderSliderContentType"/>
12261225
</actionGroup>
1227-
<actionGroup ref="dragContentTypeToStage" stepKey="dragSliderIntoStage">
1226+
<actionGroup ref="dragContentTypeToStageAndExpectEditPanel" stepKey="dragSliderOntoStage">
12281227
<argument name="contentType" value="PageBuilderSliderContentType"/>
12291228
</actionGroup>
1230-
<!--Verify there are 2 buttons display when user select appearance Left-->
12311229
<actionGroup ref="chooseVisualSelectOption" stepKey="enterAppearanceProperty1">
12321230
<argument name="property" value="PageBuilderAppearance_CollageLeft"/>
12331231
</actionGroup>
12341232
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings1"/>
1233+
<!-- Collage Left: Verify On Hover Upload Buttons -->
1234+
<comment userInput="Collage Left: Verify On Hover Upload Buttons" stepKey="commentVerifyButtons1"/>
12351235
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unFocusSlide"/>
1236-
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStage(PageBuilderSliderContentType.role)}}" stepKey="onMouseOverContentTypeStage1"/>
1237-
<comment userInput="Verify there are 2 buttons when hovering" stepKey="commentVerifyButtons1" />
1238-
<actionGroup ref="verifyUploadImageButtons" stepKey="verifyUploadImageButtons1" >
1236+
<actionGroup ref="verifyUploadImageButtons" stepKey="verifyUploadImageButtons1">
12391237
<argument name="contentType" value="PageBuilderSliderContentType"/>
1240-
<argument name="section" value="PageBuilderStage"/>
12411238
</actionGroup>
1242-
<!--Verify there are 2 buttons display when user select appearance Center-->
1243-
<actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditPanel1">
1239+
<actionGroup ref="verifySelectFromGalleryButtonWorks" stepKey="verifySelectFromGalleryButtonWorks">
1240+
<argument name="contentType" value="PageBuilderSliderContentType"/>
1241+
</actionGroup>
1242+
<actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditPanel">
12441243
<argument name="section" value="SlideOnBackend"/>
12451244
</actionGroup>
12461245
<actionGroup ref="chooseVisualSelectOption" stepKey="enterAppearanceProperty2">
12471246
<argument name="property" value="PageBuilderAppearance_CollageCentered"/>
12481247
</actionGroup>
12491248
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings2"/>
1249+
<!-- Collage Center: Verify On Hover Upload Buttons -->
1250+
<comment userInput="Collage Center: Verify On Hover Upload Buttons" stepKey="commentVerifyButtons2"/>
12501251
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unFocusSlide2"/>
1251-
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStage(PageBuilderSliderContentType.role)}}" stepKey="onMouseOverContentTypeStage2"/>
1252-
<comment userInput="Verify there are 2 buttons when hovering" stepKey="commentVerifyButtons2" />
1253-
<actionGroup ref="verifyUploadImageButtons" stepKey="verifyUploadImageButtons2" >
1252+
<actionGroup ref="verifyUploadImageButtons" stepKey="verifyUploadImageButtons2">
12541253
<argument name="contentType" value="PageBuilderSliderContentType"/>
12551254
<argument name="section" value="PageBuilderStage"/>
12561255
</actionGroup>
1257-
<!--Verify there are 2 buttons display when user select appearance Right-->
1256+
<actionGroup ref="verifySelectFromGalleryButtonWorks" stepKey="verifySelectFromGalleryButtonWorks2">
1257+
<argument name="contentType" value="PageBuilderSliderContentType"/>
1258+
</actionGroup>
12581259
<actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditPanel2">
12591260
<argument name="section" value="SlideOnBackend"/>
12601261
</actionGroup>
12611262
<actionGroup ref="chooseVisualSelectOption" stepKey="enterAppearanceProperty3">
12621263
<argument name="property" value="PageBuilderAppearance_CollageRight"/>
12631264
</actionGroup>
12641265
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings3"/>
1265-
<!--Verify there are 2 buttons when hovering-->
1266+
<!-- Collage Right: Verify On Hover Upload Buttons -->
1267+
<comment userInput="Collage Right: Verify On Hover Upload Buttons" stepKey="commentVerifyButtons3"/>
12661268
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unFocusSlide3"/>
1267-
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStage(PageBuilderSliderContentType.role)}}" stepKey="onMouseOverContentTypeStage3"/>
1268-
<comment userInput="Verify there are 2 buttons when hovering" stepKey="commentVerifyButtons3" />
1269-
<actionGroup ref="verifyUploadImageButtons" stepKey="verifyUploadImageButtons3" >
1269+
<actionGroup ref="verifyUploadImageButtons" stepKey="verifyUploadImageButtons3">
12701270
<argument name="contentType" value="PageBuilderSliderContentType"/>
12711271
<argument name="section" value="PageBuilderStage"/>
12721272
</actionGroup>
1273+
<actionGroup ref="verifySelectFromGalleryButtonWorks" stepKey="verifySelectFromGalleryButtonWorks3">
1274+
<argument name="contentType" value="PageBuilderSliderContentType"/>
1275+
</actionGroup>
12731276
</test>
12741277
<test name="SlideItemDeleteImage">
12751278
<annotations>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderSliderCommonTests.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -805,8 +805,8 @@
805805
<reloadPage stepKey="reloadStorefront" />
806806
<waitForPageLoad stepKey="waitForStorefrontReload" />
807807
<dontSeeElementInDOM selector="{{SliderOnFrontend.hidden('1')}}" stepKey="dontSeeHiddenElement"/>
808-
<seeElement selector="{{SliderOnFrontend.base('1')}}" stepKey="waitForContentTypeVisible" />
809-
<seeElement selector="{{SlideOnFrontend.base('1')}}" stepKey="waitForSlideVisible" />
808+
<seeElement selector="{{SliderOnFrontend.base('1')}}" stepKey="seeContentTypeVisible" />
809+
<seeElement selector="{{SlideOnFrontend.base('1')}}" stepKey="seeSlideVisible" />
810810
</test>
811811
<test name="SliderDuplicate">
812812
<annotations>

0 commit comments

Comments
 (0)