Skip to content

Commit 67b0af8

Browse files
committed
ACQE-6445 : AC-5185:Guest Checkout Using PayPal Payments Standard and Flat Rate
fixedStaticCheckFailureInGuestCheckoutUsingPayPalPaymentsStandardAndFlatRateTest createdAdminCreateApiConfigurableProductForPayPalActionGroupinPaypalMOdule addedSamplePaypalExpressConfig2ForPalStandardPayment Changes made to fix test failure Added SimpleTaxRateCA AddedSubmitInvoiceOrder changesFileNameFormatForTestFileAndActionGroupFile
1 parent 995a05c commit 67b0af8

14 files changed

+409
-2
lines changed

app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,19 @@
325325
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
326326
<requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity>
327327
</entity>
328+
<entity name="ApiSimpleOne1" type="product2">
329+
<data key="name" unique="suffix">Api Simple Product</data>
330+
<data key="sku" unique="suffix">api-simple-product</data>
331+
<data key="urlKey" unique="suffix">api-simple-product</data>
332+
<data key="type_id">simple</data>
333+
<data key="attribute_set_id">4</data>
334+
<data key="visibility">4</data>
335+
<data key="price">1</data>
336+
<data key="status">1</data>
337+
<data key="quantity">1</data>
338+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
339+
<requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity>
340+
</entity>
328341
<entity name="ApiSimpleProductWithCategory" type="product2" extends="ApiSimpleOne">
329342
<requiredEntity type="custom_attribute">CustomAttributeCategoryIds</requiredEntity>
330343
</entity>
@@ -357,6 +370,19 @@
357370
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
358371
<requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity>
359372
</entity>
373+
<entity name="ApiSimpleTwo1" type="product2">
374+
<data key="name" unique="suffix">Api Simple Product Two</data>
375+
<data key="sku" unique="suffix">api-simple-product-two</data>
376+
<data key="urlKey" unique="suffix">api-simple-product-two</data>
377+
<data key="type_id">simple</data>
378+
<data key="attribute_set_id">4</data>
379+
<data key="visibility">4</data>
380+
<data key="price">1</data>
381+
<data key="status">1</data>
382+
<data key="quantity">1</data>
383+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
384+
<requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity>
385+
</entity>
360386
<entity name="ApiSimpleProductWithPrice50" type="product2" extends="ApiSimpleOne">
361387
<data key="price">50</data>
362388
</entity>

