12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- -->
- <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
- <actionGroup name="ConfigPayPalExpressCheckout">
- <arguments>
- <argument name="credentials" defaultValue="_CREDS"/>
- <argument name="countryCode" type="string" defaultValue="us"/>
- </arguments>
- <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
- <waitForPageLoad stepKey="waitForPageLoad1"/>
- <click selector="{{PayPalExpressCheckoutConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalConfigureBtn"/>
- <waitForElementVisible selector="{{PayPalAdvancedSettingConfigSection.advancedSettingTab(countryCode)}}" stepKey="waitForAdvancedSettingTab"/>
- <fillField selector ="{{PayPalExpressCheckoutConfigSection.email(countryCode)}}" userInput="{{credentials.paypal_express_email}}" stepKey="inputEmailAssociatedWithPayPalMerchantAccount"/>
- <selectOption selector ="{{PayPalExpressCheckoutConfigSection.apiMethod(countryCode)}}" userInput="API Signature" stepKey="inputAPIAuthenticationMethods"/>
- <fillField selector ="{{PayPalExpressCheckoutConfigSection.username(countryCode)}}" userInput="{{credentials.paypal_express_api_username}}" stepKey="inputAPIUsername"/>
- <fillField selector ="{{PayPalExpressCheckoutConfigSection.password(countryCode)}}" userInput="{{credentials.paypal_express_api_password}}" stepKey="inputAPIPassword"/>
- <fillField selector ="{{PayPalExpressCheckoutConfigSection.signature(countryCode)}}" userInput="{{credentials.paypal_express_api_signature}}" stepKey="inputAPISignature"/>
- <selectOption selector ="{{PayPalExpressCheckoutConfigSection.sandboxMode(countryCode)}}" userInput="Yes" stepKey="enableSandboxMode"/>
- <selectOption selector="{{PayPalExpressCheckoutConfigSection.enableSolution(countryCode)}}" userInput="Yes" stepKey="enableSolution"/>
- <fillField selector ="{{PayPalExpressCheckoutConfigSection.merchantID(countryCode)}}" userInput="{{credentials.paypal_express_merchantID}}" stepKey="inputMerchantID"/>
- <!--Save configuration-->
- <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/>
- </actionGroup>
- <actionGroup name="CreatePayPalOrderWithSelectedPaymentMethodActionGroup" extends="CreateOrderToPrintPageActionGroup">
- <waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPlaceOrderButton"/>
- <click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="clickPlaceOrder"/>
- <!--set ID for iframe of PayPal group button-->
- <executeJS function="jQuery('.zoid-component-frame.zoid-visible').attr('id', 'myIframe')" stepKey="clickOrderLink"/>
- <!--switch to iframe of PayPal group button-->
- <comment userInput="switch to iframe of PayPal group button" stepKey="commentSwitchToIframe"/>
- <switchToIFrame userInput="myIframe" stepKey="clickPrintOrderLink"/>
- <waitForElementVisible selector="{{CheckoutPaymentSection.PayPalBtn}}" stepKey="waitForPayPalBtn"/>
- <click selector="{{CheckoutPaymentSection.PayPalBtn}}" stepKey="clickPayPalBtn"/>
- <switchToIFrame stepKey="switchBack1"/>
- <!--Check in-context-->
- <comment userInput="Check in-context" stepKey="commentVerifyInContext"/>
- <switchToNextTab stepKey="switchToInContentTab"/>
- <waitForPageLoad stepKey="waitForPageLoad"/>
- <seeCurrentUrlMatches regex="~\//www.sandbox.paypal.com/~" stepKey="seeCurrentUrlMatchesConfigPath1"/>
- <waitForElement selector="{{PayPalPaymentSection.email}}" stepKey="waitForLoginForm" />
- <fillField selector="{{PayPalPaymentSection.email}}" userInput="{{Payer.buyerEmail}}" stepKey="fillEmail"/>
- <fillField selector="{{PayPalPaymentSection.password}}" userInput="{{Payer.buyerPassword}}" stepKey="fillPassword"/>
- <click selector="{{PayPalPaymentSection.loginBtn}}" stepKey="login"/>
- <waitForPageLoad stepKey="wait"/>
- <seeElement selector="{{PayPalPaymentSection.reviewUserInfo}}" stepKey="seePayerName"/>
- </actionGroup>
- <actionGroup name="addProductToCheckoutPage">
- <arguments>
- <argument name="Category"/>
- </arguments>
- <amOnPage url="{{StorefrontCategoryPage.url(Category.name)}}" stepKey="onCategoryPage"/>
- <waitForPageLoad stepKey="waitForPageLoad1"/>
- <moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverProduct"/>
- <click selector="{{StorefrontCategoryMainSection.AddToCartBtn}}" stepKey="addToCart"/>
- <waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="waitForProductAdded"/>
- <click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/>
- <click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="goToCheckout"/>
- <waitForPageLoad stepKey="waitForPageLoad2"/>
- <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
- <click selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/>
- <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask2"/>
- <waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" stepKey="waitForNextButton"/>
- <click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext"/>
- <waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPlaceOrderButton"/>
- <click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="clickPayPalCheckbox"/>
- </actionGroup>
- </actionGroups>
|