Skip to content

Commit a516bb7

Browse files
committed
Merge branch 'MC-1405' of github.com:magento-trigger/magento2-page-builder into MC-1405
2 parents 8a8e121 + f4b68bb commit a516bb7

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,15 @@
4545
<actionGroup name="openOptionsMenu">
4646
<arguments>
4747
<argument name="contentType"/>
48-
<argument name="offsetXCoordinate" defaultValue="10" type="string"/>
49-
<argument name="offsetYCoordinate" defaultValue="0" type="string"/>
48+
<argument name="contentTypeIndex" defaultValue="1" type="string"/>
49+
<argument name="contentTypeXCoordinate" defaultValue="null" type="string"/>
50+
<argument name="contentTypeYCoordinate" defaultValue="null" type="string"/>
5051
</arguments>
51-
<waitForElementVisible time="10" selector="{{PageBuilderStage.contentTypeInStage(contentType.role)}}" stepKey="waitForContentTypeInStageVisible"/>
52-
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStage(contentType.role)}}" x="10" y="0" stepKey="onMouseOverContentTypeStage"/>
52+
<waitForElementVisible time="20" selector="{{PageBuilderStage.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForContentTypeInStageVisible"/>
53+
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" x="{{contentTypeXCoordinate}}" y="{{contentTypeYCoordinate}}" stepKey="onMouseOverContentTypeStage"/>
5354
<waitForPageLoad stepKey="waitForPageLoad"/>
54-
<waitForElementVisible time="10" selector="{{PageBuilderContentTypeOptionsMenu.contentTypeOptionsMenu(contentType.role)}}" stepKey="waitForOptions"/>
55+
<waitForElementVisible time="10" selector="{{PageBuilderContentTypeOptionsMenu.contentTypeOptionsMenuByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForOptions"/>
56+
<waitForElementVisible selector="{{PageBuilderContentTypeOptionsMenu.contentTypeEditByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForEditButton"/>
5557
</actionGroup>
5658
<actionGroup name="openPageBuilderEditPanelSmallByIndex">
5759
<arguments>

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@
736736
<title value="Add Block with Tab to CMS Page"/>
737737
<description value="Verify that admin are able to add a block instance type with tab content to Block Content Block and see it on frontend"/>
738738
<severity value="CRITICAL"/>
739-
<!--<testCaseId value="MC-2289"/>-->
739+
<testCaseId value="MC-3742"/>
740740
<useCaseId value="MC-1405"/>
741741
<group value="pagebuilder"/>
742742
<group value="pagebuilder-block"/>
@@ -751,8 +751,6 @@
751751
<deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage" />
752752
<actionGroup ref="logout" stepKey="logout"/>
753753
</after>
754-
<!--Add Tab to block-->
755-
<comment userInput="Adding Tab to block" stepKey="commentAddingTabToBlock"/>
756754
<actionGroup ref="navigateToCreatedCMSBlockPage" stepKey="navigateToCreatedCMSBlockPage1">
757755
<argument name="CMSBlockPage" value="$$createPreReqBlock$$"/>
758756
</actionGroup>
@@ -764,7 +762,7 @@
764762
<actionGroup ref="dragContentTypeToStage" stepKey="dragTabsIntoStage">
765763
<argument name="contentType" value="PageBuilderTabsContentType"/>
766764
</actionGroup>
767-
<!-- Open Tabs Panel -->
765+
<!-- User sees tabs displayed with 1st default tab item created by default -->
768766
<comment userInput="User sees tabs displayed with 1st default tab item created by default" stepKey="AC1"/>
769767
<actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditPanel1">
770768
<argument name="section" value="TabOnStage"/>
@@ -787,6 +785,7 @@
787785
<comment userInput="User updates tab settings and saves configuration" stepKey="saveBlock"/>
788786
<click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="clickSaveBlock"/>
789787
<waitForPageLoad stepKey="waitForPageToLoad"/>
788+
<!--User goes to created CMS page-->
790789
<comment userInput="User goes to created CMS page" stepKey="NavigateToCMSPage"/>
791790
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage">
792791
<argument name="CMSPage" value="$$createCMSPage$$"/>
@@ -804,14 +803,18 @@
804803
<waitForElementVisible selector="{{BlockOnForm.title('$$createPreReqBlock.title$$')}}" stepKey="waitToSeeBlockTitle"/>
805804
<seeElement selector="{{BlockOnForm.title('$$createPreReqBlock.title$$')}}" stepKey="seeBlockTitleOnForm"/>
806805
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings2"/>
806+
<!--Check that tab was rendered on the stage-->
807807
<comment userInput="Check that tab was rendered on the stage" stepKey="commentCheckingThatTabAreRenderedOnTHeStage"/>
808808
<see selector="{{TabOnStorefront.tabHeader('1')}}" userInput="{{PageBuilderTabNameRandom1.value}}" stepKey="seeTab1TitleStorefront2"/>
809809
<seeElement selector="{{TabOnStorefront.tabContentBackgroundColor('1', PageBuilderTabBackgroundColorPink.rgb)}}" stepKey="seeTab1BackgroundColor2"/>
810810
<actionGroup ref="openOptionsMenu" stepKey="openEditMenuOnStage3">
811811
<argument name="contentType" value="PageBuilderBlockContentType"/>
812+
<argument name="contentTypeIndex" value="1"/>
812813
</actionGroup>
813814
<seeElement selector="{{BlockOnStage.overlay}}" stepKey="seeOverlayOnBlock"/>
814815
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
816+
<!--Verify block on the frontend-->
817+
<comment userInput="Verify Block On Store front" stepKey="commentCheckingThatImageIsNotRenderedOnTheStoreFront"/>
815818
<amOnPage url="$$createCMSPage.identifier$$" stepKey="amOnPageTestPage"/>
816819
<see selector="{{TabOnStorefront.tabHeader('1')}}" userInput="{{PageBuilderTabNameRandom1.value}}" stepKey="seeTab1TitleStorefront"/>
817820
<seeElement selector="{{TabOnStorefront.tabContentBackgroundColor('1', PageBuilderTabBackgroundColorPink.rgb)}}" stepKey="seeTab1BackgroundColor"/>
@@ -822,7 +825,7 @@
822825
<features value="PageBuilder"/>
823826
<stories value="Block"/>
824827
<title value="Add Block with Empty Image to CMS Page"/>
825-
<description value="Verify that admin are able to add a block instance type with tab content to Block Content Block and see it on frontend"/>
828+
<description value="Verify that admin are able to add a block instance type with empty image to Block Content Block and see it on frontend and on the stage"/>
826829
<severity value="CRITICAL"/>
827830
<testCaseId value="MC-3740"/>
828831
<useCaseId value="MC-1405"/>
@@ -844,7 +847,6 @@
844847
<actionGroup ref="navigateToCreatedCMSBlockPage" stepKey="navigateToCreatedCMSBlockPage1">
845848
<argument name="CMSBlockPage" value="$$createPreReqBlock$$"/>
846849
</actionGroup>
847-
<comment userInput="Add Image to Stage" stepKey="addImageToStage"/>
848850
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup">
849851
<argument name="group" value="PageBuilderImageContentType"/>
850852
</actionGroup>
@@ -878,15 +880,18 @@
878880
<actualResult type="variable">height</actualResult>
879881
<expectedResult type="string">10px</expectedResult>
880882
</assertGreaterThanOrEqual>
883+
<seeElementInDOM selector="{{ImageOnStorefront.imageDisplay}}" stepKey="seeThatEmptyImageExistsInDomOnStage"/>
881884
<dontSeeElement selector="{{ImageOnStorefront.imageDisplay}}" stepKey="notSeeImageOnStage"/>
882885
<actionGroup ref="openOptionsMenu" stepKey="openEditMenuOnStage3">
883886
<argument name="contentType" value="PageBuilderBlockContentType"/>
887+
<argument name="contentTypeIndex" value="1"/>
884888
</actionGroup>
885889
<seeElement selector="{{BlockOnStage.overlay}}" stepKey="seeOverlayOnBlock"/>
886890
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
887891
<amOnPage url="$$createCMSPage.identifier$$" stepKey="amOnPageTestPage"/>
888892
<!--Verify block on the frontend-->
889893
<comment userInput="Verify Block On Store front" stepKey="commentCheckingThatImageIsNotRenderedOnTheStoreFront"/>
894+
<seeElementInDOM selector="{{ImageOnStorefront.imageDisplay}}" stepKey="seeThatEmptyImageExistsInDomOnStorefront"/>
890895
<dontSeeElement selector="{{ImageOnStorefront.imageDisplay}}" stepKey="notSeeImageOnFrontend"/>
891896
</test>
892897
</tests>

0 commit comments

Comments
 (0)