|
22 | 22 | <createData entity="_defaultProduct" stepKey="createSimpleProduct">
|
23 | 23 | <requiredEntity createDataKey="createCategory"/>
|
24 | 24 | </createData>
|
| 25 | + <createData entity="_defaultProduct" stepKey="createSimpleProduct2"> |
| 26 | + <requiredEntity createDataKey="createCategory"/> |
| 27 | + </createData> |
25 | 28 | <!-- Create the configurable product based on the data in the /data folder -->
|
26 | 29 | <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct">
|
27 | 30 | <requiredEntity createDataKey="createCategory"/>
|
|
73 | 76 | </before>
|
74 | 77 | <after>
|
75 | 78 | <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>
|
| 79 | + <deleteData createDataKey="createSimpleProduct2" stepKey="deleteProduct2"/> |
76 | 80 | <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
|
77 | 81 | <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/>
|
78 | 82 | <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/>
|
79 | 83 | <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/>
|
80 | 84 | <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
|
| 85 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductListing"/> |
| 86 | + <actionGroup ref="resetProductGridToDefaultView" stepKey="resetGridToDefaultKeywordSearch"/> |
81 | 87 | </after>
|
82 |
| - <!-- Step 1: Add simple product to shopping cart --> |
| 88 | + <!-- Step 1: Add simple product to shopping cart --> |
83 | 89 | <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.name$$)}}" stepKey="amOnSimpleProductPage"/>
|
84 |
| - <waitForPageLoad stepKey="waitForPageLoad"/> |
85 | 90 | <actionGroup ref="AddSimpleProductToCart" stepKey="cartAddSimpleProductToCart">
|
86 | 91 | <argument name="product" value="$$createSimpleProduct$$"/>
|
87 | 92 | <argument name="productCount" value="1"/>
|
88 | 93 | </actionGroup>
|
89 | 94 | <amOnPage url="{{StorefrontProductPage.url($$createConfigProduct.custom_attributes[url_key]$$)}}" stepKey="goToConfigProductPage"/>
|
90 |
| - <waitForPageLoad stepKey="waitForStoreFrontLoad"/> |
91 | 95 | <selectOption selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" userInput="$$getConfigAttributeOption1.value$$" stepKey="selectOption"/>
|
92 | 96 | <click selector="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="clickAddToCart" />
|
93 | 97 | <waitForElement selector="{{StorefrontMessagesSection.messageProductAddedToCart($$createConfigProduct.name$$)}}" time="30" stepKey="assertMessage"/>
|
|
96 | 100 | <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
|
97 | 101 | <!-- Find the first simple product that we just created using the product grid and go to its page-->
|
98 | 102 | <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/>
|
99 |
| - <waitForPageLoad stepKey="waitForAdminProductGridLoad"/> |
100 |
| - <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial"/> |
101 | 103 | <actionGroup ref="filterProductGridBySku" stepKey="findCreatedProduct">
|
102 | 104 | <argument name="product" value="$$createConfigChildProduct1$$"/>
|
103 | 105 | </actionGroup>
|
|
106 | 108 | <waitForPageLoad stepKey="waitForProductPageLoad"/>
|
107 | 109 | <!-- Disabled child configurable product -->
|
108 | 110 | <click selector="{{AdminProductFormSection.enableProductAttributeLabel}}" stepKey="clickDisableProduct"/>
|
109 |
| - <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct"/> |
110 |
| - <waitForPageLoad stepKey="waitForProductPageSaved"/> |
| 111 | + <actionGroup ref="saveProductForm" stepKey="clickSaveProduct"/> |
111 | 112 | <!-- Disabled simple product from grid -->
|
112 | 113 | <actionGroup ref="ChangeStatusProductUsingProductGridActionGroup" stepKey="disabledProductFromGrid">
|
113 | 114 | <argument name="product" value="$$createSimpleProduct$$"/>
|
114 | 115 | <argument name="status" value="Disable"/>
|
115 | 116 | </actionGroup>
|
116 | 117 | <closeTab stepKey="closeTab"/>
|
117 |
| - <!--Check cart--> |
| 118 | + <!-- Check cart --> |
118 | 119 | <reloadPage stepKey="reloadPage"/>
|
119 |
| - <waitForPageLoad stepKey="waitForCheckoutPageReload2"/> |
| 120 | + <waitForPageLoad stepKey="waitForCheckoutPageReload"/> |
120 | 121 | <click selector="{{StorefrontMiniCartSection.show}}" stepKey="clickMiniCart"/>
|
121 | 122 | <dontSeeElement selector="{{StorefrontMiniCartSection.quantity}}" stepKey="dontSeeCartItem"/>
|
| 123 | + <!-- Add simple product to shopping cart --> |
| 124 | + <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct2.name$$)}}" stepKey="amOnSimpleProductPage2"/> |
| 125 | + <actionGroup ref="AddSimpleProductToCart" stepKey="cartAddSimpleProductToCart2"> |
| 126 | + <argument name="product" value="$$createSimpleProduct2$$"/> |
| 127 | + <argument name="productCount" value="1"/> |
| 128 | + </actionGroup> |
| 129 | + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckoutCartPage"/> |
| 130 | + <!-- Disabled via admin panel --> |
| 131 | + <openNewTab stepKey="openNewTab2"/> |
| 132 | + <!-- Find the first simple product that we just created using the product grid and go to its page --> |
| 133 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage2"/> |
| 134 | + <actionGroup ref="filterProductGridBySku" stepKey="findCreatedProduct2"> |
| 135 | + <argument name="product" value="$$createSimpleProduct2$$"/> |
| 136 | + </actionGroup> |
| 137 | + <click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage2"/> |
| 138 | + <waitForPageLoad stepKey="waitForProductPageLoad2"/> |
| 139 | + <!-- Disabled simple product from grid --> |
| 140 | + <actionGroup ref="ChangeStatusProductUsingProductGridActionGroup" stepKey="disabledProductFromGrid2"> |
| 141 | + <argument name="product" value="$$createSimpleProduct2$$"/> |
| 142 | + <argument name="status" value="Disable"/> |
| 143 | + </actionGroup> |
| 144 | + <closeTab stepKey="closeTab2"/> |
| 145 | + <!--Check cart--> |
| 146 | + <reloadPage stepKey="reloadPage2"/> |
| 147 | + <waitForPageLoad stepKey="waitForCheckoutPageReload2"/> |
| 148 | + <click selector="{{StorefrontMiniCartSection.show}}" stepKey="clickMiniCart2"/> |
| 149 | + <dontSeeElement selector="{{StorefrontMiniCartSection.quantity}}" stepKey="dontSeeCartItem2"/> |
122 | 150 | </test>
|
123 | 151 | </tests>
|
0 commit comments