Skip to content

Commit be09a81

Browse files
committed
MC-1420: Automate MFTF
1 parent db837ff commit be09a81

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<argument name="block"/>
2626
</arguments>
2727
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStage(contentType.role)}}" x="10" y="0" stepKey="onMouseOverContentTypeStage"/>
28-
<see selector="{{PageBuilderContentTypeOptionsMenu.contentTypeOptionsMenu(contentType.role)}}" userInput="{{block.title}}" stepKey="seeOptionMenuTitle"/>
28+
<see selector="{{BlockOnStage.title}}" userInput="{{block.title}}" stepKey="seeOptionMenuTitle"/>
2929
<see userInput="{{block.content}}" stepKey="seeBlockContentOnStage"/>
3030
</actionGroup>
3131
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderBlockSection.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
1111
<section name="BlockOnStage">
1212
<element name="status" type="text" selector="(//div[contains(@class,'pagebuilder-block')]//span[contains(@class,'placeholder') and text()='{{arg}}'])" parameterized="true"/>
13-
<element name="title" type="text" selector="(//div[contains(@class,'pagebuilder-block')]//div[contains(@class,'block-title') and text()='{{arg1}}'])" parameterized="true"/>
13+
<element name="title" type="text" selector="div.pagebuilder-block.pagebuilder-content-type div.pagebuilder-options div.option-title"/>
1414
<element name="selectBlockBtn" type="button" selector="(//div[contains(@class,'pagebuilder-block')]//button/span[text()='Select Block'])"/>
1515
<element name="base" type="text" selector="(//div[contains(@class,'pagebuilder-block')]//div[@data-identifier])[{{arg1}}]" parameterized="true"/>
1616
<element name="identifier" type="text" selector="(//div[contains(@class,'pagebuilder-block')]//div[@data-identifier])[{{arg1}}][@data-identifier='{{arg2}}']" parameterized="true"/>
@@ -27,12 +27,16 @@
2727
<element name="noCssClasses" type="text" selector="(//div[contains(@class,'pagebuilder-block')]//div[@data-identifier])[{{arg1}}][not(@class)]" parameterized="true"/>
2828
<element name="margins" type="text" selector="(//div[contains(@class,'pagebuilder-block')]//div[@data-identifier])[{{arg1}}][contains(@style,'margin: {{arg2}}px;')]" parameterized="true"/>
2929
<element name="padding" type="text" selector="(//div[contains(@class,'pagebuilder-block')]//div[@data-identifier])[{{arg1}}][contains(@style,'padding: {{arg2}}px;')]" parameterized="true"/>
30+
<element name="selectBlockBtn" type="button" selector="(//div[contains(@class,'pagebuilder-block')]//button/span[text()='Select Block'])"/>
3031
</section>
3132
<section name="BlockOnGrid">
3233
<element name="searchBox" type="text" selector="//input[contains(@class,'data-grid-search-control')]"/>
3334
<element name="selectBtn" type="text" selector="//div[text()='{{arg}}']/parent::td//preceding-sibling::td//button[text()='Select']" parameterized="true"/>
3435
<element name="addSelectedBtn" type="text" selector="//button/span[text()='Add Selected']"/>
3536
</section>
37+
<section name="BlockOnForm">
38+
<element name="title" type="text" selector="(//div[contains(@class,'pagebuilder-block')]//div[contains(@class,'block-title') and text()='{{arg1}}'])" parameterized="true"/>
39+
</section>
3640
<section name="BlockOnStorefront">
3741
<element name="base" type="text" selector="(//div[@data-role='row']/div)[{{arg1}}]" parameterized="true"/>
3842
<element name="hr" type="button" selector="(//div[@data-role='row']/div)[{{arg1}}]/hr" parameterized="true"/>

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
<testCaseId value="MC-2279"/>
5252
<group value="pagebuilder"/>
5353
<group value="pagebuilder-block"/>
54-
5554
</annotations>
5655
<before>
5756
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
@@ -74,12 +73,15 @@
7473
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
7574
<argument name="contentType" value="PageBuilderBlockContentType"/>
7675
</actionGroup>
77-
<seeElement selector="{{BlockOnStage.title('Not Selected')}}" stepKey="seeNotSelectedBlock"/>
76+
77+
78+
79+
<seeElement selector="{{BlockOnForm.title('Not Selected')}}" stepKey="seeNotSelectedBlock"/>
7880
<actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid">
7981
<argument name="block" value="$$createPreReqBlock$$"/>
8082
</actionGroup>
8183
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
82-
<seeElement selector="{{BlockOnStage.title('$$createPreReqBlock.title$$')}}" stepKey="seeBlockTitleOnForm"/>
84+
<seeElement selector="{{BlockOnForm.title('$$createPreReqBlock.title$$')}}" stepKey="seeBlockTitleOnForm"/>
8385
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
8486
<actionGroup ref="verifyBlockOnStage" stepKey="verifyBlockOnStage">
8587
<argument name="contentType" value="PageBuilderBlockContentType"/>

0 commit comments

Comments
 (0)