|
27 | 27 |
|
28 | 28 | </before>
|
29 | 29 | <after>
|
30 |
| - <!--Delete created entity |
31 |
| - <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> --> |
32 |
| - |
33 |
| - <!-- <actionGroup ref="DeleteProductAttributeActionGroup" stepKey="deleteCreatedAttribute"> |
34 |
| - <argument name="ProductAttribute" value="newProductAttribute"/> |
35 |
| - </actionGroup> --> |
| 30 | + <!-- delete category --> |
| 31 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 32 | + <!-- delete created product attribute --> |
| 33 | + <actionGroup ref="DeleteProductAttributeActionGroup" stepKey="deleteCreatedAttribute"> |
| 34 | + <argument name="ProductAttribute" value="newProductAttribute"/> |
| 35 | + </actionGroup> |
36 | 36 |
|
37 | 37 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
|
38 | 38 | </after>
|
|
48 | 48 | <argument name="categoryName" value="$createCategory.name$"/>
|
49 | 49 | </actionGroup>
|
50 | 50 |
|
51 |
| - <!-- Step 6 --> |
52 |
| - <click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickOnAddAttribute"/> |
53 |
| - <waitForPageLoad stepKey="waitForAttributePageToLoad"/> |
54 |
| - <click selector="{{AdminProductFormSection.createNewAttributeBtn}}" stepKey="clickCreateNewAttributeButton"/> |
55 |
| - <waitForPageLoad stepKey="waitForNewAttributePageToLoad"/> |
56 |
| - <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.defaultLabel}}" stepKey="waitForDefaultLabelToBeVisible"/> |
57 |
| - <fillField selector="{{AdminCreateNewProductAttributeSection.defaultLabel}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="fillAttributeLabel"/> |
58 |
| - <selectOption selector="{{AdminCreateNewProductAttributeSection.inputType}}" userInput="Dropdown" stepKey="selectInputType"/> |
59 |
| - <checkOption selector="{{AdminCreateNewProductAttributeSection.isRequired}}" stepKey="enableIsRequiredOption"/> |
| 51 | + <!-- Create New Product Attribute --> |
| 52 | + <actionGroup ref="AdminStartCreateProductAttributeOnProductPageActionGroup" stepKey="createDropdownAttribute"> |
| 53 | + <argument name="attributeCode" value="{{newProductAttribute.attribute_code}}" /> |
| 54 | + <argument name="attributeLabel" value="{{ProductAttributeFrontendLabel.label}}" /> |
| 55 | + <argument name="inputType" value="Dropdown" /> |
| 56 | + </actionGroup> |
60 | 57 |
|
| 58 | + |
| 59 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.isRequired}}" stepKey="enableIsRequiredOption"/> |
61 | 60 | <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.addValue}}" stepKey="waitForAddValueButtonToVisible"/>
|
62 | 61 | <click selector="{{AdminCreateNewProductAttributeSection.addValue}}" stepKey="clickOnAddValueButton"/>
|
| 62 | + |
| 63 | + <!-- Adding the values in the grid --> |
63 | 64 | <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.defaultStoreView('0')}}" stepKey="waitForDefaultStoreViewToVisible"/>
|
64 | 65 | <fillField selector="{{AdminCreateNewProductAttributeSection.defaultStoreView('0')}}" userInput="value 1" stepKey="fillDefaultStoreView"/>
|
65 | 66 | <fillField selector="{{AdminCreateNewProductAttributeSection.adminOption('0')}}" userInput="value 1 admin" stepKey="fillAdminField"/>
|
66 | 67 | <checkOption selector="{{AdminCreateNewProductAttributeSection.defaultRadioButton('1')}}" stepKey="selectRadioButton"/>
|
67 |
| - |
68 | 68 | <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.addValue}}" stepKey="waitForAddValueButtonToVisible2"/>
|
69 | 69 | <click selector="{{AdminCreateNewProductAttributeSection.addValue}}" stepKey="clickOnAddValueButton2"/>
|
70 | 70 | <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.defaultStoreView('1')}}" stepKey="waitForDefaultStoreViewToVisible2"/>
|
71 | 71 | <fillField selector="{{AdminCreateNewProductAttributeSection.defaultStoreView('1')}}" userInput="value 2" stepKey="fillDefaultStoreView2"/>
|
72 | 72 | <fillField selector="{{AdminCreateNewProductAttributeSection.adminOption('1')}}" userInput="value 2 admin" stepKey="fillAdminField2"/>
|
73 | 73 |
|
74 |
| - |
75 |
| - |
76 |
| - <click selector="{{AdminCreateNewProductAttributeSection.advancedAttributeProperties}}" stepKey="clickOnAdvancedAttributeProperties"/> |
77 |
| - <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.attributeCode}}" stepKey="waitForAttributeCodeToVisible"/> |
78 |
| - <scrollTo selector="{{AdminCreateNewProductAttributeSection.attributeCode}}" stepKey="scrollToAttributeCode"/> |
79 |
| - <fillField selector="{{AdminCreateNewProductAttributeSection.attributeCode}}" userInput="{{newProductAttribute.attribute_code}}" stepKey="fillAttributeCode"/> |
80 |
| - |
81 |
| - <scrollTo selector="{{AdminCreateNewProductAttributeSection.advancedAttributeProperties}}" stepKey="scrollToAdvancedAttributeProperties"/> |
82 |
| - <click selector="{{AdminCreateNewProductAttributeSection.advancedAttributeProperties}}" stepKey="clickOnAdvancedAttributeProperties1"/> |
| 74 | + <!-- Adding the values to the storefront properties --> |
83 | 75 | <scrollTo selector="{{AdminCreateNewProductAttributeSection.storefrontProperties}}" stepKey="scrollToStorefrontProperties"/>
|
84 | 76 | <click selector="{{AdminCreateNewProductAttributeSection.storefrontProperties}}" stepKey="clickOnStorefrontProperties"/>
|
85 | 77 | <waitForPageLoad stepKey="waitForStoreFrontToLoad"/>
|
86 |
| - |
87 |
| - |
88 | 78 | <scrollTo stepKey="scroll1" selector="{{AdminCreateNewProductAttributeSection.sortProductListing}}" x="0" y="-80"/>
|
89 | 79 | <checkOption selector="{{AdminCreateNewProductAttributeSection.inSearch}}" stepKey="enableInSearchOption"/>
|
90 | 80 | <checkOption selector="{{AdminCreateNewProductAttributeSection.advancedSearch}}" stepKey="enableAdvancedSearch"/>
|
91 | 81 | <checkOption selector="{{AdminCreateNewProductAttributeSection.isComparable}}" stepKey="enableIsUComparableption"/>
|
92 | 82 |
|
93 |
| - <!-- Step 7 --> |
| 83 | + <!-- Save created Attribute --> |
94 | 84 | <click selector="{{AdminCreateNewProductAttributeSection.saveAttribute}}" stepKey="clickOnSaveAttribute"/>
|
95 | 85 | <waitForPageLoad stepKey="waitForAttributeToSave"/>
|
96 | 86 |
|
97 |
| - |
98 |
| - <!--Step 8: Verify product attribute added in product form --> |
99 |
| - <!-- <actionGroup ref="AdminAssertProductAttributeOnProductEditPageActionGroup" stepKey="adminProductAssertAttribute"> |
100 |
| - <argument name="attributeLabel" value="{{ProductAttributeFrontendLabel.label}}"/> |
101 |
| - <argument name="attributeCode" value="{{newProductAttribute.attribute_code}}"/> |
102 |
| - </actionGroup> --> |
103 |
| - |
104 |
| - |
| 87 | + <!-- Verify product attribute added in product form --> |
105 | 88 | <scrollTo selector="{{AdminProductFormSection.contentTab}}" stepKey="scrollToContentTab"/>
|
106 | 89 | <waitForElementVisible selector="{{AdminProductFormSection.attributeTab}}" stepKey="waitForAttributeToVisible"/>
|
107 | 90 | <click selector="{{AdminProductFormSection.attributeTab}}" stepKey="clickOnAttribute"/>
|
108 |
| - <seeElement selector="{{AdminProductFormSection.attributeLabelByText(ProductAttributeFrontendLabel.label)}}" stepKey="seeAttributeLabelInProductForm"/> |
109 |
| - <seeElement selector="{{AdminProductFormSection.newAddedAttribute(newProductAttribute.attribute_code)}}" stepKey="seeAttributeCodeInProductForm"/> |
| 91 | + <seeElement selector="{{AdminProductFormSection.attributeRequiredLabelText(ProductAttributeFrontendLabel.label)}}" stepKey="seeAttributeLabelInProductForm"/> |
| 92 | + <seeElement selector="{{AdminProductFormSection.newAddedAttributeValue('value 1 admin')}}" stepKey="seeAttributeValue"/> |
110 | 93 |
|
| 94 | + <!-- Save a Product --> |
111 | 95 | <actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveTheProduct"/>
|
112 | 96 | <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/>
|
113 | 97 |
|
| 98 | + <!--Click on Go Back button --> |
| 99 | + <click selector="{{AdminProductFormActionSection.backButton}}" stepKey="clickBackToGridSimple"/> |
114 | 100 |
|
| 101 | + <!-- Select created attribute as an column --> |
| 102 | + <actionGroup ref="ToggleAdminProductGridColumnsDropdownActionGroup" stepKey="openColumnsDropdown"/> |
| 103 | + <actionGroup ref="CheckAdminProductGridColumnOptionActionGroup" stepKey="checkCreatedAttributeColumn"> |
| 104 | + <argument name="optionName" value="{{ProductAttributeFrontendLabel.label}}"/> |
| 105 | + </actionGroup> |
| 106 | + <actionGroup ref="ToggleAdminProductGridColumnsDropdownActionGroup" stepKey="closeColumnsDropdown"/> |
| 107 | + |
| 108 | + <!-- Asserting the value of the created column --> |
| 109 | + <actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeCreatedAttributeColumn"> |
| 110 | + <argument name="row" value="1"/> |
| 111 | + <argument name="column" value="{{ProductAttributeFrontendLabel.label}}"/> |
| 112 | + <argument name="value" value="value 1 admin"/> |
| 113 | + </actionGroup> |
115 | 114 |
|
| 115 | + <!--Verify Product Attribute is present in Category Store Front Page --> |
| 116 | + <amOnPage url="$$createCategory.custom_attributes[url_key]$$.html" stepKey="goToStorefrontPage"/> |
| 117 | + <waitForPageLoad stepKey="waitForProductFrontPageToLoad"/> |
| 118 | + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName(SimpleSubCategory.name)}}" stepKey="clickOnCategory"/> |
| 119 | + <waitForPageLoad stepKey="waitForCategoryPageToLoad"/> |
| 120 | + <click selector="{{StorefrontCategoryMainSection.productLink}}" stepKey="openSearchedProduct"/> |
| 121 | + <waitForPageLoad stepKey="waitForProductToLoad1"/> |
| 122 | + <scrollTo selector="{{StorefrontProductMoreInformationSection.moreInformationTextArea}}" stepKey="scrollToMoreInformation"/> |
| 123 | + <see selector="{{StorefrontProductMoreInformationSection.attributeLabel}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="seeAttributeLabel"/> |
| 124 | + <see selector="{{StorefrontProductMoreInformationSection.attributeValue}}" userInput="value 1" stepKey="seeAttributeValueOnStorefront"/> |
| 125 | + |
| 126 | + <!-- Return to catgeory page to assert the layered navigation --> |
| 127 | + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName(SimpleSubCategory.name)}}" stepKey="clickOnCategoryAgain"/> |
| 128 | + <waitForPageLoad stepKey="waitForCategoryPageToLoad2"/> |
| 129 | + <fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="{{SimpleProduct.name}}" stepKey="fillProductName"/> |
| 130 | + <waitForPageLoad stepKey="waitForSearchButtonEnabled"/> |
| 131 | + <click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextBoxButton"/> |
| 132 | + |
| 133 | + <!-- Assert that attribute values present in layered navigation --> |
| 134 | + <actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertAttributeWithOptionInLayeredNavigation"> |
| 135 | + <argument name="attributeLabel" value="{{ProductAttributeFrontendLabel.label}}"/> |
| 136 | + <argument name="attributeOptionLabel" value="value 11"/> |
| 137 | + </actionGroup> |
116 | 138 |
|
| 139 | + <!-- Click on the attribute --> |
| 140 | + <click selector="{{StorefrontLayeredNavigationSection.shoppingOptionsExpanded('value 1')}}" stepKey="clickOnAttributeValue"/> |
| 141 | + <seeElement selector="{{StorefrontLayeredNavigationSection.nowShoppingBy}}" stepKey="seeNowShoppingBy"/> |
| 142 | + <seeElement selector="{{StorefrontLayeredNavigationSection.actionRemove}}" stepKey="seeX"/> |
| 143 | + <seeElement selector="{{StorefrontLayeredNavigationSection.nowShoppingByAttribute(ProductAttributeFrontendLabel.label)}}" stepKey="seeNowShoppingByAttribute"/> |
| 144 | + <seeElement selector="{{StorefrontLayeredNavigationSection.nowShoppingByAttributeValue('value 1')}}" stepKey="seeNowShoppingByAttributeValue"/> |
117 | 145 |
|
118 | 146 | </test>
|
119 | 147 | </tests>
|
0 commit comments