Skip to content

Commit fda9603

Browse files
committed
ACQE-6381: AC-5336:Checkout as Guest using PayPal Checkout Smart button
addedDeleteProduct addedActionGroupNew changedElementSelector addedNewActionGroupToLoginAsCustomer fixedStaticCheckErrorDueToDependencyViolation removedUnusedArgumentToFixStaticCheckError addedConditionalClickInAdminOpenAccountInformationTabFromCustomerEditPageAllowAssistanceActionGroup changedSelectorDetailsinAdminCustomerAccountInformationSectionFile addedConditionalClickforelementcheckPaymentMethodByName addedCheckOption addedConditionalClickinGuestCheckoutUsingPayPalCheckoutWithSmartbuttonTest changesAddedAsPerTheReviewComment AddedPR_ExcludeTagAndAddedWaitForElementClickableInLoginToStorefrontNewActionGroupFile AddedPRExcludeandWaitforClickableTaginLoginToStorefrontNewActionGroup Changed Naming Convention for StorefrontLoginNewActionGroup.xml File ChangedFileNameFormatForTestFile
1 parent 995a05c commit fda9603

13 files changed

+365
-2
lines changed

app/code/Magento/Checkout/Test/Mftf/Section/StorefrontCheckoutPaymentMethodSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@
1717
<element name="paymentOnAccount" type="radio" selector="#companycredit" deprecated="Use StorefrontCheckoutPaymentSection.paymentOnAccount B2B repository"/>
1818
<element name="paymentOnAccountLabel" type="text" selector="//span[text()='Payment on Account']" deprecated="Use StorefrontCheckoutPaymentSection.paymentOnAccountLabel in B2B repository"/>
1919
<element name="purchaseOrderNumber" type="input" selector="#po_number"/>
20+
<element name="checkPaypalExpress" type="radio" selector="//div/input[@id='paypal_express']"/>
21+
<element name="checkPaypalExpressActive" type="radio" selector="//div[@class='payment-method _active']/div/input[@id='paypal_express']"/>
2022
</section>
2123
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminLoginAsCustomerLoginFromCustomerPageActionGroup">
12+
<annotations>
13+
<description>Verify Login as Customer Login action is works properly from Customer page.</description>
14+
</annotations>
15+
16+
<waitForElementClickable selector="{{AdminCustomerMainActionsSection.loginAsCustomer}}" stepKey="clickLoginAsCustomerLinkNew" after="waitForCustomerPageLoad"/>
17+
</actionGroup>
18+
</actionGroups>

app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerAccountInformationSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
<section name="AdminCustomerAccountInformationSection">
1212
<element name="accountInformationTab" type="button" selector="#tab_customer" timeout="30"/>
1313
<element name="statusInactive" type="button" selector=".admin__actions-switch-label"/>
14+
<element name="statusInactiveCheck" type="button" selector="//div/input[@class='admin__actions-switch-checkbox' and @name='customer[extension_attributes][assistance_allowed]' and @value='2']"/>
15+
<element name="statusInactiveNew" type="button" selector="//div/input[@class='admin__actions-switch-checkbox' and @name='customer[extension_attributes][assistance_allowed]']/..//child::label"/>
1416
<element name="accountInformationTitle" type="text" selector=".admin__page-nav-title"/>
1517
<element name="accountInformationButton" type="text" selector="//a/span[text()='Account Information']"/>
1618
<element name="addressesButton" type="select" selector="//a//span[contains(text(), 'Addresses')]"/>

