|
91 | 91 | </actionGroup> |
92 | 92 |
|
93 | 93 | <!-- Go to created product page --> |
94 | | - <amOnPage url="{{StorefrontProductPage.url($$createConfigProduct.custom_attributes[url_key]$$)}}" stepKey="goToProductPage"/> |
95 | | - <waitForPageLoad stepKey="waitForProductPageLoad"/> |
| 94 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="goToProductPage"> |
| 95 | + <argument name="productUrl" value="$$createConfigProduct.custom_attributes[url_key]$$"/> |
| 96 | + </actionGroup> |
| 97 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForProductPageLoad"/> |
96 | 98 | <selectOption selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" userInput="$$getConfigAttributeOption.value$$" stepKey="selectOption"/> |
97 | 99 |
|
98 | 100 | <!-- Search and open customer --> |
|
103 | 105 | <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickEditButton"/> |
104 | 106 |
|
105 | 107 | <!-- Click create order --> |
106 | | - <click selector="{{AdminCustomerMainActionsSection.createOrderBtn}}" stepKey="clickCreateOrder"/> |
107 | | - <waitForPageLoad stepKey="waitForPageLoad"/> |
| 108 | + <actionGroup ref="AdminClickCreateOrderButtonOnEditCustomerPageActionGroup" stepKey="clickCreateOrder"/> |
| 109 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageLoad"/> |
108 | 110 | <conditionalClick selector="{{AdminOrderStoreScopeTreeSection.storeOption(_defaultStore.name)}}" dependentSelector="{{AdminOrderStoreScopeTreeSection.storeOption(_defaultStore.name)}}" visible="true" stepKey="selectStoreViewIfAppears"/> |
109 | 111 | <waitForPageLoad stepKey="waitForPageLoad2"/> |
110 | 112 |
|
111 | 113 | <!-- Add configure to product --> |
112 | | - <click selector="{{AdminCustomerActivitiesRecentlyViewedSection.addToOrderConfigure($$createConfigProduct.name$$)}}" stepKey="configureProduct"/> |
| 114 | + <actionGroup ref="AdminClickConfigureForRecentlyViewedProductActionGroup" stepKey="configureProduct"> |
| 115 | + <argument name="productName" value="$$createConfigProduct.name$$"/> |
| 116 | + </actionGroup> |
113 | 117 | <selectOption selector="{{AdminCustomerActivitiesConfigureSection.addAttribute}}" userInput="$$getConfigAttributeOption.value$$" stepKey="selectProductOption"/> |
114 | 118 | <click selector="{{AdminCustomerActivitiesConfigureSection.okButton}}" stepKey="clickOkBtn"/> |
115 | 119 | <waitForPageLoad stepKey="waitForProductConfigureLoad"/> |
|
118 | 122 | <actionGroup ref="AdminClickUpdateChangesOnCreateOrderPageActionGroup" stepKey="clickUpdateChangesBtn"/> |
119 | 123 |
|
120 | 124 | <!-- Assert products in items ordered grid --> |
121 | | - <see selector="{{AdminCustomerCreateNewOrderSection.gridCell('1', 'Product')}}" userInput="$$createConfigProduct.name$$" stepKey="seeProductName"/> |
122 | | - <see selector="{{AdminCustomerCreateNewOrderSection.gridCell('1', 'Price')}}" userInput="$123.00" stepKey="seeProductPrice"/> |
| 125 | + <actionGroup ref="AdminAssertProductInItemsOrderedGridOnCreateOrderPageActionGroup" stepKey="seeProductName"> |
| 126 | + <argument name="index" value="1"/> |
| 127 | + <argument name="attribute" value="Product"/> |
| 128 | + <argument name="value" value="$$createConfigProduct.name$$"/> |
| 129 | + </actionGroup> |
| 130 | + <actionGroup ref="AdminAssertProductInItemsOrderedGridOnCreateOrderPageActionGroup" stepKey="seeProductPrice"> |
| 131 | + <argument name="index" value="1"/> |
| 132 | + <argument name="attribute" value="Price"/> |
| 133 | + <argument name="value" value="$123.00"/> |
| 134 | + </actionGroup> |
123 | 135 | </test> |
124 | 136 | </tests> |
0 commit comments