|
20 | 20 | <before>
|
21 | 21 | <!-- Login as Admin -->
|
22 | 22 | <actionGroup ref="LoginAsAdmin" stepKey="loginToAdminPanel"/>
|
| 23 | + |
23 | 24 | <!-- Create Default Category -->
|
24 | 25 | <createData entity="_defaultCategory" stepKey="createCategory"/>
|
| 26 | + |
25 | 27 | <!-- Create an attribute with three options to be used in the first child product -->
|
26 | 28 | <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/>
|
27 | 29 | <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1">
|
|
33 | 35 | <createData entity="productAttributeOption3" stepKey="createConfigProductAttributeOption3">
|
34 | 36 | <requiredEntity createDataKey="createConfigProductAttribute"/>
|
35 | 37 | </createData>
|
| 38 | + |
36 | 39 | <!-- Add the attribute just created to default attribute set -->
|
37 | 40 | <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet">
|
38 | 41 | <requiredEntity createDataKey="createConfigProductAttribute"/>
|
39 | 42 | </createData>
|
| 43 | + |
40 | 44 | <!-- Get the first option of the attribute created -->
|
41 | 45 | <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1">
|
42 | 46 | <requiredEntity createDataKey="createConfigProductAttribute"/>
|
43 | 47 | </getData>
|
| 48 | + |
44 | 49 | <!-- Get the second option of the attribute created -->
|
45 | 50 | <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2">
|
46 | 51 | <requiredEntity createDataKey="createConfigProductAttribute"/>
|
47 | 52 | </getData>
|
| 53 | + |
48 | 54 | <!-- Get the third option of the attribute created -->
|
49 | 55 | <getData entity="ProductAttributeOptionGetter" index="3" stepKey="getConfigAttributeOption3">
|
50 | 56 | <requiredEntity createDataKey="createConfigProductAttribute"/>
|
51 | 57 | </getData>
|
| 58 | + |
52 | 59 | <!-- Create Configurable product -->
|
53 | 60 | <createData entity="BaseConfigurableProduct" stepKey="createConfigProduct">
|
54 | 61 | <requiredEntity createDataKey="createCategory"/>
|
55 | 62 | </createData>
|
| 63 | + |
56 | 64 | <!-- Create a simple product and give it the attribute with the first option -->
|
57 | 65 | <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1">
|
58 | 66 | <requiredEntity createDataKey="createConfigProductAttribute"/>
|
59 | 67 | <requiredEntity createDataKey="getConfigAttributeOption1"/>
|
60 | 68 | <field key="price">10.00</field>
|
61 | 69 | </createData>
|
| 70 | + |
62 | 71 | <!--Create a simple product and give it the attribute with the second option -->
|
63 | 72 | <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2">
|
64 | 73 | <requiredEntity createDataKey="createConfigProductAttribute"/>
|
65 | 74 | <requiredEntity createDataKey="getConfigAttributeOption2"/>
|
66 | 75 | <field key="price">20.00</field>
|
67 | 76 | </createData>
|
| 77 | + |
68 | 78 | <!--Create a simple product and give it the attribute with the Third option -->
|
69 | 79 | <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct3">
|
70 |
| - <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 80 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
71 | 81 | <requiredEntity createDataKey="getConfigAttributeOption3"/>
|
72 | 82 | <field key="price">30.00</field>
|
73 | 83 | </createData>
|
| 84 | + |
74 | 85 | <!-- Create the configurable product -->
|
75 | 86 | <createData entity="ConfigurableProductThreeOptions" stepKey="createConfigProductOption">
|
76 | 87 | <requiredEntity createDataKey="createConfigProduct"/>
|
|
79 | 90 | <requiredEntity createDataKey="getConfigAttributeOption2"/>
|
80 | 91 | <requiredEntity createDataKey="getConfigAttributeOption3"/>
|
81 | 92 | </createData>
|
| 93 | + |
82 | 94 | <!-- Add the first simple product to the configurable product -->
|
83 | 95 | <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1">
|
84 | 96 | <requiredEntity createDataKey="createConfigProduct"/>
|
85 | 97 | <requiredEntity createDataKey="createConfigChildProduct1"/>
|
86 | 98 | </createData>
|
| 99 | + |
87 | 100 | <!-- Add the second simple product to the configurable product -->
|
88 | 101 | <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2">
|
89 | 102 | <requiredEntity createDataKey="createConfigProduct"/>
|
90 | 103 | <requiredEntity createDataKey="createConfigChildProduct2"/>
|
91 | 104 | </createData>
|
| 105 | + |
92 | 106 | <!-- Add the third simple product to the configurable product -->
|
93 | 107 | <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild3">
|
94 | 108 | <requiredEntity createDataKey="createConfigProduct"/>
|
|
105 | 119 | <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteAttribute"/>
|
106 | 120 | <actionGroup ref="logout" stepKey="logout"/>
|
107 | 121 | </after>
|
| 122 | + |
108 | 123 | <!-- Open Product in Store Front Page -->
|
109 | 124 | <amOnPage url="$$createConfigProduct.sku$$.html" stepKey="openProductInStoreFront"/>
|
110 | 125 | <waitForPageLoad stepKey="waitForProductToLoad"/>
|
| 126 | + |
111 | 127 | <!-- Verify category,Configurable product and initial price -->
|
112 | 128 | <seeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="seeCategoryInFrontPage"/>
|
113 | 129 | <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="$$createConfigProduct.name$$" stepKey="seeProductNameInStoreFront"/>
|
114 | 130 | <see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$$createConfigChildProduct1.price$$" stepKey="seeInitialPriceInStoreFront"/>
|
115 | 131 | <see selector="{{StorefrontProductInfoMainSection.productSku}}" userInput="$$createConfigProduct.sku$$" stepKey="seeProductSkuInStoreFront"/>
|
116 | 132 | <see selector="{{StorefrontProductInfoMainSection.productStockStatus}}" userInput="In Stock" stepKey="seeProductStatusInStoreFront"/>
|
| 133 | + |
117 | 134 | <!-- Verify First Child Product attribute option is displayed -->
|
118 | 135 | <see selector="{{StorefrontProductInfoMainSection.productOptionSelect($$createConfigProductAttribute.default_value$$)}}" userInput="$$getConfigAttributeOption1.label$$" stepKey="seeOption1"/>
|
| 136 | + |
119 | 137 | <!-- Select product Attribute option1, option2 and option3 and verify changes in the price -->
|
120 | 138 | <selectOption selector="{{StorefrontProductInfoMainSection.productOptionSelect($$createConfigProductAttribute.default_value$$)}}" userInput="$$getConfigAttributeOption1.label$$" stepKey="selectOption1"/>
|
121 | 139 | <see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$$createConfigChildProduct1.price$$" stepKey="seeChildProduct1PriceInStoreFront"/>
|
122 | 140 | <selectOption selector="{{StorefrontProductInfoMainSection.productOptionSelect($$createConfigProductAttribute.default_value$$)}}" userInput="$$getConfigAttributeOption2.label$$" stepKey="selectOption2"/>
|
123 | 141 | <see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$$createConfigChildProduct2.price$$" stepKey="seeChildProduct2PriceInStoreFront"/>
|
124 | 142 | <selectOption selector="{{StorefrontProductInfoMainSection.productOptionSelect($$createConfigProductAttribute.default_value$$)}}" userInput="$$getConfigAttributeOption3.label$$" stepKey="selectOption3"/>
|
125 | 143 | <see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$$createConfigChildProduct3.price$$" stepKey="seeChildProduct3PriceInStoreFront"/>
|
| 144 | + |
126 | 145 | <!-- Open Product Index Page and Filter First Child product -->
|
127 | 146 | <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
|
128 | 147 | <waitForPageLoad stepKey="waitForProductIndexPageToLoad"/>
|
|
131 | 150 | </actionGroup>
|
132 | 151 | <click selector="{{AdminProductGridFilterSection.nthRow('1')}}" stepKey="selectFirstRow"/>
|
133 | 152 | <waitForPageLoad stepKey="waitForProductPageToLoad"/>
|
| 153 | + |
134 | 154 | <!-- Disable the product -->
|
135 | 155 | <click selector="{{AdminProductFormSection.enableProductLabel}}" stepKey="disableProduct"/>
|
136 | 156 | <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickOnSaveButton"/>
|
137 | 157 | <waitForLoadingMaskToDisappear stepKey="waitForLoading"/>
|
138 | 158 | <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/>
|
| 159 | + |
139 | 160 | <!-- Open Product Store Front Page -->
|
140 | 161 | <amOnPage url="$$createConfigProduct.sku$$.html" stepKey="openProductInStoreFront1"/>
|
141 | 162 | <waitForPageLoad stepKey="waitForProductToLoad1"/>
|
| 163 | + |
142 | 164 | <!-- Verify category,configurable product and updated price -->
|
143 | 165 | <seeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="seeCategoryInFrontPage1"/>
|
144 | 166 | <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="$$createConfigProduct.name$$" stepKey="seeProductNameInStoreFront1"/>
|
145 | 167 | <see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$$createConfigChildProduct2.price$$" stepKey="seeUpdatedProductPriceInStoreFront"/>
|
146 | 168 | <see selector="{{StorefrontProductInfoMainSection.productSku}}" userInput="$$createConfigProduct.sku$$" stepKey="seeProductSkuInStoreFront1"/>
|
147 | 169 | <see selector="{{StorefrontProductInfoMainSection.productStockStatus}}" userInput="In Stock" stepKey="seeProductStatusInStoreFront1"/>
|
| 170 | + |
148 | 171 | <!-- Verify product Attribute Option1 is not displayed -->
|
149 | 172 | <dontSee selector="{{StorefrontProductInfoMainSection.productOptionSelect($$createConfigProductAttribute.default_value$$)}}" userInput="$$getConfigAttributeOption1.label$$" stepKey="dontSeeOption1"/>
|
| 173 | + |
150 | 174 | <!--Select product Attribute option2 and option3 and verify changes in the price -->
|
151 | 175 | <selectOption selector="{{StorefrontProductInfoMainSection.productOptionSelect($$createConfigProductAttribute.default_value$$)}}" userInput="$$getConfigAttributeOption2.label$$" stepKey="selectTheOption2"/>
|
152 | 176 | <see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$$createConfigChildProduct2.price$$" stepKey="seeSecondChildProductPriceInStoreFront"/>
|
|
0 commit comments