app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInFormSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
<element name="forgotPasswordLink" type="button" selector=".action.remind" timeout="10"/>
1616
<element name="customerLoginBlock" type="text" selector=".login-container .block.block-customer-login"/>
1717
<element name="signInAccountLink" type="button" selector="//header[@class='page-header']//li/a[contains(.,'Sign In')]"/>
18+
<element name="signInClick" type="button" selector="#html-body > div.page-wrapper > header > div.panel.wrapper > div > ul > li.link.authorization-link > a" timeout="30"/>
1819
</section>
1920
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminOpenAccountInformationTabFromCustomerEditPageAllowAssistanceActionGroup">
12+
<annotations>
13+
<description>Click on Allow Assistance Button in Account Information Tab from Customer's edit page</description>
14+
</annotations>
15+
<waitForElementClickable selector="{{AdminCustomerAccountInformationSection.accountInformationTab}}" stepKey="waitForAccountInformationTab"/>
16+
<click selector="{{AdminCustomerAccountInformationSection.accountInformationTab}}" stepKey="clickAccountInformationTab"/>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
<conditionalClick selector="{{AdminCustomerAccountInformationSection.statusInactiveNew}}" dependentSelector="{{AdminCustomerAccountInformationSection.statusInactiveCheck}}" visible="false" stepKey="clickOnAllowAssistanceOnCondition"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontLoginNewActionGroup">
12+
<annotations>
13+
<description>Goes to the Storefront Customer Sign In page. Logs in using the provided Customer.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="Customer"/>
17+
</arguments>
18+
19+
<amOnPage url="{{StorefrontCustomerSignInPage.url}}" stepKey="amOnSignInPage"/>
20+
<waitForPageLoad time="30" stepKey="waitPageFullyLoaded"/>
21+
<amOnPage url="{{StorefrontCustomerLogoutPage.url}}" stepKey="storefrontSignOut"/>
22+
<waitForPageLoad stepKey="waitForSignOut"/>
23+
<waitForElementClickable selector="{{StorefrontCustomerSignInFormSection.signInClick}}" stepKey="waitForSignInButton"/>
24+
<click selector="{{StorefrontCustomerSignInFormSection.signInClick}}" stepKey="clickSignInButton"/>
25+
<amOnPage url="{{StorefrontCustomerSignInPage.url}}" stepKey="amOnSignInPage1"/>
26+
<waitForPageLoad time="30" stepKey="waitPageFullyLoaded1"/>
27+
<waitForElementVisible selector="{{StorefrontCustomerSignInFormSection.emailField}}" stepKey="waitFormAppears"/>
28+
<fillField userInput="{{Customer.email}}" selector="{{StorefrontCustomerSignInFormSection.emailField}}" stepKey="fillEmail"/>
29+
<fillField userInput="{{Customer.password}}" selector="{{StorefrontCustomerSignInFormSection.passwordField}}" stepKey="fillPassword"/>
30+
<click selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}" stepKey="clickSignInAccountButton"/>
31+
<waitForPageLoad stepKey="waitForCustomerLoggedIn"/>
32+
</actionGroup>
33+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="StorefrontLoginToPayPalValidatePayPalPopupActionGroup">
11+
<!--Check in-context-->
12+
<switchToNextTab stepKey="switchToInContentTab"/>
13+
<waitForPageLoad stepKey="waitForPageLoad"/>
14+
<seeCurrentUrlMatches regex="~\//www.sandbox.paypal.com/~" stepKey="seeCurrentUrlMatchesConfigPath1"/>
15+
<waitForElementVisible selector="{{PayPalPaymentSection.email}}" stepKey="waitForLoginForm" />
16+
<waitForElementVisible selector="{{PayPalPaymentSection.paypalPopupButton1}}" stepKey="seeEnabledPaymentButton"/>
17+
</actionGroup>
18+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="StorefrontLoginToPayPalValidatePayPalPopupCreateAccountActionGroup">
11+
<!--Check in-context-->
12+
<switchToNextTab stepKey="switchToInContentTab"/>
13+
<waitForPageLoad stepKey="waitForPageLoad"/>
14+
<seeCurrentUrlMatches regex="~\//www.sandbox.paypal.com/~" stepKey="seeCurrentUrlMatchesConfigPath1"/>
15+
<waitForElementVisible selector="{{PayPalPaymentSection.email}}" stepKey="waitForLoginForm" />
16+
<waitForElementVisible selector="{{PayPalPaymentSection.paypalPopupButton2}}" stepKey="seeEnabledPaymentButtonNew"/>
17+
</actionGroup>
18+
</actionGroups>

app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,4 +229,10 @@
229229
<data key="paypal_paymentspro_vendor">MksGLTest</data>
230230
<data key="paypal_paymentspro_password">Abcd@123</data>
231231
</entity>
232+
<entity name="validCreditCard" type="data">
233+
<data key="cardNumber">4111111111111111</data>
234+
<data key="month">12</data>
235+
<data key="year">25</data>
236+
<data key="cvv">123</data>
237+
</entity>
232238
</entities>

app/code/Magento/Paypal/Test/Mftf/Section/OtherPayPalPaymentsConfigSection/OtherPayPalPaymentsConfigSection.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@
66
*/
77
-->
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="OtherPayPalPaymentsConfigSection">
1111
<element name="expandTab" type="button" selector="#payment_{{countryCode}}_other_paypal_payment_solutions-head" parameterized="true"/>
12+
<element name="expandTab1" type="button" selector="//a[@id='payment_{{countryCode}}_other_paypal_payment_solutions-head']" parameterized="true"/>
1213
<element name="expandedTab" type="button" selector="#payment_{{countryCode}}_other_paypal_payment_solutions-head.open" parameterized="true"/>
14+
<element name="expandTabNew" type="button" selector="//a[@id='payment_{{countryCode}}_paypal_payment_gateways-head']" parameterized="true"/>
15+
<element name="expandedTabNew" type="button" selector="//a[@id='payment_{{countryCode}}_paypal_payment_gateways-head' and @class='open']" parameterized="true"/>
1316
</section>
1417
</sections>

0 commit comments

Comments
 (0)