|
41 | 41 | <argument name="indices" value=""/> |
42 | 42 | </actionGroup> |
43 | 43 | <actionGroup ref="CliCacheFlushActionGroup" stepKey="cleanCache"> |
44 | | - <argument name="tags" value=""/> |
| 44 | + <argument name="tags" value=""/> |
45 | 45 | </actionGroup> |
46 | 46 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> |
47 | 47 | </after> |
48 | 48 |
|
49 | | - <comment userInput="BIC workaround" stepKey="firstSimpleCategory"/> |
50 | | - <comment userInput="BIC workaround" stepKey="createFirstConfigProduct"/> |
51 | | - <comment userInput="BIC workaround" stepKey="createFirstConfigProductAttribute"/> |
52 | | - <comment userInput="BIC workaround" stepKey="createFirstConfigProductAttributeFirstOption"/> |
53 | | - <comment userInput="BIC workaround" stepKey="createFirstConfigProductAttributeSecondOption"/> |
54 | | - <comment userInput="BIC workaround" stepKey="addFirstProductToAttributeSet"/> |
55 | | - <comment userInput="BIC workaround" stepKey="getFirstConfigAttributeFirstOption"/> |
56 | | - <comment userInput="BIC workaround" stepKey="createFirstConfigFirstChildProduct"/> |
57 | | - <comment userInput="BIC workaround" stepKey="createFirstConfigProductOption"/> |
58 | | - <comment userInput="BIC workaround" stepKey="createFirstConfigProductAddFirstChild"/> |
59 | | - |
60 | | - <!-- Reindex --> |
61 | | - <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
62 | | - <argument name="indices" value=""/> |
63 | | - </actionGroup> |
64 | | - <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache"> |
65 | | - <argument name="tags" value="full_page"/> |
66 | | - </actionGroup> |
| 49 | + <!-- Create category for configurable product --> |
| 50 | + <createData entity="SimpleSubCategory" stepKey="firstSimpleCategory"/> |
67 | 51 |
|
68 | | - <!-- Assert first product in category --> |
69 | | - <magentoCron stepKey="runCron"/> |
70 | | - <magentoCron stepKey="runCron1"/> |
| 52 | + <!-- Create configurable product with two options --> |
| 53 | + <createData entity="ApiConfigurableProduct" stepKey="createFirstConfigProduct"> |
| 54 | + <requiredEntity createDataKey="firstSimpleCategory"/> |
| 55 | + </createData> |
| 56 | + |
| 57 | + <createData entity="productAttributeWithTwoOptions" stepKey="createFirstConfigProductAttribute"/> |
| 58 | + |
| 59 | + <createData entity="productAttributeOption1" stepKey="createFirstConfigProductAttributeFirstOption"> |
| 60 | + <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
| 61 | + </createData> |
| 62 | + <createData entity="productAttributeOption2" stepKey="createFirstConfigProductAttributeSecondOption"> |
| 63 | + <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
| 64 | + </createData> |
| 65 | + |
| 66 | + <createData entity="AddToDefaultSet" stepKey="addFirstProductToAttributeSet"> |
| 67 | + <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
| 68 | + </createData> |
71 | 69 |
|
| 70 | + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getFirstConfigAttributeFirstOption"> |
| 71 | + <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
| 72 | + </getData> |
| 73 | + |
| 74 | + <!-- Create one child product for configurable product --> |
| 75 | + <createData entity="ApiSimpleOne" stepKey="createFirstConfigFirstChildProduct"> |
| 76 | + <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
| 77 | + <requiredEntity createDataKey="getFirstConfigAttributeFirstOption"/> |
| 78 | + </createData> |
| 79 | + |
| 80 | + <createData entity="ConfigurableProductOneOption" stepKey="createFirstConfigProductOption"> |
| 81 | + <requiredEntity createDataKey="createFirstConfigProduct"/> |
| 82 | + <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
| 83 | + <requiredEntity createDataKey="getFirstConfigAttributeFirstOption"/> |
| 84 | + </createData> |
| 85 | + |
| 86 | + <createData entity="ConfigurableProductAddChild" stepKey="createFirstConfigProductAddFirstChild"> |
| 87 | + <requiredEntity createDataKey="createFirstConfigProduct"/> |
| 88 | + <requiredEntity createDataKey="createFirstConfigFirstChildProduct"/> |
| 89 | + </createData> |
| 90 | + |
| 91 | + <!-- Assert first product in category --> |
| 92 | + <magentoCLI command="cron:run" stepKey="runCron"/> |
72 | 93 | <amOnPage url="{{StorefrontCategoryPage.url($$firstSimpleCategory.custom_attributes[url_key]$$)}}" stepKey="goToFirstCategoryPageStorefront"/> |
73 | 94 | <waitForPageLoad stepKey="waitForFirstCategoryPageLoad"/> |
74 | 95 |
|
|
77 | 98 | <argument name="expectedPrice" value="$$createFirstConfigFirstChildProduct.price$$"/> |
78 | 99 | </actionGroup> |
79 | 100 |
|
80 | | - <!-- Update simple product price --> |
81 | | - <comment userInput="BIC workaround" stepKey="openProductCatalogPage"/> |
82 | | - <comment userInput="BIC workaround" stepKey="filterProductGrid"/> |
83 | | - <comment userInput="BIC workaround" stepKey="clickFirstRowToOpenDefaultSimpleProduct"/> |
84 | | - <comment userInput="BIC workaround" stepKey="waitUntilProductIsOpened"/> |
85 | | - <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openProductEditPage"> |
86 | | - <argument name="productId" value="$createFirstConfigFirstChildProduct.id$"/> |
| 101 | + <!-- Search default simple product in grid --> |
| 102 | + <actionGroup ref="AdminClearFiltersActionGroup" stepKey="openProductCatalogPage"/> |
| 103 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="filterProductGrid"/> |
| 104 | + <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="clickFirstRowToOpenDefaultSimpleProduct"> |
| 105 | + <argument name="product" value="$$createFirstConfigFirstChildProduct$$"/> |
87 | 106 | </actionGroup> |
88 | | - <waitForElementVisible selector="{{AdminProductFormSection.productPrice}}" stepKey="waitForProductPriceField"/> |
| 107 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitUntilProductIsOpened"/> |
| 108 | + |
| 109 | + <!-- Update default simple product with price --> |
89 | 110 | <fillField selector="{{AdminProductFormSection.productPrice}}" userInput="150" stepKey="fillSimpleProductPrice"/> |
90 | | - <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickButtonSave"/> |
91 | | - <waitForText selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/> |
| 111 | + <actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickButtonSave"/> |
| 112 | + |
| 113 | + <!-- Verify customer see success message --> |
| 114 | + <see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/> |
92 | 115 |
|
93 | 116 | <!-- Assert first product in category --> |
94 | | - <magentoCron stepKey="runCron2"/> |
| 117 | + <magentoCLI command="cron:run" stepKey="runCron1"/> |
95 | 118 | <wait time="60" stepKey="waitForUpdateStarts"/> |
96 | 119 |
|
97 | 120 | <amOnPage url="{{StorefrontCategoryPage.url($$firstSimpleCategory.custom_attributes[url_key]$$)}}" stepKey="goToFirstCategoryPageStorefront1"/> |
|
0 commit comments