|
8 | 8 |
|
9 | 9 | <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
10 | 10 | xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
|
11 |
| - <actionGroup name="StorefrontAssertTermInCheckout"> |
| 11 | + <actionGroup name="StorefrontAssertTermInCheckoutActionGroup"> |
12 | 12 | <arguments>
|
13 | 13 | <argument name="termCheckboxText" type="string"/>
|
14 |
| - <argument name="product" defaultValue="SimpleTwo"/> |
15 | 14 | </arguments>
|
16 |
| - |
17 |
| - <!--Add product to cart--> |
18 |
| - <amOnPage url="{{StorefrontProductPage.url(product.custom_attributes[url_key])}}" stepKey="goToProductPage"/> |
19 |
| - <waitForPageLoad stepKey="waitForProductPage"/> |
20 |
| - <click selector="{{StorefrontProductPageSection.addToCartBtn}}" stepKey="addToCart"/> |
21 |
| - <waitForElementNotVisible selector="{{StorefrontProductActionSection.addToCartButtonTitleIsAdding}}" stepKey="waitForElementNotVisibleAddToCartButtonTitleIsAdding"/> |
22 |
| - <waitForElementNotVisible selector="{{StorefrontProductActionSection.addToCartButtonTitleIsAdded}}" stepKey="waitForElementNotVisibleAddToCartButtonTitleIsAdded"/> |
23 |
| - <waitForElementVisible selector="{{StorefrontProductActionSection.addToCartButtonTitleIsAddToCart}}" stepKey="waitForElementVisibleAddToCartButtonTitleIsAddToCart"/> |
24 |
| - <waitForPageLoad stepKey="waitForPageLoad"/> |
25 |
| - <waitForElementVisible selector="{{StorefrontMessagesSection.success}}" time="30" stepKey="waitForProductAddedMessage"/> |
26 |
| - <see selector="{{StorefrontMessagesSection.success}}" userInput="You added {{product.name}} to your shopping cart." stepKey="seeAddToCartSuccessMessage"/> |
27 |
| - |
28 |
| - <!--Go to Checkout--> |
29 |
| - <waitForElementNotVisible selector="{{StorefrontMinicartSection.emptyCart}}" stepKey="waitUpdateQuantity"/> |
30 |
| - <wait time="5" stepKey="waitMinicartRendering"/> |
31 |
| - <click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/> |
32 |
| - <click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="goToCheckout"/> |
33 |
| - |
34 |
| - <!--Process steps--> |
35 |
| - <fillField selector="{{CheckoutShippingSection.email}}" userInput="{{CustomerEntityOne.email}}" stepKey="enterEmail"/> |
36 |
| - <fillField selector="{{CheckoutShippingSection.firstName}}" userInput="{{CustomerEntityOne.firstname}}" stepKey="enterFirstName"/> |
37 |
| - <fillField selector="{{CheckoutShippingSection.lastName}}" userInput="{{CustomerEntityOne.lastname}}" stepKey="enterLastName"/> |
38 |
| - <fillField selector="{{CheckoutShippingSection.street}}" userInput="{{CustomerAddressSimple.street[0]}}" stepKey="enterStreet"/> |
39 |
| - <fillField selector="{{CheckoutShippingSection.city}}" userInput="{{CustomerAddressSimple.city}}" stepKey="enterCity"/> |
40 |
| - <selectOption selector="{{CheckoutShippingSection.region}}" userInput="{{CustomerAddressSimple.state}}" stepKey="selectRegion"/> |
41 |
| - <fillField selector="{{CheckoutShippingSection.postcode}}" userInput="{{CustomerAddressSimple.postcode}}" stepKey="enterPostcode"/> |
42 |
| - <fillField selector="{{CheckoutShippingSection.telephone}}" userInput="{{CustomerAddressSimple.telephone}}" stepKey="enterTelephone"/> |
43 |
| - <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask1"/> |
44 |
| - <click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('')}}" stepKey="selectShippingMethod"/> |
45 |
| - <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask2"/> |
46 |
| - <waitForElement selector="{{CheckoutShippingSection.next}}" time="30" stepKey="waitForNextButton"/> |
47 |
| - <click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext"/> |
48 |
| - <waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" time="30" stepKey="waitForPaymentSectionLoaded"/> |
49 |
| - <seeInCurrentUrl url="{{CheckoutPage.url}}/#payment" stepKey="assertCheckoutPaymentUrl"/> |
50 |
| - |
51 | 15 | <!--Check if agreement is present on checkout and select it-->
|
52 | 16 | <see selector="{{StorefrontCheckoutAgreementsSection.checkoutAgreementButton}}" userInput="{{termCheckboxText}}" stepKey="seeTermInCheckout"/>
|
53 | 17 | <selectOption selector="{{StorefrontCheckoutAgreementsSection.checkoutAgreementCheckbox}}" userInput="{{termCheckboxText}}" stepKey="checkAgreement"/>
|
54 | 18 |
|
55 | 19 | <!--Checkout select Check/Money Order payment-->
|
56 |
| - <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask3"/> |
57 |
| - <waitForPageLoad stepKey="waitForPageLoad2"/> |
| 20 | + <waitForLoadingMaskToDisappear stepKey="waitForPaymentPageRendering"/> |
| 21 | + <waitForPageLoad stepKey="waitForPaymentRendering"/> |
58 | 22 | <conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Check / Money order')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Check / Money order')}}" visible="true" stepKey="selectCheckmoPaymentMethod"/>
|
59 | 23 | <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/>
|
60 | 24 |
|
|
0 commit comments