|
9 | 9 | <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
10 | 10 | xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
|
11 | 11 | <test name="AdminConfigDefaultCategoryLayoutFromConfigurationSettingTest">
|
| 12 | + <annotations> |
| 13 | + <features value="Catalog"/> |
| 14 | + <stories value="Default layout configuration MAGETWO-88793"/> |
| 15 | + <title value="Admin should be able to configure the default layout for Category Page from System Configuration"/> |
| 16 | + <description value="Admin should be able to configure the default layout for Category Page from System Configuration"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="MAGETWO-89024"/> |
| 19 | + <group value="category"/> |
| 20 | + </annotations> |
12 | 21 | <!-- PageBuilder is enabled so check default is full width -->
|
13 | 22 | <comment userInput="PageBuilder is enabled so check default is full width" stepKey="commentSeeCategoryFullWidth" before="seeNoLayoutUpdatesSelected" />
|
14 | 23 | <seeOptionIsSelected selector="{{DefaultLayoutsSection.categoryLayout}}" userInput="{{PageBuilderFullWidthLayout.category}}" stepKey="seeNoLayoutUpdatesSelected" />
|
15 | 24 | </test>
|
16 | 25 | <test name="AdminCreateCategoryWithPageBuilderDescriptionTest">
|
17 | 26 | <annotations>
|
18 | 27 | <features value="PageBuilder"/>
|
19 |
| - <stories value="Full Width Page Layout"/> |
| 28 | + <stories value="Page Layout"/> |
20 | 29 | <title value="Category description should display in full width"/>
|
21 | 30 | <description value="Category description should display in full width"/>
|
22 | 31 | <severity value="MAJOR"/>
|
|
27 | 36 | </annotations>
|
28 | 37 | <before>
|
29 | 38 | <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
|
| 39 | + <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage"/> |
| 40 | + <waitForPageLoad stepKey="waitForPageLoadCategoryPage"/> |
| 41 | + <actionGroup ref="CreateCategory" stepKey="createCategory"/> |
30 | 42 | </before>
|
31 | 43 | <after>
|
32 | 44 | <actionGroup ref="logout" stepKey="logout"/>
|
33 | 45 | </after>
|
34 |
| - <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage"/> |
35 |
| - <waitForElementVisible selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="waitForSubCategoryBtn"/> |
36 |
| - <click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategory"/> |
37 |
| - <fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{SimpleSubCategory.name}}" stepKey="enterCategoryName"/> |
38 |
| - <click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="openSEO"/> |
39 |
| - <fillField selector="{{AdminCategorySEOSection.UrlKeyInput}}" userInput="{{SimpleSubCategory.name_lwr}}" stepKey="enterURLKey"/> |
40 | 46 | <!-- Add PageBuilder description -->
|
41 | 47 | <comment userInput="Add PageBuilder description" stepKey="commentAddDescription"/>
|
42 | 48 | <click selector="{{AdminCategoryContentSection.sectionHeader}}" stepKey="openContentSection"/>
|
| 49 | + <waitForPageLoad stepKey="waitForPageLoadContentSection"/> |
43 | 50 | <waitForElementVisible selector="{{PageBuilderCatalog.openPageBuilder}}" stepKey="waitForPageBuilderBtn" />
|
44 | 51 | <see userInput="Edit with Page Builder" stepKey="seePageBuilderBtn"/>
|
45 | 52 | <click selector="{{PageBuilderCatalog.openPageBuilder}}" stepKey="clickOnPageBuilderBtn" />
|
| 53 | + <waitForPageLoad stepKey="waitForPageLoadPageBuilder"/> |
46 | 54 | <waitForElementVisible selector="{{PageBuilderPanel.generalGroup}}" stepKey="waiForPageBuilderVisible" />
|
47 | 55 | <seeElement selector="{{PageBuilderStage.stageWrapperFullScreen}}" stepKey="seePageBuilderFullSizeScreen" />
|
| 56 | + <!-- Set background color of row --> |
48 | 57 | <comment userInput="Set background color of row" stepKey="commentSetRowBackgroundColor"/>
|
49 | 58 | <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
|
50 | 59 | <argument name="contentType" value="PageBuilderRowContentType"/>
|
|
56 | 65 | <actionGroup ref="dragContentTypeToStage" stepKey="dragHeadingOntoStage">
|
57 | 66 | <argument name="contentType" value="PageBuilderHeadingContentType"/>
|
58 | 67 | </actionGroup>
|
| 68 | + <!-- Add heading to stage --> |
59 | 69 | <comment userInput="Add heading to stage" stepKey="commentAddHeadingToStage"/>
|
60 | 70 | <actionGroup ref="enterHeadingOnStage" stepKey="enterHeadingOnStage">
|
61 | 71 | <argument name="headingText" value="PageBuilderHeadingTextProperty"/>
|
62 | 72 | </actionGroup>
|
63 | 73 | <click selector="{{PageBuilderStage.exitFullScreen}}" stepKey="exitPageBuilderFullScreen" />
|
| 74 | + <waitForPageLoad stepKey="waitForPageLoadExitFullScreen"/> |
64 | 75 | <!-- Use Full Width layout -->
|
65 | 76 | <comment userInput="Set Layout to Category - Full Width" stepKey="commentSetLayout"/>
|
66 |
| - <click selector="{{CategoryDesignSection.DesignTab}}" stepKey="clickOnDesignTab"/> |
67 |
| - <waitForElementVisible selector="{{CategoryDesignSection.LayoutDropdown}}" stepKey="waitForLayoutDropDown" /> |
68 |
| - <selectOption selector="{{CategoryDesignSection.LayoutDropdown}}" userInput="{{PageBuilderFullWidthLayout.category}}" stepKey="selectCategoryFullWidthLayout"/> |
| 77 | + <actionGroup ref="setLayout" stepKey="setFullWidthLayout"> |
| 78 | + <argument name="designSection" value="CategoryDesignSection"/> |
| 79 | + <argument name="layoutOption" value="PageBuilderFullWidthLayout.category"/> |
| 80 | + </actionGroup> |
69 | 81 | <click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategory"/>
|
70 |
| - <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccess"/> |
71 |
| - <!-- Literal URL below, need to refactor line + StorefrontCategoryPage when support for variable URL is implemented--> |
72 |
| - <amOnPage url="/{{SimpleSubCategory.name_lwr}}.html" stepKey="goToCategoryFrontPage"/> |
73 |
| - <seeInTitle userInput="{{SimpleSubCategory.name}}" stepKey="assertTitle"/> |
74 |
| - <see selector="{{StorefrontCategoryMainSection.CategoryTitle}}" userInput="{{SimpleSubCategory.name_lwr}}" stepKey="assertInfo1"/> |
75 |
| - <!-- Check that description is full width --> |
76 |
| - <comment userInput="Check that description is full width" stepKey="commentSeeDescriptionFullWidth"/> |
77 |
| - <executeJS function="return document.querySelector('[data-role=row]').clientWidth" stepKey="rowWidth"/> |
78 |
| - <executeJS function="return document.querySelector('[class=page-wrapper]').clientWidth" stepKey="pageWidth"/> |
79 |
| - <assertEquals expected="pageWidth" expectedType="variable" actual="rowWidth" actualType="variable" stepKey="assertRowWidth100Percent" /> |
| 82 | + <waitForPageLoad stepKey="waitForPageLoadSaveCategory"/> |
| 83 | + <waitForElementVisible selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccess"/> |
| 84 | + <!-- Check that description is full width on storefront--> |
| 85 | + <comment userInput="Check that description is full width on storefront" stepKey="commentSeeDescriptionFullWidth"/> |
| 86 | + <actionGroup ref="CheckCategoryOnStorefront" stepKey="checkCategoryOnStorefront"/> |
| 87 | + <actionGroup ref="verifyFullWidthLayout" stepKey="verifyFullWidthLayout"/> |
80 | 88 | </test>
|
81 | 89 | </tests>
|
0 commit comments