Skip to content

Commit a6cc0de

Browse files
author
Cari Spruiell
committed
MC-2374: Create MFTF Tests
- update tests to ensure full width layout is selected
1 parent 01e20aa commit a6cc0de

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/>
3232
</after>
3333
<amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage"/>
34+
<waitForElementVisible selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="waitForSubCategoryBtn"/>
3435
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategory"/>
3536
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{SimpleSubCategory.name}}" stepKey="enterCategoryName"/>
3637
<click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="openSEO"/>
@@ -59,6 +60,11 @@
5960
<argument name="headingText" value="PageBuilderHeadingTextProperty"/>
6061
</actionGroup>
6162
<click selector="{{PageBuilderStage.exitFullScreen}}" stepKey="exitPageBuilderFullScreen" />
63+
<!-- Use Full Width layout -->
64+
<comment userInput="Set Layout to Category - Full Width" stepKey="commentSetLayout"/>
65+
<click selector="{{CategoryDesignSection.DesignTab}}" stepKey="clickOnDesignTab"/>
66+
<waitForElementVisible selector="{{CategoryDesignSection.LayoutDropdown}}" stepKey="waitForLayoutDropDown" />
67+
<selectOption selector="{{CategoryDesignSection.LayoutDropdown}}" userInput="{{PageBuilderFullWidthLayout.category}}" stepKey="selectCategoryFullWidthLayout"/>
6268
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategory"/>
6369
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccess"/>
6470
<!-- Literal URL below, need to refactor line + StorefrontCategoryPage when support for variable URL is implemented-->

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<description value="Create CMS Page with full page layout"/>
3232
<severity value="MAJOR"/>
3333
<testCaseId value="MC-3092"/>
34-
<group value="run"/>
34+
<group value="pagebuilder"/>
3535
<group value="pagebuilder-fullwidth"/>
3636
</annotations>
3737
<before>
@@ -60,6 +60,11 @@
6060
<actionGroup ref="enterHeadingOnStage" stepKey="enterHeadingOnStage">
6161
<argument name="headingText" value="PageBuilderHeadingTextProperty"/>
6262
</actionGroup>
63+
<!-- Use Full Width layout -->
64+
<comment userInput="Set Layout to Page - Full Width" stepKey="commentSetLayout"/>
65+
<click selector="{{CmsDesignSection.DesignTab}}" stepKey="clickOnDesignTab"/>
66+
<waitForElementVisible selector="{{CmsDesignSection.LayoutDropdown}}" stepKey="waitForLayoutDropDown" />
67+
<selectOption selector="{{CmsDesignSection.LayoutDropdown}}" userInput="{{PageBuilderFullWidthLayout.cms}}" stepKey="selectPageFullWidthLayout"/>
6368
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
6469
<!-- Check that description is full width on storefront -->
6570
<comment userInput="Check that description is full width on storefront" stepKey="commentSeeDescriptionFullWidth"/>
@@ -69,6 +74,5 @@
6974
<executeJS function="return document.querySelector('[data-role=row]').clientWidth" stepKey="rowWidth"/>
7075
<executeJS function="return document.querySelector('[class=page-wrapper]').clientWidth" stepKey="pageWidth"/>
7176
<assertEquals expected="pageWidth" expectedType="variable" actual="rowWidth" actualType="variable" stepKey="assertRowWidth100Percent" />
72-
7377
</test>
7478
</tests>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@
5555
<argument name="headingText" value="PageBuilderHeadingTextProperty"/>
5656
</actionGroup>
5757
<click selector="{{PageBuilderStage.exitFullScreen}}" stepKey="exitPageBuilderFullScreen" />
58+
<!-- Use Full Width layout -->
59+
<comment userInput="Set Layout to Product - Full Width" stepKey="commentSetLayout"/>
60+
<click selector="{{ProductDesignSection.DesignTab}}" stepKey="clickOnDesignTab"/>
61+
<waitForElementVisible selector="{{ProductDesignSection.LayoutDropdown}}" stepKey="waitForLayoutDropDown" />
62+
<selectOption selector="{{ProductDesignSection.LayoutDropdown}}" userInput="{{PageBuilderFullWidthLayout.product}}" stepKey="selectProductFullWidthLayout"/>
5863
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct"/>
5964
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="assertSaveMessageSuccess"/>
6065
<amOnPage url="{{_defaultProduct.urlKey}}.html" stepKey="navigateToProductPage"/>

0 commit comments

Comments
 (0)