app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConfigurableProductData.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,17 @@
4747
<data key="quantity">100</data>
4848
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
4949
</entity>
50+
<entity name="ApiConfigurableProductWithOutCategory1" type="product">
51+
<data key="sku" unique="suffix">api-configurable-product-with-out-category</data>
52+
<data key="type_id">configurable</data>
53+
<data key="attribute_set_id">4</data>
54+
<data key="visibility">4</data>
55+
<data key="name" unique="suffix">API Configurable Product</data>
56+
<data key="urlKey" unique="suffix">api-configurable-product</data>
57+
<data key="status">1</data>
58+
<data key="quantity">1</data>
59+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
60+
</entity>
5061
<entity name="ApiConfigurableProductWithDescription" type="product">
5162
<data key="sku" unique="suffix">api-configurable-product</data>
5263
<data key="type_id">configurable</data>
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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="AdminCreateApiConfigurableProductForPayPalActionGroup">
12+
<annotations>
13+
<description>Creates a Configurable Product with 2 Product Options via the API.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productName" defaultValue="{{ApiConfigurableProductWithOutCategory.name}}" type="string"/>
17+
</arguments>
18+
19+
<!-- Create the configurable product based on the data in the /data folder -->
20+
<createData entity="ApiConfigurableProductWithOutCategory1" stepKey="createConfigProduct">
21+
<field key="name">{{productName}}</field>
22+
</createData>
23+
24+
<!-- Create attribute with 2 options to be used in children products -->
25+
<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/>
26+
<createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1">
27+
<requiredEntity createDataKey="createConfigProductAttribute"/>
28+
</createData>
29+
<createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2">
30+
<requiredEntity createDataKey="createConfigProductAttribute"/>
31+
</createData>
32+
<createData entity="AddToDefaultSet" stepKey="addAttributeToAttributeSet">
33+
<requiredEntity createDataKey="createConfigProductAttribute"/>
34+
</createData>
35+
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1">
36+
<requiredEntity createDataKey="createConfigProductAttribute"/>
37+
</getData>
38+
<getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2">
39+
<requiredEntity createDataKey="createConfigProductAttribute"/>
40+
</getData>
41+
42+
<!-- Create the 2 children that will be a part of the configurable product -->
43+
<createData entity="ApiSimpleOne1" stepKey="createConfigChildProduct1">
44+
<requiredEntity createDataKey="createConfigProductAttribute"/>
45+
<requiredEntity createDataKey="getConfigAttributeOption1"/>
46+
</createData>
47+
<createData entity="ApiSimpleTwo1" stepKey="createConfigChildProduct2">
48+
<requiredEntity createDataKey="createConfigProductAttribute"/>
49+
<requiredEntity createDataKey="getConfigAttributeOption2"/>
50+
</createData>
51+
52+
<!-- Assign the two products to the configurable product -->
53+
<createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption">
54+
<requiredEntity createDataKey="createConfigProduct"/>
55+
<requiredEntity createDataKey="createConfigProductAttribute"/>
56+
<requiredEntity createDataKey="getConfigAttributeOption1"/>
57+
<requiredEntity createDataKey="getConfigAttributeOption2"/>
58+
</createData>
59+
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1">
60+
<requiredEntity createDataKey="createConfigProduct"/>
61+
<requiredEntity createDataKey="createConfigChildProduct1"/>
62+
</createData>
63+
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2">
64+
<requiredEntity createDataKey="createConfigProduct"/>
65+
<requiredEntity createDataKey="createConfigChildProduct2"/>
66+
</createData>
67+
</actionGroup>
68+
</actionGroups>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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="AdminPayPalStandardEnableForGuestCheckoutActionGroup">
12+
<annotations>
13+
<description>Goes to the 'Configuration' page for 'Payment Methods'. Fills in the provided Sample PayPal credentials and other details. Clicks on Save.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="credentials" defaultValue="SamplePaypalExpressConfig2"/>
17+
<argument name="countryCode" type="string" defaultValue="us"/>
18+
</arguments>
19+
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
20+
<waitForPageLoad stepKey="waitForPageLoad1"/>
21+
<conditionalClick selector="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" dependentSelector="{{OtherPayPalPaymentsConfigSection.expandedTab(countryCode)}}" visible="false" stepKey="expandOtherPaypalConfigButton"/>
22+
<conditionalClick selector="{{AdminPayPalStandardConfigGuestCheckoutSection.enablePaymentSolution(countryCode)}}" dependentSelector="{{AdminPayPalStandardConfigGuestCheckoutSection.enablePaymentSolutionActive(countryCode)}}" visible="false" stepKey="expandPaymentSolutionContentTab"/>
23+
<scrollTo selector="{{AdminPayPalStandardConfigGuestCheckoutSection.configureBtn(countryCode)}}" x="0" y="-80" stepKey="scrollToConfigure"/>
24+
<waitForElementClickable selector="{{AdminPayPalStandardConfigGuestCheckoutSection.configureBtn(countryCode)}}" stepKey="waitForPayPalStandardConfigureBtn" />
25+
<click selector="{{AdminPayPalStandardConfigGuestCheckoutSection.configureBtn(countryCode)}}" stepKey="clickPayPalStandardConfigureBtn"/>
26+
<waitForElementVisible selector="{{AdminPayPalStandardConfigGuestCheckoutSection.email(countryCode)}}" stepKey="waitForEmailTab"/>
27+
<fillField selector ="{{AdminPayPalStandardConfigGuestCheckoutSection.email(countryCode)}}" userInput="{{credentials.paypal_express_email}}" stepKey="inputEmailAssociatedWithPayPalMerchantAccount"/>
28+
<selectOption selector ="{{AdminPayPalStandardConfigGuestCheckoutSection.apiMethod(countryCode)}}" userInput="API Signature" stepKey="inputAPIAuthenticationMethods"/>
29+
<fillField selector ="{{AdminPayPalStandardConfigGuestCheckoutSection.username(countryCode)}}" userInput="{{credentials.paypal_express_api_username}}" stepKey="inputAPIUsername"/>
30+
<fillField selector ="{{AdminPayPalStandardConfigGuestCheckoutSection.password(countryCode)}}" userInput="{{credentials.paypal_express_api_password}}" stepKey="inputAPIPassword"/>
31+
<fillField selector ="{{AdminPayPalStandardConfigGuestCheckoutSection.signature(countryCode)}}" userInput="{{credentials.paypal_express_api_signature}}" stepKey="inputAPISignature"/>
32+
<selectOption selector ="{{AdminPayPalStandardConfigGuestCheckoutSection.sandboxMode(countryCode)}}" userInput="Yes" stepKey="enableSandboxMode"/>
33+
<selectOption selector="{{AdminPayPalStandardConfigGuestCheckoutSection.enableSolution(countryCode)}}" userInput="Yes" stepKey="enableSolution"/>
34+
<waitForElementClickable selector="{{AdminConfigSection.saveButton}}" stepKey="waitForConfigureBtn" />
35+
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/>
36+
<waitForPageLoad stepKey="waitForPageLoad2"/>
37+
</actionGroup>
38+
</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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<!--Create Shipment With Tracking Number-->
12+
<actionGroup name="AdminSelectPaypalStandardPaymentInPaymentPageGuestCheckoutActionGroup">
13+
<waitForElementClickable selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="waitForPayPalRadioButton"/>
14+
<click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="selectPaypalPayment"/>
15+
<waitForElementClickable selector="{{CheckoutPaymentSection.ContinuePayPalBtn1}}" stepKey="waitForPayPalBtn"/>
16+
<click selector="{{CheckoutPaymentSection.ContinuePayPalBtn1}}" stepKey="clickPayPalBtn"/>
17+
</actionGroup>
18+
</actionGroups>

