Skip to content

Commit d98320d

Browse files
committed
MC-3673: Tab created inside of a block does not save active tab
- add validation for active tab
1 parent da46bdc commit d98320d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,7 @@
839839
<actionGroup ref="dragContentTypeToStage" stepKey="dragTabsIntoStage">
840840
<argument name="contentType" value="PageBuilderTabsContentType"/>
841841
</actionGroup>
842+
<actionGroup ref="addTab" stepKey="addSecondTab"/>
842843
<!-- User sees tabs displayed with 1st default tab item created by default -->
843844
<comment userInput="User sees tabs displayed with 1st default tab item created by default" stepKey="AC1"/>
844845
<actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditPanel1">
@@ -859,9 +860,13 @@
859860
<argument name="property" value="PageBuilderTabBackgroundColorPink"/>
860861
</actionGroup>
861862
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
863+
<waitForElementVisible selector="{{TabOnStage.tabHeaderItemActive('1')}}" stepKey="seeFirstTabActiveAdminPreview"/>
862864
<comment userInput="User updates tab settings and saves configuration" stepKey="saveBlock"/>
863865
<click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="clickSaveBlock"/>
864866
<waitForPageLoad stepKey="waitForPageToLoad"/>
867+
<!--Verify stage after save-->
868+
<comment userInput="Verify stage after save" stepKey="commentVerifyStageAfterSave"/>
869+
<waitForElementVisible selector="{{TabOnStage.tabHeaderItemActive('1')}}" stepKey="seeFirstTabActiveAdminPreviewAfterSave"/>
865870
<!--User goes to created CMS page-->
866871
<comment userInput="User goes to created CMS page" stepKey="NavigateToCMSPage"/>
867872
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage">
@@ -883,6 +888,7 @@
883888
<!--Check that tab was rendered on the stage-->
884889
<comment userInput="Check that tab was rendered on the stage" stepKey="commentCheckingThatTabAreRenderedOnTHeStage"/>
885890
<see selector="{{TabOnStorefront.tabHeader('1')}}" userInput="{{PageBuilderTabNameRandom1.value}}" stepKey="seeTab1TitleStorefront2"/>
891+
<waitForElementVisible selector="{{TabOnStorefront.tabHeaderItemActive('1')}}" stepKey="seeFirstTabActiveStorefront2"/>
886892
<seeElement selector="{{TabOnStorefront.backgroundColor('1', PageBuilderTabBackgroundColorPink.rgb)}}" stepKey="seeTab1BackgroundColor2"/>
887893
<actionGroup ref="openOptionsMenu" stepKey="openEditMenuOnStage3">
888894
<argument name="contentType" value="PageBuilderBlockContentType"/>
@@ -894,6 +900,7 @@
894900
<comment userInput="Verify Block On Store front" stepKey="commentCheckingThatImageIsNotRenderedOnTheStoreFront"/>
895901
<amOnPage url="$$createCMSPage.identifier$$" stepKey="amOnPageTestPage"/>
896902
<see selector="{{TabOnStorefront.tabHeader('1')}}" userInput="{{PageBuilderTabNameRandom1.value}}" stepKey="seeTab1TitleStorefront"/>
903+
<waitForElementVisible selector="{{TabOnStorefront.tabHeaderItemActive('1')}}" stepKey="seeFirstTabActiveStorefront"/>
897904
<seeElement selector="{{TabOnStorefront.backgroundColor('1', PageBuilderTabBackgroundColorPink.rgb)}}" stepKey="seeTab1BackgroundColor"/>
898905
<see userInput="$$createPreReqBlock.content$$" stepKey="seeBlockContentOnCmsStage1"/>
899906
</test>

0 commit comments

Comments
 (0)