|
20 | 20 | <group value="mtf_migrated"/>
|
21 | 21 | </annotations>
|
22 | 22 | <before>
|
23 |
| - <!-- Login as admin --> |
24 | 23 | <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
|
25 | 24 |
|
26 |
| - <!-- Create customer --> |
27 | 25 | <createData entity="Simple_US_CA_Customer" stepKey="createCustomer"/>
|
28 | 26 |
|
29 |
| - <!-- Create category --> |
30 | 27 | <createData entity="SimpleSubCategory" stepKey="createCategory"/>
|
31 | 28 |
|
32 |
| - <!-- Create simple products --> |
33 | 29 | <createData entity="SimpleProduct2" stepKey="createFirstProduct">
|
34 | 30 | <field key="price">755.00</field>
|
35 | 31 | </createData>
|
36 | 32 | <createData entity="SimpleProduct2" stepKey="createSecondProduct">
|
37 | 33 | <field key="price">756.00</field>
|
38 | 34 | </createData>
|
39 | 35 |
|
40 |
| - <!-- Create Bundle product --> |
41 | 36 | <createData entity="BundleProductPriceViewRange" stepKey="createBundleProduct">
|
42 | 37 | <requiredEntity createDataKey="createCategory"/>
|
43 | 38 | </createData>
|
|
54 | 49 | <requiredEntity createDataKey="createBundleOption"/>
|
55 | 50 | <requiredEntity createDataKey="createSecondProduct"/>
|
56 | 51 | </createData>
|
57 |
| - <!-- Change configuration --> |
| 52 | + |
58 | 53 | <magentoCLI command="config:set reports/options/enabled 1" stepKey="enableReportModule"/>
|
59 | 54 |
|
60 | 55 | <comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
|
61 | 56 | </before>
|
62 | 57 | <after>
|
63 |
| - <!-- Admin logout --> |
64 | 58 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
|
65 | 59 |
|
66 |
| - <!-- Customer logout --> |
67 | 60 | <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
|
68 | 61 |
|
69 |
| - <!-- Delete customer --> |
70 | 62 | <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
|
71 | 63 |
|
72 |
| - <!-- Delete created product data --> |
73 | 64 | <deleteData createDataKey="createBundleProduct" stepKey="deleteProduct"/>
|
74 | 65 | <deleteData createDataKey="createFirstProduct" stepKey="deleteFirstProduct"/>
|
75 | 66 | <deleteData createDataKey="createSecondProduct" stepKey="deleteSecondProduct"/>
|
76 | 67 |
|
77 |
| - <!-- Delete category --> |
78 | 68 | <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
|
79 | 69 |
|
80 |
| - <!-- Change configuration --> |
81 | 70 | <magentoCLI command="config:set reports/options/enabled 0" stepKey="disableReportModule"/>
|
82 | 71 | </after>
|
83 | 72 |
|
84 |
| - <!-- Login as customer --> |
85 | 73 | <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer">
|
86 | 74 | <argument name="Customer" value="$$createCustomer$$"/>
|
87 | 75 | </actionGroup>
|
88 | 76 |
|
89 |
| - <!-- Go to created product page --> |
90 |
| - <amOnPage url="{{StorefrontProductPage.url($$createBundleProduct.custom_attributes[url_key]$$)}}" stepKey="goToProductPage"/> |
91 |
| - <waitForPageLoad stepKey="waitForProductPageLoad"/> |
| 77 | + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="goToProductPage"> |
| 78 | + <argument name="productUrlKey" value="$$createBundleProduct.custom_attributes[url_key]$$"/> |
| 79 | + </actionGroup> |
| 80 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForProductPageLoad"/> |
92 | 81 |
|
93 |
| - <!-- Search and open customer --> |
94 | 82 | <actionGroup ref="AdminOpenCustomerEditPageActionGroup" stepKey="openCustomerEditPage">
|
95 | 83 | <argument name="customerId" value="$createCustomer.id$"/>
|
96 | 84 | </actionGroup>
|
97 | 85 | <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="filterCreatedCustomer"/>
|
98 | 86 | <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickEditButton"/>
|
99 | 87 |
|
100 |
| - <!-- Click create order --> |
101 |
| - <click selector="{{AdminCustomerMainActionsSection.createOrderBtn}}" stepKey="clickCreateOrder"/> |
| 88 | + <actionGroup ref="AdminClickCreateOrderOnEditCustomerPageActionGroup" stepKey="clickCreateOrder"/> |
| 89 | + |
| 90 | + <actionGroup ref="AdminClickConfigureForRecentlyViewedProductActionGroup" stepKey="configureProduct"> |
| 91 | + <argument name="productName" value="$$createBundleProduct.name$$"/> |
| 92 | + </actionGroup> |
| 93 | + <actionGroup ref="AdminSelectDropdownOptionOnConfigureProductSlidingModalActionGroup" stepKey="selectProductOption"> |
| 94 | + <argument name="optionName" value="$$createFirstProduct.name$$"/> |
| 95 | + </actionGroup> |
102 | 96 |
|
103 |
| - <!-- Add configure to bundle product --> |
104 |
| - <click selector="{{AdminCustomerActivitiesRecentlyViewedSection.addToOrderConfigure($$createBundleProduct.name$$)}}" stepKey="configureProduct"/> |
105 |
| - <click selector="{{AdminCustomerActivitiesConfigureSection.dropdownProductSelection($$createFirstProduct.name$$)}}" stepKey="selectProductOption"/> |
106 |
| - <click selector="{{AdminCustomerActivitiesConfigureSection.okButton}}" stepKey="clickOkBtn"/> |
107 |
| - <waitForPageLoad stepKey="waitForAddingConfigure"/> |
| 97 | + <actionGroup ref="AdminClickOkOnConfigureProductSlidingModalActionGroup" stepKey="clickOkBtn"/> |
| 98 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForAddingConfigure"/> |
108 | 99 |
|
109 |
| - <!-- Click 'Update Changes' --> |
110 | 100 | <actionGroup ref="AdminClickUpdateChangesOnCreateOrderPageActionGroup" stepKey="clickUpdateChangesBtn"/>
|
111 | 101 |
|
112 |
| - <!-- Assert products in items ordered grid --> |
113 |
| - <see selector="{{AdminCustomerCreateNewOrderSection.gridCell('1', 'Product')}}" userInput="$$createBundleProduct.name$$" stepKey="seeProductName"/> |
114 |
| - <see selector="{{AdminCustomerCreateNewOrderSection.gridCell('1', 'Price')}}" userInput="$755.00" stepKey="seeProductPrice"/> |
| 102 | + <actionGroup ref="AdminAssertProductInItemsOrderedGridOnCreateOrderPageActionGroup" stepKey="seeProductName"> |
| 103 | + <argument name="index" value="1"/> |
| 104 | + <argument name="attribute" value="Product"/> |
| 105 | + <argument name="value" value="$$createBundleProduct.name$$"/> |
| 106 | + </actionGroup> |
| 107 | + <actionGroup ref="AdminAssertProductInItemsOrderedGridOnCreateOrderPageActionGroup" stepKey="seeProductPrice"> |
| 108 | + <argument name="index" value="1"/> |
| 109 | + <argument name="attribute" value="Price"/> |
| 110 | + <argument name="value" value="$755.00"/> |
| 111 | + </actionGroup> |
115 | 112 | </test>
|
116 | 113 | </tests>
|
0 commit comments