app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<waitForElementVisible selector="{{PayPalPaymentSection.password}}" stepKey="waitForPasswordField"/>
2525
<click selector="{{PayPalPaymentSection.password}}" stepKey="focusOnPasswordField"/>
2626
<fillField selector="{{PayPalPaymentSection.password}}" userInput="{{credentials.magento/PAYPAL_PWD}}" stepKey="fillPassword"/>
27+
<waitForElementClickable selector="{{PayPalPaymentSection.loginBtn}}" stepKey="waitForLoginBtn"/>
2728
<click selector="{{PayPalPaymentSection.loginBtn}}" stepKey="login"/>
2829
<waitForPageLoad stepKey="wait"/>
2930
</actionGroup>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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="StorefrontLoginToPayPalStandardPaymentGuestCheckoutActionGroup" extends="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup">
12+
<annotations>
13+
<description>remove click btn which is not coming when we login with paypal standard payment enabled</description>
14+
</annotations>
15+
<remove keyForRemoval="clickNext"/>
16+
</actionGroup>
17+
</actionGroups>

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,4 +317,16 @@
317317
<data key="path">payment/payflowpro_cc_vault/active</data>
318318
<data key="value">0</data>
319319
</entity>
320+
<entity name="StorefrontPaypalStandardAuthorizationPaymentActionOptionConfigData">
321+
<data key="path">payment/paypal_standard/payment_action</data>
322+
<data key="scope_id">1</data>
323+
<data key="label">No</data>
324+
<data key="value">Authorization</data>
325+
</entity>
326+
<entity name="StorefrontPaypalStandardAuthorizationPaymentActionOptionConfigDataToDefaultValue">
327+
<data key="path">payment/paypal_standard/payment_action</data>
328+
<data key="scope_id">1</data>
329+
<data key="label">No</data>
330+
<data key="value">Order</data>
331+
</entity>
320332
</entities>

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,4 +229,12 @@
229229
<data key="paypal_paymentspro_vendor">MksGLTest</data>
230230
<data key="paypal_paymentspro_password">Abcd@123</data>
231231
</entity>
232+
<entity name="EnablePaypalPayStandardNew">
233+
<data key="path">payment/wps_express/active</data>
234+
<data key="value">1</data>
235+
</entity>
236+
<entity name="DisablePaypalPayStandardNew">
237+
<data key="path">payment/wps_express/active</data>
238+
<data key="value">0</data>
239+
</entity>
232240
</entities>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
10+
<section name="AdminPayPalStandardConfigGuestCheckoutSection">
11+
<element name="configureBtn" type="button" selector="//button[@id='payment_{{countryCode}}_paypal_group_all_in_one_wps_express-head']" parameterized="true"/>
12+
<element name="email" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_express_checkout_required_express_checkout_business_account" parameterized="true"/>
13+
<element name="apiMethod" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_express_checkout_required_express_checkout_api_authentication" parameterized="true"/>
14+
<element name="username" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_express_checkout_required_express_checkout_api_username" parameterized="true"/>
15+
<element name="password" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_express_checkout_required_express_checkout_api_password" parameterized="true"/>
16+
<element name="signature" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_express_checkout_required_express_checkout_api_signature" parameterized="true"/>
17+
<element name="sandboxMode" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_express_checkout_required_express_checkout_sandbox_flag" parameterized="true"/>
18+
<element name="enableSolution" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_enable_express_checkout" parameterized="true"/>
19+
<element name="enablePaymentSolution" type="button" selector="//a[@id='payment_{{countryCode}}_paypal_group_all_in_one-head']" parameterized="true"/>
20+
<element name="enablePaymentSolutionActive" type="button" selector="//div[@class='section-config complex paypal-other-section paypal-all-in-one-section active']//a[@id='payment_{{countryCode}}_paypal_group_all_in_one-head']" parameterized="true"/>
21+
</section>
22+
</sections>

0 commit comments

Comments
 (0)