|
16 | 16 | <argument name="credentials" defaultValue="_CREDS"/>
|
17 | 17 | <argument name="countryCode" type="string" defaultValue="us"/>
|
18 | 18 | </arguments>
|
19 |
| - |
| 19 | + |
| 20 | + <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/> |
| 21 | + <waitForPageLoad stepKey="waitForPageLoad1"/> |
| 22 | + <click selector="{{PayPalExpressCheckoutConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalConfigureBtn"/> |
| 23 | + <waitForElementVisible selector="{{PayPalAdvancedSettingConfigSection.advancedSettingTab(countryCode)}}" stepKey="waitForAdvancedSettingTab"/> |
| 24 | + <fillField selector ="{{PayPalExpressCheckoutConfigSection.email(countryCode)}}" userInput="{{credentials.magento/paypal_express_checkout_us_business_account}}" stepKey="inputEmailAssociatedWithPayPalMerchantAccount"/> |
| 25 | + <selectOption selector ="{{PayPalExpressCheckoutConfigSection.apiMethod(countryCode)}}" userInput="API Signature" stepKey="inputAPIAuthenticationMethods"/> |
| 26 | + <fillField selector ="{{PayPalExpressCheckoutConfigSection.username(countryCode)}}" userInput="{{credentials.magento/paypal_express_checkout_us_api_username}}" stepKey="inputAPIUsername"/> |
| 27 | + <fillField selector ="{{PayPalExpressCheckoutConfigSection.password(countryCode)}}" userInput="{{credentials.magento/paypal_express_checkout_us_api_password}}" stepKey="inputAPIPassword"/> |
| 28 | + <fillField selector ="{{PayPalExpressCheckoutConfigSection.signature(countryCode)}}" userInput="{{credentials.magento/paypal_express_checkout_us_api_signature}}" stepKey="inputAPISignature"/> |
| 29 | + <selectOption selector ="{{PayPalExpressCheckoutConfigSection.sandboxMode(countryCode)}}" userInput="Yes" stepKey="enableSandboxMode"/> |
| 30 | + <selectOption selector="{{PayPalExpressCheckoutConfigSection.enableSolution(countryCode)}}" userInput="Yes" stepKey="enableSolution"/> |
| 31 | + <fillField selector ="{{PayPalExpressCheckoutConfigSection.merchantID(countryCode)}}" userInput="{{credentials.magento/paypal_express_checkout_us_merchant_id}}" stepKey="inputMerchantID"/> |
| 32 | + <!--Save configuration--> |
| 33 | + <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/> |
| 34 | + </actionGroup> |
| 35 | + |
| 36 | + <actionGroup name="SampleConfigPayPalExpressCheckout"> |
| 37 | + <annotations> |
| 38 | + <description>Goes to the 'Configuration' page for 'Payment Methods'. Fills in the provided Sample PayPal credentials and other details. Clicks on Save.</description> |
| 39 | + </annotations> |
| 40 | + <arguments> |
| 41 | + <argument name="credentials" defaultValue="SamplePaypalExpressConfig"/> |
| 42 | + <argument name="countryCode" type="string" defaultValue="us"/> |
| 43 | + </arguments> |
20 | 44 | <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
|
21 | 45 | <waitForPageLoad stepKey="waitForPageLoad1"/>
|
22 | 46 | <click selector="{{PayPalExpressCheckoutConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalConfigureBtn"/>
|
|
29 | 53 | <selectOption selector ="{{PayPalExpressCheckoutConfigSection.sandboxMode(countryCode)}}" userInput="Yes" stepKey="enableSandboxMode"/>
|
30 | 54 | <selectOption selector="{{PayPalExpressCheckoutConfigSection.enableSolution(countryCode)}}" userInput="Yes" stepKey="enableSolution"/>
|
31 | 55 | <fillField selector ="{{PayPalExpressCheckoutConfigSection.merchantID(countryCode)}}" userInput="{{credentials.paypal_express_merchantID}}" stepKey="inputMerchantID"/>
|
32 |
| - |
33 | 56 | <!--Save configuration-->
|
34 | 57 | <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/>
|
35 | 58 | </actionGroup>
|
36 |
| - |
| 59 | + |
37 | 60 | <actionGroup name="CreatePayPalOrderWithSelectedPaymentMethodActionGroup" extends="CreateOrderToPrintPageActionGroup">
|
38 | 61 | <annotations>
|
39 | 62 | <description>EXTENDS: CreateOrderToPrintPageActionGroup. Clicks on PayPal. Fills the PayPay details in the modal. PLEASE NOTE: The PayPal Payment credentials are Hardcoded using 'Payer'.</description>
|
40 | 63 | </annotations>
|
41 |
| - |
| 64 | + <arguments> |
| 65 | + <argument name="payerName" defaultValue="MPI" type="string"/> |
| 66 | + <argument name="credentials" defaultValue="_CREDS"/> |
| 67 | + </arguments> |
| 68 | + |
| 69 | + <!-- click on PayPal payment radio button --> |
42 | 70 | <waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPlaceOrderButton"/>
|
43 | 71 | <click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="clickPlaceOrder"/>
|
44 |
| - |
| 72 | + |
45 | 73 | <!--set ID for iframe of PayPal group button-->
|
46 | 74 | <executeJS function="jQuery('.zoid-component-frame.zoid-visible').attr('id', 'myIframe')" stepKey="clickOrderLink"/>
|
47 |
| - |
| 75 | + |
48 | 76 | <!--switch to iframe of PayPal group button-->
|
49 |
| - <comment userInput="switch to iframe of PayPal group button" stepKey="commentSwitchToIframe"/> |
50 | 77 | <switchToIFrame userInput="myIframe" stepKey="clickPrintOrderLink"/>
|
51 | 78 | <waitForElementVisible selector="{{CheckoutPaymentSection.PayPalBtn}}" stepKey="waitForPayPalBtn"/>
|
52 | 79 | <click selector="{{CheckoutPaymentSection.PayPalBtn}}" stepKey="clickPayPalBtn"/>
|
53 | 80 | <switchToIFrame stepKey="switchBack1"/>
|
54 |
| - |
| 81 | + |
55 | 82 | <!--Check in-context-->
|
56 |
| - <comment userInput="Check in-context" stepKey="commentVerifyInContext"/> |
57 | 83 | <switchToNextTab stepKey="switchToInContentTab"/>
|
58 | 84 | <waitForPageLoad stepKey="waitForPageLoad"/>
|
59 | 85 | <seeCurrentUrlMatches regex="~\//www.sandbox.paypal.com/~" stepKey="seeCurrentUrlMatchesConfigPath1"/>
|
60 |
| - <waitForElement selector="{{PayPalPaymentSection.email}}" stepKey="waitForLoginForm"/> |
61 |
| - <fillField selector="{{PayPalPaymentSection.email}}" userInput="{{Payer.buyerEmail}}" stepKey="fillEmail"/> |
62 |
| - <fillField selector="{{PayPalPaymentSection.password}}" userInput="{{Payer.buyerPassword}}" stepKey="fillPassword"/> |
| 86 | + <waitForElement selector="{{PayPalPaymentSection.email}}" stepKey="waitForLoginForm" /> |
| 87 | + <fillField selector="{{PayPalPaymentSection.email}}" userInput="{{credentials.magento/paypal_sandbox_login_email}}" stepKey="fillEmail"/> |
| 88 | + <fillField selector="{{PayPalPaymentSection.password}}" userInput="{{credentials.magento/paypal_sandbox_login_password}}" stepKey="fillPassword"/> |
63 | 89 | <click selector="{{PayPalPaymentSection.loginBtn}}" stepKey="login"/>
|
64 | 90 | <waitForPageLoad stepKey="wait"/>
|
65 |
| - <seeElement selector="{{PayPalPaymentSection.reviewUserInfo}}" stepKey="seePayerName"/> |
| 91 | + <see userInput="{{payerName}}" selector="{{PayPalPaymentSection.reviewUserInfo}}" stepKey="seePayerName"/> |
66 | 92 | </actionGroup>
|
67 |
| - |
| 93 | + |
68 | 94 | <actionGroup name="addProductToCheckoutPage">
|
69 | 95 | <annotations>
|
70 | 96 | <description>Goes to the provided Category page on the Storefront. Adds the 1st Product to the Cart. Goes to Checkout. Select the Shipping Method. Selects PayPal as the Payment Method.</description>
|
71 | 97 | </annotations>
|
72 | 98 | <arguments>
|
73 | 99 | <argument name="Category"/>
|
74 | 100 | </arguments>
|
75 |
| - |
| 101 | + |
76 | 102 | <amOnPage url="{{StorefrontCategoryPage.url(Category.name)}}" stepKey="onCategoryPage"/>
|
77 | 103 | <waitForPageLoad stepKey="waitForPageLoad1"/>
|
78 | 104 | <moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverProduct"/>
|
|
0 commit comments