|
26 | 26 | </createData>
|
27 | 27 | <createData entity="SimpleSubCategory" stepKey="categoryEntity"/>
|
28 | 28 | <actionGroup ref = "LoginAsAdmin" stepKey="loginAsAdmin"/>
|
29 |
| - <magentoCLI command="indexer:reindex" stepKey="reindex"/> |
| 29 | + |
| 30 | + <!-- TODO: Replace this with CliRunReindexUsingCronJobsActionGroup after MC-29943 delivered--> |
| 31 | + <magentoCLI command="indexer:reindex" arguments="catalogsearch_fulltext catalog_category_product" stepKey="reindexIndices"/> |
30 | 32 | </before>
|
31 | 33 |
|
32 | 34 | <after>
|
|
44 | 46 | </actionGroup>
|
45 | 47 |
|
46 | 48 | <!-- Update virtual product with tier price -->
|
47 |
| - <fillField selector="{{AdminProductFormSection.productName}}" userInput="{{updateVirtualProductTierPriceInStock.name}}" stepKey="fillProductName"/> |
48 |
| - <fillField selector="{{AdminProductFormSection.productSku}}" userInput="{{updateVirtualProductTierPriceInStock.sku}}" stepKey="fillProductSku"/> |
49 |
| - <fillField selector="{{AdminProductFormSection.productPrice}}" userInput="{{updateVirtualProductTierPriceInStock.price}}" stepKey="fillProductPrice"/> |
| 49 | + <actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillNewProductData"> |
| 50 | + <argument name="product" value="updateVirtualProductTierPriceInStock"/> |
| 51 | + </actionGroup> |
50 | 52 | <!-- Press enter to validate advanced pricing link -->
|
51 | 53 | <pressKey selector="{{AdminProductFormSection.productPrice}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::ENTER]" stepKey="pressEnterKey"/>
|
52 | 54 | <actionGroup ref="AdminProductFormOpenAdvancedPricingDialogActionGroup" stepKey="openAdvancedPricingDialog"/>
|
|
59 | 61 | </actionGroup>
|
60 | 62 | <actionGroup ref="AdminProductFormDoneAdvancedPricingDialogActionGroup" stepKey="doneAdvancedPricingModal"/>
|
61 | 63 | <selectOption selector="{{AdminProductFormSection.productTaxClass}}" userInput="{{updateVirtualProductTierPriceInStock.productTaxClass}}" stepKey="selectProductStockClass"/>
|
62 |
| - <fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="{{updateVirtualProductTierPriceInStock.quantity}}" stepKey="fillProductQuantity"/> |
63 |
| - <selectOption selector="{{AdminProductFormSection.stockStatus}}" userInput="{{updateVirtualProductTierPriceInStock.status}}" stepKey="selectStockStatusInStock"/> |
64 |
| - <click selector="{{AdminProductFormSection.categoriesDropdown}}" stepKey="clickCategoriesDropDown"/> |
65 |
| - <fillField selector="{{AdminProductFormSection.searchCategory}}" userInput="$$initialCategoryEntity.name$$" stepKey="fillSearchForInitialCategory" /> |
66 |
| - <waitForPageLoad stepKey="waitForCategorySearch"/> |
67 |
| - <click selector="{{AdminProductFormSection.selectCategory($initialCategoryEntity.name$)}}" stepKey="unselectInitialCategory"/> |
68 |
| - <fillField selector="{{AdminProductFormSection.searchCategory}}" userInput="$$categoryEntity.name$$" stepKey="fillSearchCategory" /> |
69 |
| - <waitForPageLoad stepKey="waitForCategorySearchAgain"/> |
70 |
| - <click selector="{{AdminProductFormSection.selectCategory($categoryEntity.name$)}}" stepKey="clickOnCategory"/> |
71 |
| - <click selector="{{AdminProductFormSection.done}}" stepKey="clickOnDoneAdvancedCategorySelect"/> |
| 64 | + <actionGroup ref="removeCategoryFromProduct" stepKey="unselectInitialCategory"> |
| 65 | + <argument name="categoryName" value="$initialCategoryEntity.name$"/> |
| 66 | + </actionGroup> |
| 67 | + <actionGroup ref="SetCategoryByName" stepKey="setNewCategory"> |
| 68 | + <argument name="categoryName" value="$categoryEntity.name$"/> |
| 69 | + </actionGroup> |
72 | 70 | <selectOption selector="{{AdminProductFormSection.visibility}}" userInput="{{updateVirtualProductTierPriceInStock.visibility}}" stepKey="selectVisibility"/>
|
73 | 71 | <actionGroup ref="SetProductUrlKeyByString" stepKey="updateUrlKey">
|
74 | 72 | <argument name="urlKey" value="{{updateVirtualProductTierPriceInStock.urlKey}}"/>
|
75 | 73 | </actionGroup>
|
76 | 74 | <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductAndCheckSuccessMessage"/>
|
77 | 75 |
|
78 | 76 | <!-- Search updated virtual product(from above step) in the grid -->
|
79 |
| - <actionGroup ref="filterAndSelectProduct" stepKey="openProductEditPageBySKUAgain"> |
80 |
| - <argument name="productSku" value="{{updateVirtualProductTierPriceInStock.sku}}"/> |
| 77 | + <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct"> |
| 78 | + <argument name="product" value="updateVirtualProductTierPriceInStock"/> |
81 | 79 | </actionGroup>
|
82 | 80 |
|
83 | 81 | <!-- Verify customer see updated virtual product with tier price(from the above step) in the product form page -->
|
84 |
| - <seeInField selector="{{AdminProductFormSection.productName}}" userInput="{{updateVirtualProductTierPriceInStock.name}}" stepKey="seeProductName"/> |
85 |
| - <seeInField selector="{{AdminProductFormSection.productSku}}" userInput="{{updateVirtualProductTierPriceInStock.sku}}" stepKey="seeProductSku"/> |
86 |
| - <seeInField selector="{{AdminProductFormSection.productPrice}}" userInput="{{updateVirtualProductTierPriceInStock.price}}" stepKey="seeProductPrice"/> |
| 82 | + <actionGroup ref="AssertProductInfoOnEditPageActionGroup" stepKey="verifyProductInAdminEditForm"> |
| 83 | + <argument name="product" value="updateVirtualProductTierPriceInStock"/> |
| 84 | + </actionGroup> |
87 | 85 | <actionGroup ref="AdminProductFormOpenAdvancedPricingDialogActionGroup" stepKey="openAdvancedPricingDialogAgain"/>
|
88 | 86 | <actionGroup ref="AssertAdminProductFormAdvancedPricingCheckTierPriceActionGroup" stepKey="checkTierPrice">
|
89 | 87 | <argument name="rowNumber" value="0"/>
|
|
94 | 92 | <argument name="amount" value="{{tierPriceOnVirtualProduct.price}}"/>
|
95 | 93 | </actionGroup>
|
96 | 94 | <actionGroup ref="AdminProductFormCloseAdvancedPricingDialogActionGroup" stepKey="closeAdvancedPricingModal"/>
|
97 |
| - |
98 | 95 | <seeInField selector="{{AdminProductFormSection.productTaxClass}}" userInput="{{updateVirtualProductTierPriceInStock.productTaxClass}}" stepKey="seeProductTaxClass"/>
|
99 |
| - <seeInField selector="{{AdminProductFormSection.productQuantity}}" userInput="{{updateVirtualProductTierPriceInStock.quantity}}" stepKey="seeProductQuantity"/> |
100 |
| - <seeInField selector="{{AdminProductFormSection.productStockStatus}}" userInput="{{updateVirtualProductTierPriceInStock.status}}" stepKey="seeProductStockStatus"/> |
101 | 96 | <click selector="{{AdminProductFormSection.categoriesDropdown}}" stepKey="clickCategoriesDropDownToVerify"/>
|
102 | 97 | <grabMultiple selector="{{AdminProductFormSection.selectMultipleCategories}}" stepKey="selectedCategories" />
|
103 | 98 | <assertEquals stepKey="assertSelectedCategories">
|
|
120 | 115 | </actionGroup>
|
121 | 116 |
|
122 | 117 | <!--Verify customer see updated virtual product with tier price on product storefront page -->
|
123 |
| - <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductPageByUrlKey"> |
124 |
| - <argument name="productUrlKey" value="{{updateVirtualProductTierPriceInStock.urlKey}}"/> |
| 118 | + <actionGroup ref="AssertProductInStorefrontProductPageActionGroup" stepKey="verifyProductOnFrontend"> |
| 119 | + <argument name="product" value="updateVirtualProductTierPriceInStock"/> |
125 | 120 | </actionGroup>
|
126 |
| - <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{updateVirtualProductTierPriceInStock.name}}" stepKey="seeVirtualProductNameOnStoreFrontPage"/> |
127 |
| - <see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="{{updateVirtualProductTierPriceInStock.price}}" stepKey="seeVirtualProductPriceOnStoreFrontPage"/> |
128 |
| - <see selector="{{StorefrontProductInfoMainSection.productSku}}" userInput="{{updateVirtualProductTierPriceInStock.sku}}" stepKey="seeVirtualProductSku"/> |
129 |
| - <grabTextFrom selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="productStockAvailableStatus"/> |
130 |
| - <assertEquals stepKey="assertStockAvailableOnProductPage"> |
131 |
| - <expectedResult type="string">{{updateVirtualProductTierPriceInStock.storefrontStatus}}</expectedResult> |
132 |
| - <actualResult type="variable">productStockAvailableStatus</actualResult> |
133 |
| - </assertEquals> |
134 |
| - <grabTextFrom selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="productPriceAmount"/> |
135 |
| - <assertEquals stepKey="assertOldPriceTextOnProductPage"> |
136 |
| - <expectedResult type="string">${{updateVirtualProductTierPriceInStock.price}}</expectedResult> |
137 |
| - <actualResult type="variable">productPriceAmount</actualResult> |
138 |
| - </assertEquals> |
139 |
| - <grabTextFrom selector="{{StorefrontProductInfoMainSection.tierPriceText}}" stepKey="tierPriceText"/> |
140 |
| - <assertEquals stepKey="assertTierPriceTextOnProductPage"> |
141 |
| - <expectedResult type="string">Buy {{tierPriceOnVirtualProduct.qty}} for ${{tierPriceOnVirtualProduct.price}} each and save 38%</expectedResult> |
142 |
| - <actualResult type="variable">tierPriceText</actualResult> |
143 |
| - </assertEquals> |
| 121 | + <see selector="{{StorefrontProductInfoMainSection.productStockStatus}}" userInput="{{updateVirtualProductTierPriceInStock.storefrontStatus}}" stepKey="assertStockAvailableOnProductPage"/> |
| 122 | + <see selector="{{StorefrontProductInfoMainSection.tierPriceText}}" userInput="Buy {{tierPriceOnVirtualProduct.qty}} for ${{tierPriceOnVirtualProduct.price}} each and save 38%" stepKey="assertTierPriceTextOnProductPage"/> |
144 | 123 |
|
145 | 124 | <!--Verify customer see updated virtual product link on magento storefront page and is searchable by sku -->
|
146 | 125 | <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchProductBySku">
|
|
149 | 128 | <actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="checkProductInSearchResults">
|
150 | 129 | <argument name="productName" value="{{updateVirtualProductTierPriceInStock.name}}"/>
|
151 | 130 | </actionGroup>
|
152 |
| - <grabTextFrom selector="{{StorefrontQuickSearchResultsSection.asLowAsLabel}}" stepKey="tierPriceTextOnStorefrontPage"/> |
153 |
| - <assertEquals stepKey="assertTierPriceTextOnCategoryPage"> |
154 |
| - <expectedResult type="string">As low as ${{tierPriceOnVirtualProduct.price}}</expectedResult> |
155 |
| - <actualResult type="variable">tierPriceTextOnStorefrontPage</actualResult> |
156 |
| - </assertEquals> |
| 131 | + <see selector="{{StorefrontQuickSearchResultsSection.asLowAsLabel}}" userInput="As low as ${{tierPriceOnVirtualProduct.price}}" stepKey="assertTierPriceTextOnCategoryPage"/> |
157 | 132 | </test>
|
158 | 133 | </tests>
|
0 commit comments