|
18 | 18 | <testCaseId value="AC-4628"/>
|
19 | 19 | </annotations>
|
20 | 20 | <before>
|
21 |
| - <!-- Enable free shipping --> |
22 |
| - <createData entity="FreeShippingMethodsSettingConfig" stepKey="freeShippingMethodsSettingConfig"/> |
| 21 | + <!-- Enable free shipping --> |
| 22 | + <createData entity="FreeShippingMethodsSettingConfig" stepKey="enableFreeShippingConfig"/> |
23 | 23 | <!-- create category -->
|
24 | 24 | <createData entity="_defaultCategory" stepKey="createCategory"/>
|
25 | 25 | <!-- create simple product -->
|
|
28 | 28 | </createData>
|
29 | 29 | </before>
|
30 | 30 | <after>
|
| 31 | + <createData entity="DisableFreeShippingConfig" stepKey="disableFreeShippingConfig"/> |
31 | 32 | <!-- delete category -->
|
32 | 33 | <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
|
33 | 34 | <!-- delete simple product -->
|
34 | 35 | <deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
|
35 | 36 | </after>
|
36 | 37 | <!-- Step 1: Go to Storefront as Guest -->
|
37 | 38 | <!-- Step 2: Add simple product to shopping cart -->
|
38 |
| - <amOnPage url="{{StorefrontProductPage.url($createProduct.custom_attributes[url_key]$)}}" stepKey="amOnSimpleProductPage"/> |
39 |
| - <waitForPageLoad stepKey="waitForPageLoadToGetTheStorePageOpenAgain"/> |
40 |
| - <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="cartAddSimpleProductToCart"> |
| 39 | + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProductPage"> |
| 40 | + <argument name="product" value="$$createProduct$$"/> |
| 41 | + </actionGroup> |
| 42 | + <waitForPageLoad stepKey="waitForPageLoadToGetTheStorePageOpen"/> |
| 43 | + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addSimpleProductToCartFromStorefront"> |
41 | 44 | <argument name="productName" value="$createProduct.name$"/>
|
42 | 45 | </actionGroup>
|
43 | 46 | <!-- Proceed to Checkout -->
|
44 |
| - <actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickToOpenCard"/> |
45 |
| - <click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="clickToProceedToCheckout"/> |
46 |
| - <waitForPageLoad stepKey="waitForTheFormIsOpened"/> |
| 47 | + <actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckout"/> |
| 48 | + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/> |
47 | 49 | <!-- verify shipping screen is opened -->
|
48 |
| - <seeElement selector="{{CheckoutShippingSection.isShippingStep}}" stepKey="shippingStepIsOpened"/> |
| 50 | + <waitForElement selector="{{CheckoutShippingSection.isShippingStep}}" stepKey="shippingStepIsOpened"/> |
49 | 51 | <!--Fill Shipping Form-->
|
50 | 52 | <!--Filling shipping information and click next-->
|
51 | 53 | <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping">
|
52 | 54 | <argument name="shippingMethod" value="Flat Rate"/>
|
53 | 55 | </actionGroup>
|
54 | 56 | <!--Review & Payments step of checkout is opened-->
|
55 | 57 | <!--Verify Billing address is correct-->
|
56 |
| - <actionGroup ref="CheckShipToInformationInCheckoutActionGroup" stepKey="checkoutCheckShipToInformation"> |
| 58 | + <actionGroup ref="CheckShipToInformationInCheckoutActionGroup" stepKey="verifyShipToInformation"> |
57 | 59 | <argument name="customerVar" value="CustomerEntityOne" />
|
58 | 60 | <argument name="customerAddressVar" value="CustomerAddressSimple" />
|
59 | 61 | </actionGroup>
|
60 | 62 | <!-- Assert Shipping Method = "Flat Rate" -->
|
61 |
| - <see userInput="Flat Rate - Fixed" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertShippingMethod"/> |
| 63 | + <waitForText userInput="Flat Rate - Fixed" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertShippingMethod"/> |
62 | 64 | <!-- Reload Page and wait for page to get reload -->
|
63 | 65 | <reloadPage stepKey="refreshPage"/>
|
64 | 66 | <waitForPageLoad stepKey="waitForPageLoad"/>
|
65 | 67 | <!-- Check that "Ship To" block contains correct information -->
|
66 |
| - <waitForElementVisible selector="{{CheckoutPaymentSection.shipToInformation}}" stepKey="waitForShippingInformationToAppear"/> |
67 |
| - <see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.firstName}}" stepKey="seeShipToFirstName" /> |
68 |
| - <see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.lastName}}" stepKey="seeShipToLastName" /> |
69 |
| - <see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.street[0]}}" stepKey="seeShipToStreet" /> |
70 |
| - <see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.city}}" stepKey="seeShipToCity" /> |
71 |
| - <see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.state}}" stepKey="seeShipToState" /> |
72 |
| - <see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.postcode}}" stepKey="seeShipToPostcode" /> |
73 |
| - <see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.telephone}}" stepKey="seeShipToTelephone" /> |
| 68 | + <waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.firstName}}" stepKey="assertShipToFirstName" /> |
| 69 | + <waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.lastName}}" stepKey="assertShipToLastName" /> |
| 70 | + <waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.street[0]}}" stepKey="assertShipToStreet" /> |
| 71 | + <waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.city}}" stepKey="assertShipToCity" /> |
| 72 | + <waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.state}}" stepKey="assertShipToState" /> |
| 73 | + <waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.postcode}}" stepKey="assertShipToPostcode" /> |
| 74 | + <waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.telephone}}" stepKey="assertShipToTelephone" /> |
74 | 75 | <!-- Assert Shipping Method = "Flat Rate" -->
|
75 |
| - <see userInput="Flat Rate - Fixed" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertShippingMethodAgain"/> |
| 76 | + <waitForText userInput="Flat Rate - Fixed" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertShippingMethodAgain"/> |
76 | 77 | <!-- click on Edit button next to "Ship To" Text -->
|
77 |
| - <click selector="{{CheckoutPaymentSection.editShipToInformation}}" stepKey="clickOnEditButton"/> |
| 78 | + <waitForElementVisible selector="{{CheckoutPaymentSection.editShipToAddress}}" stepKey="waitForEditButtonToBeVisible"/> |
| 79 | + <click selector="{{CheckoutPaymentSection.editShipToAddress}}" stepKey="clickOnEditButton"/> |
78 | 80 | <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShippingSectionAgain">
|
79 | 81 | <argument name="customerVar" value="CustomerEntityOne"/>
|
80 | 82 | <argument name="customerAddressVar" value="CustomerAddressSimple"/>
|
81 | 83 | </actionGroup>
|
82 | 84 | <!-- Check that "Ship To" block contains correct information -->
|
83 |
| - <see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerEntityOne.firstname}}" stepKey="seeShipToFirstNameAgain" /> |
84 |
| - <see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerEntityOne.lastname}}" stepKey="seeShipToLastNameAgain" /> |
85 |
| - <see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.city}}" stepKey="seeShipToCityAgain" /> |
| 85 | + <waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerEntityOne.firstname}}" stepKey="assertShipToFirstNameAgain" /> |
| 86 | + <waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerEntityOne.lastname}}" stepKey="assertShipToLastNameAgain" /> |
| 87 | + <waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.city}}" stepKey="assertShipToCityAgain" /> |
86 | 88 | <!-- Assert Shipping Method = "Free Shipping" -->
|
87 |
| - <see userInput="Free Shipping - Free" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertFreeShippingMethod"/> |
| 89 | + <waitForText userInput="Free Shipping - Free" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertFreeShippingMethod"/> |
88 | 90 | <!-- click on Edit button next to "Shipping Method" Text -->
|
89 |
| - <click selector="{{CheckoutPaymentSection.editShipMethodInformation}}" stepKey="clickOnEditShippingMethodButton"/> |
| 91 | + <waitForElementVisible selector="{{CheckoutPaymentSection.editShippingMethod}}" stepKey="waitForEditButtonToVisible"/> |
| 92 | + <click selector="{{CheckoutPaymentSection.editShippingMethod}}" stepKey="clickOnEditShippingMethodButton"/> |
90 | 93 | <!-- Assert that it has scrolled to Shipping Method text -->
|
91 |
| - <waitForElementVisible selector="{{CheckoutPaymentSection.shippingMethodTitle}}" stepKey="waitForShippingMethodTitle"/> |
92 | 94 | <scrollTo selector="{{CheckoutPaymentSection.shippingMethodTitle}}" stepKey="scrollToShippingMethodTitle"/>
|
93 |
| - <see selector="{{CheckoutPaymentSection.shippingMethodTitle}}" userInput="Shipping Methods" stepKey="seeShippingMethodTitle"/> |
| 95 | + <waitForText selector="{{CheckoutPaymentSection.shippingMethodTitle}}" userInput="Shipping Methods" stepKey="assertShippingMethodTitle"/> |
94 | 96 | </test>
|
95 | 97 | </tests>
|
0 commit comments