|
34 | 34 | </after>
|
35 | 35 |
|
36 | 36 | <!-- Search default simple product in the grid page -->
|
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$$"/> |
| 37 | + <actionGroup ref="FilterAndSelectProductActionGroup" stepKey="openProductCatalogPage"> |
| 38 | + <argument name="productSku" value="$initialSimpleProduct.sku$"/> |
41 | 39 | </actionGroup>
|
42 |
| - <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitUntilProductIsOpened"/> |
| 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"/> |
43 | 46 |
|
44 | 47 | <!-- Update simple product with regular price(in stock) -->
|
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"/> |
| 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> |
53 | 72 | <scrollToTopOfPage stepKey="scrollToTopOfAdminProductFormSection"/>
|
54 |
| - <click selector="{{AdminProductFormSection.enableProductLabel}}" stepKey="clickEnableProductLabelToDisableProduct"/> |
| 73 | + <actionGroup ref="ToggleProductEnabledActionGroup" stepKey="clickEnableProductLabelToDisableProduct"/> |
55 | 74 | <actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>
|
56 | 75 |
|
57 | 76 | <!-- Verify customer see success message -->
|
58 |
| - <see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/> |
| 77 | + <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="seeAssertSimpleProductSaveSuccessMessage"> |
| 78 | + <argument name="message" value="You saved the product."/> |
| 79 | + </actionGroup> |
59 | 80 |
|
60 | 81 | <!-- Search updated simple product(from above step) in the grid -->
|
61 | 82 | <actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="openProductCatalogPageToSearchUpdatedSimpleProduct"/>
|
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"/> |
| 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> |
67 | 94 | <click selector="{{AdminProductGridFilterSection.nthRow('1')}}" stepKey="clickFirstRowToVerifyUpdatedSimpleProductVisibleInGrid"/>
|
68 | 95 | <waitForPageLoad stepKey="waitUntilSimpleProductPageIsOpened"/>
|
69 | 96 |
|
70 | 97 | <!-- Verify customer see updated simple product in the product form page -->
|
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"/> |
| 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"/> |
77 | 117 | <scrollTo selector="{{AdminProductSEOSection.sectionHeader}}" x="0" y="-80" stepKey="scrollToAdminProductSEOSectionHeader"/>
|
78 | 118 | <click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="clickAdminProductSEOSectionHeader"/>
|
79 |
| - <seeInField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{simpleProductDisabled.urlKey}}" stepKey="seeSimpleProductUrlKey"/> |
| 119 | + <seeInField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{simpleProductDisabled.urlKey}}" |
| 120 | + stepKey="seeSimpleProductUrlKey"/> |
80 | 121 |
|
81 | 122 | <!--Verify customer don't see updated simple product link on magento storefront page -->
|
82 |
| - <amOnPage url="{{StorefrontProductPage.url(simpleProductDisabled.urlKey)}}" stepKey="goToMagentoStorefrontPage"/> |
83 |
| - <waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/> |
| 123 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToMagentoStorefrontPage"/> |
| 124 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" |
| 125 | + stepKey="waitForStoreFrontProductPageLoad"/> |
84 | 126 | <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillSimpleProductSkuInSearchTextBox">
|
85 | 127 | <argument name="phrase" value="{{simpleProductDisabled.sku}}"/>
|
86 | 128 | </actionGroup>
|
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"> |
| 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"> |
91 | 137 | <argument name="productName" value="{{simpleProductDisabled.name}}"/>
|
92 | 138 | </actionGroup>
|
93 | 139 | </test>
|
|
0 commit comments