|
19 | 19 | <group value="configurable"/>
|
20 | 20 | <group value="product"/>
|
21 | 21 | </annotations>
|
| 22 | + |
| 23 | + <!-- Login as admin --> |
22 | 24 | <before>
|
23 | 25 | <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/>
|
24 | 26 | </before>
|
| 27 | + |
| 28 | + <!-- Delete Created Products And Category Then Logout --> |
25 | 29 | <after>
|
26 |
| - <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> |
| 30 | + <!-- Before deleting first found product of 4 products that have the same name starting, |
| 31 | + delete 3 virtual products of them --> |
| 32 | + <actionGroup ref="DeleteProductOnProductsGridPageByFilteredName" stepKey="deleteVirtualProduct1"> |
| 33 | + <argument name="product" value="colorProductAttribute1"/> |
| 34 | + </actionGroup> |
| 35 | + <actionGroup ref="DeleteProductOnProductsGridPageByFilteredName" stepKey="deleteVirtualProduct2"> |
| 36 | + <argument name="product" value="colorProductAttribute2"/> |
| 37 | + </actionGroup> |
| 38 | + <actionGroup ref="DeleteProductOnProductsGridPageByFilteredName" stepKey="deleteVirtualProduct3"> |
| 39 | + <argument name="product" value="colorProductAttribute3"/> |
| 40 | + </actionGroup> |
| 41 | + |
| 42 | + <!-- Delete actually configurable product --> |
| 43 | + <actionGroup ref="DeleteProductOnProductsGridPageByName" stepKey="deleteCreatedProducts"> |
| 44 | + <argument name="product" value="_defaultProduct"/> |
| 45 | + </actionGroup> |
| 46 | + |
| 47 | + <actionGroup ref="logout" stepKey="logout"/> |
27 | 48 | </after>
|
28 | 49 |
|
| 50 | + <!-- Create category --> |
29 | 51 | <amOnPage url="{{AdminCategoryPage.url}}" stepKey="amOnCategoryGridPage"/>
|
30 | 52 | <waitForPageLoad time="30" stepKey="waitForPageLoad1"/>
|
31 |
| - |
32 | 53 | <click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategory"/>
|
33 | 54 | <fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{_defaultCategory.name}}" stepKey="enterCategoryName"/>
|
34 | 55 | <click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="clickOnSeoSection"/>
|
35 | 56 | <fillField selector="{{AdminCategorySEOSection.UrlKeyInput}}" userInput="{{_defaultCategory.name_lwr}}" stepKey="enterUrlKey"/>
|
36 | 57 | <click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="clickOnSaveCategory"/>
|
37 | 58 | <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccessMessage"/>
|
38 | 59 |
|
| 60 | + <!-- Create configurable product... --> |
39 | 61 | <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="amOnProductGridPage"/>
|
40 | 62 | <waitForPageLoad time="30" stepKey="waitForPageLoad2"/>
|
41 | 63 | <click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="clickOnAddProductToggle"/>
|
|
49 | 71 | <click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSection"/>
|
50 | 72 | <fillField userInput="{{_defaultProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="fillUrlKey"/>
|
51 | 73 |
|
| 74 | + <!-- Create Product Attribute --> |
52 | 75 | <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickOnCreateConfigurations"/>
|
53 | 76 | <click selector="{{AdminCreateProductConfigurationsPanel.createNewAttribute}}" stepKey="clickOnNewAttribute"/>
|
54 | 77 | <switchToIFrame selector="{{AdminNewAttributePanel.newAttributeIFrame}}" stepKey="switchToNewAttributeIFrame"/>
|
55 | 78 | <fillField selector="{{AdminNewAttributePanel.defaultLabel}}" userInput="{{colorProductAttribute.default_label}}" stepKey="fillDefaultLabel"/>
|
56 | 79 | <click selector="{{AdminNewAttributePanel.saveAttribute}}" stepKey="clickOnNewAttributePanel"/>
|
57 | 80 |
|
| 81 | + <!-- Choose Created Attribute --> |
58 | 82 | <switchToIFrame stepKey="switchOutOfIFrame"/>
|
59 | 83 | <click selector="{{AdminCreateProductConfigurationsPanel.filters}}" stepKey="clickOnFilters"/>
|
60 | 84 | <fillField userInput="{{colorProductAttribute.default_label}}" selector="{{AdminCreateProductConfigurationsPanel.attributeCode}}" stepKey="fillFilterAttributeCodeField"/>
|
61 | 85 | <click selector="{{AdminCreateProductConfigurationsPanel.applyFilters}}" stepKey="clickApplyFiltersButton"/>
|
62 | 86 | <click selector="{{AdminCreateProductConfigurationsPanel.firstCheckbox}}" stepKey="clickOnFirstCheckbox"/>
|
63 | 87 | <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton1"/>
|
64 | 88 |
|
| 89 | + <!-- Create First Value for Attribute --> |
65 | 90 | <click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="clickOnCreateNewValue1"/>
|
66 | 91 | <fillField userInput="{{colorProductAttribute1.name}}" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="fillFieldForNewAttribute1"/>
|
67 | 92 | <click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="clickOnSaveNewAttribute1"/>
|
68 | 93 |
|
| 94 | + <!-- Create Second Value for Attribute --> |
69 | 95 | <click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="clickOnCreateNewValue2"/>
|
70 | 96 | <fillField userInput="{{colorProductAttribute2.name}}" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="fillFieldForNewAttribute2"/>
|
71 | 97 | <click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="clickOnSaveNewAttribute2"/>
|
72 | 98 |
|
| 99 | + <!-- Create Third Value for Attribute --> |
73 | 100 | <click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="clickOnCreateNewValue3"/>
|
74 | 101 | <fillField userInput="{{colorProductAttribute3.name}}" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="fillFieldForNewAttribute3"/>
|
75 | 102 | <click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="clickOnSaveNewAttribute3"/>
|
76 | 103 |
|
| 104 | + <!-- Select All Values and Go On--> |
77 | 105 | <click selector="{{AdminCreateProductConfigurationsPanel.selectAll}}" stepKey="clickOnSelectAll"/>
|
78 | 106 | <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton2"/>
|
79 | 107 |
|
| 108 | + <!-- Apply Unique Prices By Attribute To Each SKU --> |
80 | 109 | <click selector="{{AdminCreateProductConfigurationsPanel.applyUniquePricesByAttributeToEachSku}}" stepKey="clickOnApplyUniquePricesByAttributeToEachSku"/>
|
81 | 110 | <selectOption selector="{{AdminCreateProductConfigurationsPanel.selectAttribute}}" userInput="{{colorProductAttribute.default_label}}" stepKey="selectAttributes"/>
|
82 | 111 | <fillField selector="{{AdminCreateProductConfigurationsPanel.attribute1}}" userInput="{{colorProductAttribute1.price}}" stepKey="fillAttributePrice1"/>
|
83 | 112 | <fillField selector="{{AdminCreateProductConfigurationsPanel.attribute2}}" userInput="{{colorProductAttribute2.price}}" stepKey="fillAttributePrice2"/>
|
84 | 113 | <fillField selector="{{AdminCreateProductConfigurationsPanel.attribute3}}" userInput="{{colorProductAttribute3.price}}" stepKey="fillAttributePrice3"/>
|
85 | 114 |
|
| 115 | + <!-- Apply Unique Quantity to Each SKUs --> |
86 | 116 | <click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="clickOnApplySingleQuantityToEachSku"/>
|
87 | 117 | <fillField selector="{{AdminCreateProductConfigurationsPanel.quantity}}" userInput="1" stepKey="enterAttributeQuantity"/>
|
| 118 | + |
| 119 | + <!-- Finish Creating Configurations --> |
88 | 120 | <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton3"/>
|
89 | 121 | <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton4"/>
|
90 | 122 |
|
| 123 | + <!-- Save Product --> |
91 | 124 | <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickOnSaveButton2"/>
|
92 | 125 | <click selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" stepKey="clickOnConfirmInPopup"/>
|
93 | 126 |
|
94 |
| - <seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSaveProductMessage"/> |
| 127 | + <!-- Make Sure Product Is Created --> |
| 128 | + <seeElement selector="{{AdminMessagesSection.success}}" stepKey="seeSaveProductMessage"/> |
95 | 129 | <seeInTitle userInput="{{_defaultProduct.name}}" stepKey="seeProductNameInTitle"/>
|
96 | 130 |
|
| 131 | + <!-- Make Sure Configurations Created Correctly --> |
97 | 132 | <seeNumberOfElements selector="{{AdminProductFormConfigurationsSection.currentVariationsRows}}" userInput="3" stepKey="seeNumberOfRows"/>
|
98 | 133 | <see selector="{{AdminProductFormConfigurationsSection.currentVariationsNameCells}}" userInput="{{colorProductAttribute1.name}}" stepKey="seeAttributeName1InField"/>
|
99 | 134 | <see selector="{{AdminProductFormConfigurationsSection.currentVariationsNameCells}}" userInput="{{colorProductAttribute2.name}}" stepKey="seeAttributeName2InField"/>
|
|
106 | 141 | <see selector="{{AdminProductFormConfigurationsSection.currentVariationsPriceCells}}" userInput="{{colorProductAttribute3.price}}" stepKey="seeUniquePrice3InField"/>
|
107 | 142 | <see selector="{{AdminProductFormConfigurationsSection.currentVariationsQuantityCells}}" userInput="{{colorProductAttribute.attribute_quantity}}" stepKey="seeQuantityInField"/>
|
108 | 143 |
|
| 144 | + <!-- Go To StoreFront --> |
109 | 145 | <amOnPage url="/" stepKey="amOnStorefront"/>
|
110 | 146 | <waitForPageLoad time="30" stepKey="waitForPageLoad3"/>
|
111 | 147 |
|
| 148 | + <!-- Go To Just Created Category --> |
112 | 149 | <click userInput="{{_defaultCategory.name}}" stepKey="clickOnCategoryName"/>
|
113 | 150 | <waitForPageLoad time="30" stepKey="waitForPageLoad4"/>
|
114 | 151 |
|
| 152 | + <!-- Check Product Presence And Go Into The Product View --> |
115 | 153 | <see userInput="{{_defaultProduct.name}}" stepKey="assertProductPresent"/>
|
116 | 154 | <see userInput="{{colorProductAttribute1.price}}" stepKey="assertProductPricePresent"/>
|
117 | 155 | <click userInput="{{_defaultProduct.name}}" stepKey="clickOnProductName"/>
|
118 | 156 | <waitForPageLoad time="30" stepKey="waitForPageLoad5"/>
|
119 | 157 |
|
| 158 | + <!-- Check Page's Title, Product Name, Price, Sku --> |
120 | 159 | <seeInTitle userInput="{{_defaultProduct.name}}" stepKey="assertProductNameTitle"/>
|
121 | 160 | <see userInput="{{_defaultProduct.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="assertProductName"/>
|
122 | 161 | <see userInput="{{colorProductAttribute1.price}}" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="assertProductPrice"/>
|
123 | 162 | <see userInput="{{_defaultProduct.sku}}" selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="assertProductSku"/>
|
124 | 163 |
|
| 164 | + <!-- Check Options --> |
125 | 165 | <see selector="{{StorefrontProductInfoMainSection.productAttributeTitle1}}" userInput="{{colorProductAttribute.default_label}}" stepKey="seeColorAttributeName1"/>
|
126 | 166 | <see selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" userInput="{{colorProductAttribute1.name}}" stepKey="seeInDropDown1"/>
|
127 | 167 | <see selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" userInput="{{colorProductAttribute2.name}}" stepKey="seeInDropDown2"/>
|
|
0 commit comments