|
34 | 34 | </after> |
35 | 35 |
|
36 | 36 | <!-- Search default simple product in the grid page --> |
37 | | - <actionGroup ref="FilterAndSelectProductActionGroup" stepKey="openProductCatalogPage"> |
38 | | - <argument name="productSku" value="$initialSimpleProduct.sku$"/> |
| 37 | + <actionGroup ref="AdminClearFiltersActionGroup" stepKey="openProductCatalogPage"/> |
| 38 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="filterProductGrid"/> |
| 39 | + <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="clickFirstRowToOpenDefaultSimpleProduct"> |
| 40 | + <argument name="product" value="$$initialSimpleProduct$$"/> |
39 | 41 | </actionGroup> |
40 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
41 | | - stepKey="filterProductGrid"/> |
42 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
43 | | - stepKey="clickFirstRowToOpenDefaultSimpleProduct"/> |
44 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
45 | | - stepKey="waitUntilProductIsOpened"/> |
| 42 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitUntilProductIsOpened"/> |
46 | 43 |
|
47 | 44 | <!-- Update simple product with regular price(in stock) --> |
48 | | - <actionGroup ref="FillMainProductFormByStringActionGroup" stepKey="fillSimpleProductName"> |
49 | | - <argument name="productName" value="{{simpleProductDisabled.name}}"/> |
50 | | - <argument name="productSku" value="{{simpleProductDisabled.sku}}"/> |
51 | | - <argument name="productPrice" value="{{simpleProductDisabled.price}}"/> |
52 | | - <argument name="productQuantity" value="{{simpleProductDisabled.quantity}}"/> |
53 | | - <argument name="productStatus" value="{{simpleProductDisabled.status}}"/> |
54 | | - <argument name="productWeight" value="{{simpleProductDisabled.weight}}"/> |
55 | | - </actionGroup> |
56 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
57 | | - stepKey="fillSimpleProductSku"/> |
58 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
59 | | - stepKey="fillSimpleProductPrice"/> |
60 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
61 | | - stepKey="fillSimpleProductQuantity"/> |
62 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
63 | | - stepKey="selectStockStatusInStock"/> |
64 | | - <actionGroup ref="SetCategoryByNameActionGroup" stepKey="fillSimpleProductWeight"> |
65 | | - <argument name="categoryName" value="$$initialCategoryEntity.name$$"/> |
66 | | - </actionGroup> |
67 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
68 | | - stepKey="clickAdminProductSEOSection"/> |
69 | | - <actionGroup ref="SetProductUrlKeyByStringActionGroup" stepKey="fillUrlKey"> |
70 | | - <argument name="urlKey" value="{{simpleProductDisabled.urlKey}}"/> |
71 | | - </actionGroup> |
| 45 | + <fillField selector="{{AdminProductFormSection.productName}}" userInput="{{simpleProductDisabled.name}}" stepKey="fillSimpleProductName"/> |
| 46 | + <fillField selector="{{AdminProductFormSection.productSku}}" userInput="{{simpleProductDisabled.sku}}" stepKey="fillSimpleProductSku"/> |
| 47 | + <fillField selector="{{AdminProductFormSection.productPrice}}" userInput="{{simpleProductDisabled.price}}" stepKey="fillSimpleProductPrice"/> |
| 48 | + <fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="{{simpleProductDisabled.quantity}}" stepKey="fillSimpleProductQuantity"/> |
| 49 | + <selectOption selector="{{AdminProductFormSection.stockStatus}}" userInput="{{simpleProductDisabled.status}}" stepKey="selectStockStatusInStock"/> |
| 50 | + <fillField selector="{{AdminProductFormSection.productWeight}}" userInput="{{simpleProductDisabled.weight}}" stepKey="fillSimpleProductWeight"/> |
| 51 | + <click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="clickAdminProductSEOSection"/> |
| 52 | + <fillField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{simpleProductDisabled.urlKey}}" stepKey="fillUrlKey"/> |
72 | 53 | <scrollToTopOfPage stepKey="scrollToTopOfAdminProductFormSection"/> |
73 | | - <actionGroup ref="ToggleProductEnabledActionGroup" stepKey="clickEnableProductLabelToDisableProduct"/> |
| 54 | + <click selector="{{AdminProductFormSection.enableProductLabel}}" stepKey="clickEnableProductLabelToDisableProduct"/> |
74 | 55 | <actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/> |
75 | 56 |
|
76 | 57 | <!-- Verify customer see success message --> |
77 | | - <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="seeAssertSimpleProductSaveSuccessMessage"> |
78 | | - <argument name="message" value="You saved the product."/> |
79 | | - </actionGroup> |
| 58 | + <see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/> |
80 | 59 |
|
81 | 60 | <!-- Search updated simple product(from above step) in the grid --> |
82 | 61 | <actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="openProductCatalogPageToSearchUpdatedSimpleProduct"/> |
83 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
84 | | - stepKey="clickClearAll"/> |
85 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
86 | | - stepKey="clickFiltersButton"/> |
87 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
88 | | - stepKey="fillSimpleProductNameInNameFilter"/> |
89 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
90 | | - stepKey="fillProductSku"/> |
91 | | - <actionGroup ref="FilterProductGridBySkuAndNameActionGroup" stepKey="clickApplyFiltersButton"> |
92 | | - <argument name="product" value="simpleProductDisabled"/> |
93 | | - </actionGroup> |
| 62 | + <conditionalClick selector="{{AdminProductGridFilterSection.clearAll}}" dependentSelector="{{AdminProductGridFilterSection.clearAll}}" visible="true" stepKey="clickClearAll"/> |
| 63 | + <click selector="{{AdminProductGridFilterSection.filters}}" stepKey="clickFiltersButton"/> |
| 64 | + <fillField selector="{{AdminProductGridFilterSection.nameFilter}}" userInput="{{simpleProductDisabled.name}}" stepKey="fillSimpleProductNameInNameFilter"/> |
| 65 | + <fillField selector="{{AdminProductGridFilterSection.skuFilter}}" userInput="{{simpleProductDisabled.sku}}" stepKey="fillProductSku"/> |
| 66 | + <click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFiltersButton"/> |
94 | 67 | <click selector="{{AdminProductGridFilterSection.nthRow('1')}}" stepKey="clickFirstRowToVerifyUpdatedSimpleProductVisibleInGrid"/> |
95 | 68 | <waitForPageLoad stepKey="waitUntilSimpleProductPageIsOpened"/> |
96 | 69 |
|
97 | 70 | <!-- Verify customer see updated simple product in the product form page --> |
98 | | - <actionGroup ref="AdminAssertProductInfoOnEditPageActionGroup" stepKey="seeSimpleProductName"> |
99 | | - <argument name="productStatus" value="{{SimpleProductDisabled.status}}"/> |
100 | | - <argument name="productName" value="{{simpleProductDisabled.name}}"/> |
101 | | - <argument name="productSku" value="{{simpleProductDisabled.sku}}"/> |
102 | | - <argument name="productPrice" value="{{simpleProductDisabled.price}}"/> |
103 | | - <argument name="productQuantity" value="{{simpleProductDisabled.quantity}}"/> |
104 | | - <argument name="productWeight" value="{{simpleProductDisabled.weight}}"/> |
105 | | - <argument name="categoryName" value="$$initialCategoryEntity.name$$"/> |
106 | | - </actionGroup> |
107 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
108 | | - stepKey="seeSimpleProductSku"/> |
109 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
110 | | - stepKey="seeSimpleProductPrice"/> |
111 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
112 | | - stepKey="seeSimpleProductQuantity"/> |
113 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
114 | | - stepKey="seeSimpleProductStockStatus"/> |
115 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
116 | | - stepKey="seeSimpleProductWeight"/> |
| 71 | + <seeInField selector="{{AdminProductFormSection.productName}}" userInput="{{simpleProductDisabled.name}}" stepKey="seeSimpleProductName"/> |
| 72 | + <seeInField selector="{{AdminProductFormSection.productSku}}" userInput="{{simpleProductDisabled.sku}}" stepKey="seeSimpleProductSku"/> |
| 73 | + <seeInField selector="{{AdminProductFormSection.productPrice}}" userInput="{{simpleProductDisabled.price}}" stepKey="seeSimpleProductPrice"/> |
| 74 | + <seeInField selector="{{AdminProductFormSection.productQuantity}}" userInput="{{simpleProductDisabled.quantity}}" stepKey="seeSimpleProductQuantity"/> |
| 75 | + <seeInField selector="{{AdminProductFormSection.productStockStatus}}" userInput="{{simpleProductDisabled.status}}" stepKey="seeSimpleProductStockStatus"/> |
| 76 | + <seeInField selector="{{AdminProductFormSection.productWeight}}" userInput="{{simpleProductDisabled.weight}}" stepKey="seeSimpleProductWeight"/> |
117 | 77 | <scrollTo selector="{{AdminProductSEOSection.sectionHeader}}" x="0" y="-80" stepKey="scrollToAdminProductSEOSectionHeader"/> |
118 | 78 | <click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="clickAdminProductSEOSectionHeader"/> |
119 | | - <seeInField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{simpleProductDisabled.urlKey}}" |
120 | | - stepKey="seeSimpleProductUrlKey"/> |
| 79 | + <seeInField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{simpleProductDisabled.urlKey}}" stepKey="seeSimpleProductUrlKey"/> |
121 | 80 |
|
122 | 81 | <!--Verify customer don't see updated simple product link on magento storefront page --> |
123 | | - <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToMagentoStorefrontPage"/> |
124 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
125 | | - stepKey="waitForStoreFrontProductPageLoad"/> |
| 82 | + <amOnPage url="{{StorefrontProductPage.url(simpleProductDisabled.urlKey)}}" stepKey="goToMagentoStorefrontPage"/> |
| 83 | + <waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/> |
126 | 84 | <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillSimpleProductSkuInSearchTextBox"> |
127 | 85 | <argument name="phrase" value="{{simpleProductDisabled.sku}}"/> |
128 | 86 | </actionGroup> |
129 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
130 | | - stepKey="waitForSearchTextBox"/> |
131 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
132 | | - stepKey="clickSearchTextBoxButton"/> |
133 | | - <comment userInput="Comment is added to preserve the step key for backward compatibility" |
134 | | - stepKey="waitForSearch"/> |
135 | | - <actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" |
136 | | - stepKey="dontSeeProductNameOnStorefrontPage"> |
| 87 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBox"/> |
| 88 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextBoxButton"/> |
| 89 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearch"/> |
| 90 | + <actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProductNameOnStorefrontPage"> |
137 | 91 | <argument name="productName" value="{{simpleProductDisabled.name}}"/> |
138 | 92 | </actionGroup> |
139 | 93 | </test> |
|
0 commit comments