Skip to content

Commit 29ed850

Browse files
committed
MC-2258: Automate MFTF
1 parent be09a81 commit 29ed850

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
<argument name="block"/>
2626
</arguments>
2727
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStage(contentType.role)}}" x="10" y="0" stepKey="onMouseOverContentTypeStage"/>
28-
<see selector="{{BlockOnStage.title}}" userInput="{{block.title}}" stepKey="seeOptionMenuTitle"/>
28+
<waitForElementVisible selector="{{BlockOnStage.title(block.title)}}" stepKey="wait"/>
29+
<seeElement selector="{{BlockOnStage.title(block.title)}}" stepKey="seeOptionMenuTitle"/>
2930
<see userInput="{{block.content}}" stepKey="seeBlockContentOnStage"/>
3031
</actionGroup>
3132
</actionGroups>

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

Lines changed: 1 addition & 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.pagebuilder-block.pagebuilder-content-type div.pagebuilder-options div.option-title"/>
13+
<element name="title" type="text" selector="(//div[contains(@class,'pagebuilder-block')])[1]//div[contains(@class,'pagebuilder-options-wrapper')]//div[contains(@class,'option-title') and text()='{{arg}}']" parameterized="true"/>
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"/>

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@
7373
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
7474
<argument name="contentType" value="PageBuilderBlockContentType"/>
7575
</actionGroup>
76-
77-
78-
7976
<seeElement selector="{{BlockOnForm.title('Not Selected')}}" stepKey="seeNotSelectedBlock"/>
8077
<actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid">
8178
<argument name="block" value="$$createPreReqBlock$$"/>
@@ -93,10 +90,8 @@
9390
<argument name="contentType" value="PageBuilderBlockContentType"/>
9491
<argument name="block" value="$$createPreReqBlock$$"/>
9592
</actionGroup>
96-
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront">
97-
<argument name="contentType" value="PageBuilderBlockContentType"/>
98-
</actionGroup>
99-
<see userInput="$$createPreReqBlock.content$$" stepKey="seeBlockContentOnStage"/>
93+
<amOnPage url="$$createCMSPage.identifier$$" stepKey="amOnPageTestPage"/>
94+
<see userInput="$$createPreReqBlock.content$$" stepKey="seeBlockContentOnCmsStage"/>
10095
</test>
10196
<test name="BlockDelete">
10297
<annotations>

0 commit comments

Comments
 (0)