Skip to content

Commit 82d18b2

Browse files
committed
ACQE-6733 : Verify Terms and Conditions
Modified actionGroup
1 parent 2df5f0c commit 82d18b2

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/StorefrontTermInCheckoutAndPlaceOrderActionGroup.xml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,12 @@
1313
<argument name="termCheckboxText" type="string"/>
1414
</arguments>
1515
<!--Check if agreement is present on checkout and select it-->
16-
<scrollTo selector=".checkout-agreements-block" stepKey="scrollToCheckoutAgreementBlock"/>
17-
<click selector=".checkout-agreements-block" stepKey="waitForCheckoutAgreementBlockToBeClickable"/>
18-
<waitForText selector="{{StorefrontCheckoutAgreementsSection.checkoutAgreementButton}}" userInput="{{termCheckboxText}}" stepKey="seeTermInCheckout"/>
16+
<scrollTo selector="{{StorefrontCheckoutAgreementsSection.checkoutAgreementBlock}}" stepKey="scrollToCheckoutAgreementBlock"/>
1917
<waitForElementClickable selector="{{StorefrontCheckoutAgreementsSection.checkoutAgreementCheckbox}}" stepKey="waitForCheckAgreementToBeClickable"/>
2018
<selectOption selector="{{StorefrontCheckoutAgreementsSection.checkoutAgreementCheckboxInput}}" userInput="{{termCheckboxText}}" stepKey="checkAgreement"/>
21-
2219
<!--Checkout select Check/Money Order payment-->
23-
<waitForPageLoad stepKey="waitForPaymentPageRendering"/>
24-
<waitForPageLoad stepKey="waitForPaymentRendering"/>
25-
<conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Check / Money order')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Check / Money order')}}" visible="true" stepKey="selectCheckmoPaymentMethod"/>
26-
<waitForPageLoad stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/>
27-
28-
<!--Click Place Order button-->
20+
<waitForPageLoad stepKey="waitForPageLoad"/>
21+
<waitForElementClickable selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="waitForPlaceOrderButtonClickable"/>
2922
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/>
3023
<waitForPageLoad stepKey="waitForOrderPlaced"/>
3124
</actionGroup>

app/code/Magento/CheckoutAgreements/Test/Mftf/Section/StorefrontCheckoutAgreementsSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontCheckoutAgreementsSection">
1212
<element name="checkoutAgreementCheckboxInput" type="checkbox" selector="input#agreement_checkmo_3.required-entry"/>
13+
<element name="checkoutAgreementBlock" type="checkbox" selector=".checkout-agreements-block"/>
1314
<element name="checkoutAgreementCheckbox" type="checkbox" selector="div.checkout-agreement.field.choice.required > input"/>
1415
<element name="checkoutAgreementButton" type="button" selector="div.checkout-agreements-block > div > div > div > label > button > span"/>
1516
<element name="checkoutAgreementErrorMessage" type="button" selector="div.checkout-agreement.field.choice.required > div.mage-error"/>
1617
<element name="checkoutAgreementCheckboxcheck" type="checkbox" selector="//span[text()='{{agreementname}}']/../../../input[@type='checkbox']" parameterized="true"/>
1718
<element name="contentArea" type="text" selector="//div[@class='modals-wrapper']//aside[@class='modal-popup agreements-modal modal-slide _inner-scroll _show']//div[@class='checkout-agreements-item-content' and contains(text(), '{{contentText}}')]" parameterized="true"/>
1819
<element name="close" type="button" selector="//div[@class='modals-wrapper']//aside[@class='modal-popup agreements-modal modal-slide _inner-scroll _show']//footer//span"/>
19-
<element name="defaultPaymentAgreementCheckboxCheck" type="checkbox" selector="//div[@class='payment-method _active']//span[text()='{{agreementName}}']/../../../input[@type='checkbox']" parameterized="true"/>
2020
</section>
2121
</sections>

0 commit comments

Comments
 (0)