|
21 | 21 | </annotations>
|
22 | 22 | <before>
|
23 | 23 | <!--Enable Cash On Delivery payment method-->
|
24 |
| - <magentoCLI command="config:set {{CashOnDeliveryEnableConfigData.path}} {{CashOnDeliveryEnableConfigData.value}}" stepKey="enableCashOnDelivery"/> |
25 |
| - <!--Allow Cash On Delivery for Specific Country--> |
26 |
| - <magentoCLI command="config:set payment/cashondelivery/allowspecific 1" stepKey="allowSpecificValue"/> |
27 |
| - <magentoCLI command="config:set payment/cashondelivery/specificcountry GB" stepKey="specificCountryValue"/> |
| 24 | + <actionGroup ref="CashOnDeliverySpecificCountryActionGroup" stepKey="enableCashOnDelivery"> |
| 25 | + <argument name="path" value="{{CashOnDeliveryEnableConfigData.path}}"/> |
| 26 | + <argument name="value" value="{{CashOnDeliveryEnableConfigData.value}}"/> |
| 27 | + <argument name="allowSpecific" value="1"/> |
| 28 | + <argument name="specificCountry" value="GB"/> |
| 29 | + </actionGroup> |
28 | 30 |
|
29 | 31 | <!--Create Simple Product-->
|
30 | 32 | <createData entity="SimpleProduct" stepKey="simpleProduct"/>
|
|
33 | 35 | </before>
|
34 | 36 | <after>
|
35 | 37 | <!--Disable Cash On Delivery method-->
|
36 |
| - <magentoCLI command="config:set payment/cashondelivery/allowspecific 0" stepKey="allowSpecificValue"/> |
37 |
| - <magentoCLI command="config:set payment/cashondelivery/specificcountry ''" stepKey="specificCountryValue"/> |
38 |
| - <magentoCLI command="config:set {{CashOnDeliveryDisabledConfigData.path}} {{CashOnDeliveryDisabledConfigData.value}}" stepKey="disabledCashOnDelivery"/> |
39 |
| - |
| 38 | + <actionGroup ref="CashOnDeliverySpecificCountryActionGroup" stepKey="disableCashOnDelivery"/> |
40 | 39 | <!--Customer log out-->
|
41 | 40 | <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
|
42 | 41 | <!--Delete created product-->
|
|
72 | 71 | <waitForPageLoad stepKey="waitForNewAddressPageLoad"/>
|
73 | 72 |
|
74 | 73 | <!--Assert COD payment method is available for the specific allowed Country-->
|
75 |
| - <seeElement selector="input#cashondelivery" stepKey="seeCodPaymentMethod"/> |
| 74 | + <seeElement selector="{{StorefrontCheckoutPaymentMethodsSection.cashOnDelivery}}" stepKey="seeCodPaymentMethod"/> |
76 | 75 |
|
77 | 76 | <!--Select payment method-->
|
78 | 77 | <click selector="{{StorefrontCheckoutPaymentMethodsSection.cashOnDelivery}}" stepKey="selectCashOnDeliveryMethod"/>
|
79 | 78 |
|
80 | 79 | <!--Billing is same as shipping-->
|
81 |
| - <checkOption selector="#billing-address-same-as-shipping-cashondelivery" stepKey="selectPaymentSolution" /> |
| 80 | + <checkOption selector="{{CheckoutPaymentSection.billingAddressSameAsShippingCheckboxCod}}" stepKey="selectPaymentSolution" /> |
82 | 81 | <waitForPageLoad stepKey="waitForPageLoad"/>
|
83 | 82 |
|
84 | 83 | <!--Assert COD payment method not available anymore-->
|
85 |
| - <dontSeeElement selector="input#cashondelivery" stepKey="dontSeeCodPaymentMethod"/> |
| 84 | + <dontSeeElement selector="{{StorefrontCheckoutPaymentMethodsSection.cashOnDelivery}}" stepKey="dontSeeCodPaymentMethod"/> |
86 | 85 |
|
87 | 86 | <!-- Place order -->
|
88 | 87 | <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="PlaceOrder" />
|
89 | 88 | </test>
|
90 | 89 | </tests>
|
91 |
| - |
0 commit comments