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