Skip to content

Commit 627987e

Browse files
“Pavan-bj” “Pavan-bj” 
authored andcommitted
ACQE-6915 | Several Terms and Conditions with different types are shown on PayPal express checkout review page
Added fix for the PR
1 parent 6674eb0 commit 627987e

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<element name="checkoutAgreementLink" type="button" selector="//div[@id='checkout-payment-method-load']//label//span[contains(., '{{paymentName}}')]//ancestor::div[contains(@class, 'payment-method _active')]//div[contains(@class, 'checkout-agreements-block')]//span" parameterized="true"/>
1717
<element name="agreementClose" type="button" selector=".agreements-modal._show .action-close"/>
1818
<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"/>
19-
<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="manualCheckoutAgreementLink" type="button" selector="//input[starts-with(@id,'{{paymentName}}')]/..//label//span" parameterized="true"/>
20+
<element name="automaticCheckoutAgreementLink" type="button" selector="//input[starts-with(@id,'{{paymentName}}')]/..//following-sibling::div//button//span" parameterized="true"/>
2021
</section>
2122
</sections>

app/code/Magento/CheckoutAgreements/Test/Mftf/Test/StorefrontAssertSeveralTermsAndConditionsOnPayPalExpressCheckoutReviewPageTest.xml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@
4545
<argument name="term" value="newHtmlAutomaticallyTerm"/>
4646
</actionGroup>
4747
<actionGroup ref="AdminTermsConditionsSaveTermActionGroup" stepKey="saveAutomaticTerm"/>
48+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
49+
<argument name="indices" value=""/>
50+
</actionGroup>
51+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
52+
<argument name="tags" value="config full_page"/>
53+
</actionGroup>
4854
<!-- Login as customer -->
4955
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomerLogin">
5056
<argument name="Customer" value="$$createCustomer$$"/>
@@ -60,16 +66,17 @@
6066
<waitForElementClickable selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="waitForPayPalRadioButton"/>
6167
<click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="selectPaypalPayment"/>
6268
<!-- Verify both manual and automatic are present -->
63-
<waitForText selector="{{CheckoutPaymentSection.brainTreeManualCheckoutAgreementLink}}" userInput="{{newHtmlTerm.checkboxText}}" stepKey="seeManualTermTextInCheckoutIsPresent"/>
64-
<waitForText selector="{{CheckoutPaymentSection.brainTreeAutomaticCheckoutAgreementLink}}" userInput="{{newHtmlAutomaticallyTerm.checkboxText}}" stepKey="seeAutomaticTermTextInCheckoutIsPresent"/>
69+
<waitForText selector="{{StorefrontCheckoutAgreementsSection.manualCheckoutAgreementLink('agreement_paypal_express')}}" userInput="{{newHtmlTerm.checkboxText}}" stepKey="seeManualTermTextInCheckoutIsPresent"/>
70+
<waitForText selector="{{StorefrontCheckoutAgreementsSection.automaticCheckoutAgreementLink('agreement_paypal_express')}}" userInput="{{newHtmlAutomaticallyTerm.checkboxText}}" stepKey="seeAutomaticTermTextInCheckoutIsPresent"/>
6571
<!-- open manual terms and conditions and verify content messages-->
66-
<waitForElementClickable selector="{{CheckoutPaymentSection.brainTreeManualCheckoutAgreementLink}}" stepKey="waitForManualTermTextInCheckoutIsClickable"/>
67-
<click selector="{{CheckoutPaymentSection.brainTreeManualCheckoutAgreementLink}}" stepKey="clickManualTermTextInCheckout"/>
72+
<waitForElementClickable selector="{{StorefrontCheckoutAgreementsSection.manualCheckoutAgreementLink('agreement_paypal_express')}}" stepKey="waitForManualTermTextInCheckoutIsClickable"/>
73+
<click selector="{{StorefrontCheckoutAgreementsSection.manualCheckoutAgreementLink('agreement_paypal_express')}}" stepKey="clickManualTermTextInCheckout"/>
6874
<waitForElement selector="{{StorefrontCheckoutAgreementsSection.contentArea(newHtmlTerm.content)}}" stepKey="verifyManualTermContentTextMessage"/>
69-
<waitForElementClickable selector="{{StorefrontCheckoutAgreementsSection.close}}" stepKey="waitForCloseToBeClickable"/>
70-
<click selector="{{StorefrontCheckoutAgreementsSection.close}}" stepKey="ClickOnClose"/>
71-
<waitForElementClickable selector="{{CheckoutPaymentSection.brainTreeAutomaticCheckoutAgreementLink}}" stepKey="waitForAutomaticTermTextInCheckoutIsClickable"/>
72-
<click selector="{{CheckoutPaymentSection.brainTreeAutomaticCheckoutAgreementLink}}" stepKey="clickAutomaticTermTextInCheckoutIsClickable"/>
75+
<waitForElementClickable selector="{{StorefrontCheckoutAgreementsSection.agreementClose}}" stepKey="waitForCloseToBeClickable"/>
76+
<click selector="{{StorefrontCheckoutAgreementsSection.agreementClose}}" stepKey="ClickOnClose"/>
77+
<!-- open automatic terms and conditions and verify content messages-->
78+
<waitForElementClickable selector="{{StorefrontCheckoutAgreementsSection.automaticCheckoutAgreementLink('agreement_paypal_express')}}" stepKey="waitForAutomaticTermTextInCheckoutIsClickable"/>
79+
<click selector="{{StorefrontCheckoutAgreementsSection.automaticCheckoutAgreementLink('agreement_paypal_express')}}" stepKey="clickAutomaticTermTextInCheckoutIsClickable"/>
7380
<waitForElement selector="{{StorefrontCheckoutAgreementsSection.contentArea(newHtmlAutomaticallyTerm.content)}}" stepKey="verifyAutomaticTermContentTextMessage"/>
7481
</test>
7582
</tests>

0 commit comments

Comments
 (0)