|
7 | 7 | -->
|
8 | 8 |
|
9 | 9 | <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
10 |
| - xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> |
11 | 11 | <!--Navigate to create product page from product grid page-->
|
12 | 12 | <actionGroup name="goToCreateProductPage">
|
13 | 13 | <arguments>
|
|
97 | 97 | <argument name="website"/>
|
98 | 98 | </arguments>
|
99 | 99 | <scrollTo selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="scrollToWebsites"/>
|
100 |
| - <click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="clickToOpenProductInWebsite"/> |
| 100 | + <conditionalClick selector="{{ProductInWebsitesSection.sectionHeader}}" dependentSelector="{{ProductInWebsitesSection.website(website.name)}}" visible="false" stepKey="clickToOpenProductInWebsite"/> |
101 | 101 | <waitForPageLoad stepKey="waitForPageOpened"/>
|
102 | 102 | <click selector="{{ProductInWebsitesSection.website(website.name)}}" stepKey="selectWebsite"/>
|
103 | 103 | <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct"/>
|
104 |
| - <waitForPageLoad time='60' stepKey="waitForPageOpened1"/> |
105 | 104 | </actionGroup>
|
106 | 105 |
|
107 | 106 | <actionGroup name="ProductSetAdvancedPricing">
|
|
149 | 148 | </arguments>
|
150 | 149 | <scrollTo selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="scrollToWebsites"/>
|
151 | 150 | <click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="clickToOpenProductInWebsite"/>
|
152 |
| - <waitForPageLoad stepKey="waitForPageOpened"/> |
153 | 151 | <checkOption selector="{{ProductInWebsitesSection.website(website)}}" stepKey="selectWebsite"/>
|
154 | 152 | </actionGroup>
|
155 | 153 |
|
|
169 | 167 | <waitForPageLoad stepKey="waitForPageLoad"/>
|
170 | 168 | <dontSeeElement selector="{{AdminProductImagesSection.imageFile(image.filename)}}" stepKey="seeImage"/>
|
171 | 169 | </actionGroup>
|
| 170 | + |
| 171 | + <!--Check tier price with a discount percentage on product--> |
| 172 | + <actionGroup name="AssertDiscountsPercentageOfProduct"> |
| 173 | + <arguments> |
| 174 | + <argument name="amount" type="string" defaultValue="45"/> |
| 175 | + </arguments> |
| 176 | + <click selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="clickOnAdvancedPricingButton"/> |
| 177 | + <waitForElementVisible selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" stepKey="waitForCustomerGroupPriceAddButton"/> |
| 178 | + <grabValueFrom selector="{{AdminProductFormAdvancedPricingSection.productTierPricePercentageValuePriceInput('0')}}" stepKey="grabProductTierPriceInput"/> |
| 179 | + <assertEquals stepKey="assertProductTierPriceInput"> |
| 180 | + <expectedResult type="string">{{amount}}</expectedResult> |
| 181 | + <actualResult type="string">$grabProductTierPriceInput</actualResult> |
| 182 | + </assertEquals> |
| 183 | + </actionGroup> |
| 184 | + |
172 | 185 | <actionGroup name="CreatedProductConnectToWebsite">
|
173 | 186 | <arguments>
|
174 | 187 | <argument name="website"/>
|
|
188 | 201 | <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct"/>
|
189 | 202 | <see selector="{{AdminMessagesSection.success}}" userInput="You saved the product." stepKey="seeSaveConfirmation"/>
|
190 | 203 | </actionGroup>
|
| 204 | + |
| 205 | + <!--Create simple product and assign to category in Admin--> |
| 206 | + <actionGroup name="AdminCreateSimpleProductAndAssignToCategory"> |
| 207 | + <arguments> |
| 208 | + <argument name="category"/> |
| 209 | + <argument name="simpleProduct"/> |
| 210 | + </arguments> |
| 211 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> |
| 212 | + <click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="clickAddProductDropdown"/> |
| 213 | + <click selector="{{AdminProductGridActionSection.addSimpleProduct}}" stepKey="clickAddSimpleProduct"/> |
| 214 | + <fillField userInput="{{simpleProduct.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="fillName"/> |
| 215 | + <fillField userInput="{{simpleProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="fillSKU"/> |
| 216 | + <fillField userInput="{{simpleProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="fillPrice"/> |
| 217 | + <fillField userInput="{{simpleProduct.quantity}}" selector="{{AdminProductFormSection.productQuantity}}" stepKey="fillQuantity"/> |
| 218 | + <searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[{{category.name}}]" stepKey="searchAndSelectCategory"/> |
| 219 | + <click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSection"/> |
| 220 | + <fillField userInput="{{simpleProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="fillUrlKey"/> |
| 221 | + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct"/> |
| 222 | + <seeElement selector="{{AdminMessagesSection.success}}" stepKey="assertSaveMessageSuccess"/> |
| 223 | + <seeInField userInput="{{simpleProduct.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="assertFieldName"/> |
| 224 | + <seeInField userInput="{{simpleProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="assertFieldSku"/> |
| 225 | + <seeInField userInput="{{simpleProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="assertFieldPrice"/> |
| 226 | + <click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSectionAssert"/> |
| 227 | + <seeInField userInput="{{simpleProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="assertFieldUrlKey"/> |
| 228 | + </actionGroup> |
191 | 229 | </actionGroups>
|
0 commit comments