|
13 | 13 | <features value="Checkout"/> |
14 | 14 | <stories value="Checkout for Afghanistan Countries"/> |
15 | 15 | <title value="Storefront guest checkout for Afghanistan countries with flat rate and free shipping"/> |
16 | | - <description value="Checkout flow if flat rate anf free shipping method are disabled for all countries except Afghanistan"/> |
| 16 | + <description value="Checkout flow if flat rate and free shipping method are disabled for all countries except Afghanistan"/> |
17 | 17 | <severity value="AVERAGE"/> |
18 | 18 | <testCaseId value="AC-7617"/> |
19 | 19 | <group value="checkout"/> |
|
22 | 22 | <!-- Precondition Step 1: Create simple product --> |
23 | 23 | <createData entity="_defaultProduct" stepKey="createSimpleProduct"/> |
24 | 24 | <!-- Precondition Step 2: Enable Free Shipping for Specific Countries = Afghanistan --> |
25 | | - <magentoCLI command="config:set {{EnableFreeShippingConfigData.path}} {{EnableFreeShippingConfigData.value}}" stepKey="enableFreeShipping"/> |
26 | | - <magentoCLI command="config:set {{EnableFreeShippingToSpecificCountriesConfigData.path}} {{EnableFreeShippingToSpecificCountriesConfigData.value}}" stepKey="limitFreeShippingToSpecificCountries"/> |
27 | | - <magentoCLI command="config:set {{EnableFreeShippingToAfghanistanConfigData.path}} {{EnableFreeShippingToAfghanistanConfigData.value}}" stepKey="setFreeShippingSpecificCountryAF"/> |
| 25 | + <actionGroup ref="CliEnableFreeShippingMethodActionGroup" stepKey="enableFreeShippingMethod"/> |
| 26 | + <actionGroup ref="AdminEnableFreeShippingToSpecificCountriesActionGroup" stepKey="enableToSpecificCountries"/> |
28 | 27 | <!-- Enable Flat Rate for Specific Countries = Afghanistan --> |
29 | | - <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> |
30 | | - <magentoCLI command="config:set {{EnableFlatRateToSpecificCountriesConfigData.path}} {{EnableFlatRateToSpecificCountriesConfigData.value}}" stepKey="limitFlatRateToSpecificCountries"/> |
31 | | - <magentoCLI command="config:set {{EnableFlatRateToAfghanistanConfigData.path}} {{EnableFlatRateToAfghanistanConfigData.value}}" stepKey="setFlatRateSpecificCountryAF"/> |
32 | | - <!-- Precondition Step 3: Disable all other carriers --> |
33 | | - <magentoCLI command="config:set {{AdminDisableUPSConfigData.path}} {{AdminDisableUPSConfigData.value}}" stepKey="disableUPSCarrier"/> |
34 | | - <magentoCLI command="config:set {{AdminDisableUSPSConfigData.path}} {{AdminDisableUSPSConfigData.value}}" stepKey="disableUSPSCarrier"/> |
35 | | - <magentoCLI command="config:set {{AdminFedexDisableForCheckoutConfigData.path}} {{AdminFedexDisableForCheckoutConfigData.value}}" stepKey="disableFedExCarrier"/> |
36 | | - <magentoCLI command="config:set {{AdminDHLDisableConfigData.path}} {{AdminDHLDisableConfigData.value}}" stepKey="disableDHLCarrier"/> |
| 28 | + <actionGroup ref="AdminEnableFlatRateToSpecificCountriesActionGroup" stepKey="enableFlatRateToSpecificCountries"/> |
37 | 29 | </before> |
38 | 30 | <after> |
39 | 31 | <!-- Revert Free Shipping and Flat Rate restrictions --> |
40 | | - <magentoCLI command="config:set {{DisableFreeShippingConfigData.path}} {{DisableFreeShippingConfigData.value}}" stepKey="disableFreeShipping"/> |
41 | | - <magentoCLI command="config:set {{EnableFreeShippingToAllAllowedCountriesConfigData.path}} {{EnableFreeShippingToAllAllowedCountriesConfigData.value}}" stepKey="freeShippingAllCountries"/> |
42 | | - <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> |
43 | | - <magentoCLI command="config:set {{EnableFlatRateToAllAllowedCountriesConfigData.path}} {{EnableFlatRateToAllAllowedCountriesConfigData.value}}" stepKey="flatRateAllCountries"/> |
| 32 | + <actionGroup ref="CliDisableFreeShippingMethodActionGroup" stepKey="disableFreeShipping"/> |
| 33 | + <actionGroup ref="AdminEnableFreeShippingToAllCountriesActionGroup" stepKey="enableAllCountries"/> |
| 34 | + <actionGroup ref="AdminEnableFlatRateToAllCountriesActionGroup" stepKey="selectAllCountries"/> |
44 | 35 | <!-- Delete product --> |
45 | 36 | <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
46 | 37 | </after> |
47 | 38 | <!-- Step 1: Go to Storefront as Guest --> |
48 | 39 | <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefront"/> |
49 | 40 | <!-- Step 2: Add simple product to cart --> |
50 | | - <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="goToSimple2ProductPage"> |
| 41 | + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="navigateToProductPage"> |
51 | 42 | <argument name="product" value="$createSimpleProduct$"/> |
52 | 43 | </actionGroup> |
53 | | - <actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPageActionGroup" stepKey="addSimple2ToCart"> |
| 44 | + <actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPageActionGroup" stepKey="addProductToCart"> |
54 | 45 | <argument name="productName" value="$createSimpleProduct.name$"/> |
55 | 46 | <argument name="productQty" value="1"/> |
56 | 47 | </actionGroup> |
|
72 | 63 | <actionGroup ref="AssertStoreFrontShippingMethodAvailableActionGroup" stepKey="seeFreeShipping"> |
73 | 64 | <argument name="shippingMethodName" value="Free Shipping"/> |
74 | 65 | </actionGroup> |
75 | | - <waitForElementVisible selector="{{CheckoutShippingMethodsSection.next}}" stepKey="sSeeNextButton"/> |
| 66 | + <waitForElementVisible selector="{{CheckoutShippingMethodsSection.next}}" stepKey="seeNextButton"/> |
76 | 67 | </test> |
77 | 68 | </tests> |
0 commit comments