Skip to content

Commit 1cfd2cc

Browse files
authored
Merge pull request #8736 from magento-gl/spartans_pr_07022024
[Spartans] Bugfix Delivery
2 parents 88bcc44 + 31d8bfc commit 1cfd2cc

File tree

16 files changed

+65
-179
lines changed

16 files changed

+65
-179
lines changed

app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutSelectCreditCardPaymentActionGroup.xml

Lines changed: 0 additions & 21 deletions
This file was deleted.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<section name="StorefrontCheckoutPaymentMethodSection">
1212
<element name="billingAddress" type="text" selector=".checkout-billing-address"/>
1313
<element name="checkPaymentMethodByName" type="radio" selector="//div[@id='checkout-payment-method-load']//div[@class='payment-method']//label//span[contains(., '{{methodName}}')]/../..//input" parameterized="true"/>
14-
<element name="checkCreditCard" type="radio" selector="//div[@id='checkout-payment-method-load']//div[@class='payment-method payment-method-braintree']//label//span[contains(., 'Credit Card')]/../..//input"/>
14+
<element name="checkPayFlowCreditCard" type="radio" selector="//div[@id='checkout-payment-method-load']//div[@class='items payment-methods']//div[@class='payment-group']//label//span[contains(., 'Credit Card (Payflow Pro)')]/../..//input"/>
1515
<element name="billingAddressSameAsShipping" type="checkbox" selector=".payment-method._active [name='billing-address-same-as-shipping']"/>
1616
<element name="billingAddressSameAsShippingShared" type="checkbox" selector="#billing-address-same-as-shipping-shared"/>
1717
<element name="paymentOnAccount" type="radio" selector="#companycredit" deprecated="Use StorefrontCheckoutPaymentSection.paymentOnAccount B2B repository"/>

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<description>Goes to the 'Configuration' page for 'Payment Methods'. Fills in the provided Sample PayPal Payflow pro credentials and other details. Clicks on Save.</description>
1414
</annotations>
1515
<arguments>
16-
<argument name="credentials" defaultValue="SamplePaypalPaymentsProConfig"/>
16+
<argument name="credentials" defaultValue="_CREDS"/>
1717
<argument name="countryCode" type="string" defaultValue="us"/>
1818
</arguments>
1919
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
@@ -25,10 +25,10 @@
2525
<click selector ="{{PayPalPayflowProConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalPaymentsProConfigureBtn"/>
2626
<waitForElementVisible selector="{{PayPalPayflowProConfigSection.partner(countryCode)}}" stepKey="waitForPartner"/>
2727
<scrollTo selector="{{PayPalPayflowProConfigSection.partner(countryCode)}}" stepKey="scrollToBottom"/>
28-
<fillField selector ="{{PayPalPayflowProConfigSection.partner(countryCode)}}" userInput="{{credentials.paypal_paymentspro_parner}}" stepKey="inputPartner"/>
29-
<fillField selector ="{{PayPalPayflowProConfigSection.user(countryCode)}}" userInput="{{credentials.paypal_paymentspro_user}}" stepKey="inputUser"/>
30-
<fillField selector ="{{PayPalPayflowProConfigSection.vendor(countryCode)}}" userInput="{{credentials.paypal_paymentspro_vendor}}" stepKey="inputVendor"/>
31-
<fillField selector ="{{PayPalPayflowProConfigSection.password(countryCode)}}" userInput="{{credentials.paypal_paymentspro_password}}" stepKey="inputPassword"/>
28+
<fillField selector ="{{PayPalPayflowProConfigSection.partner(countryCode)}}" userInput="{{credentials.magento/payflow_pro_partner}}" stepKey="inputPartner"/>
29+
<fillField selector ="{{PayPalPayflowProConfigSection.user(countryCode)}}" userInput="{{credentials.magento/payflow_pro_user}}" stepKey="inputUser"/>
30+
<fillField selector ="{{PayPalPayflowProConfigSection.vendor(countryCode)}}" userInput="{{credentials.magento/payflow_pro_vendor}}" stepKey="inputVendor"/>
31+
<fillField selector ="{{PayPalPayflowProConfigSection.password(countryCode)}}" userInput="{{credentials.magento/payflow_pro_pwd}}" stepKey="inputPassword"/>
3232
<selectOption selector="{{PayPalPayflowProConfigSection.testmode(countryCode)}}" userInput="Yes" stepKey="enableTestMode"/>
3333
<selectOption selector ="{{PayPalPayflowProConfigSection.enableSolution(countryCode)}}" userInput="Yes" stepKey="enableSolution"/>
3434
<selectOption selector ="{{PayPalPayflowProConfigSection.enableVault(countryCode)}}" userInput="Yes" stepKey="enableSolutionValut"/>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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="FillPayFlowCreditCardActionGroup">
12+
<annotations>
13+
<description>Fills in the provided Credit Card details.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="creditCardDetails" defaultValue="VisaDefaultCard"/>
17+
</arguments>
18+
<fillField selector ="{{PayFlowCreditCardSection.creditCardNumber}}" userInput="{{creditCardDetails.cardNumber}}" stepKey="inputCreditcardNumber"/>
19+
<click selector ="{{PayFlowCreditCardSection.expirationMonth(creditCardDetails.month)}}" stepKey="inputExpiryMonth"/>
20+
<click selector ="{{PayFlowCreditCardSection.expirationYear(creditCardDetails.year)}}" stepKey="inputExpiryYear"/>
21+
<fillField selector ="{{PayFlowCreditCardSection.cvv}}" userInput="{{creditCardDetails.cvv}}" stepKey="inputCvv"/>
22+
</actionGroup>
23+
</actionGroups>

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="PayPalPayflowProConfigSection">
11-
<element name="configureBtn" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout-head" parameterized="true"/>
11+
<element name="configureBtn" type="button" selector="//*[@id='row_payment_{{countryCode}}_paypal_payment_gateways']//*[@id='payment_{{countryCode}}_paypal_payment_gateways']//*[@id='row_payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout']//*[@id='payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout-head']" parameterized="true"/>
1212
<element name="partner" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_paypal_payflow_api_settings_partner" parameterized="true"/>
1313
<element name="user" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_paypal_payflow_api_settings_user" parameterized="true"/>
1414
<element name="vendor" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_paypal_payflow_api_settings_vendor" parameterized="true"/>
1515
<element name="password" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_paypal_payflow_api_settings_pwd" parameterized="true"/>
1616
<element name="testmode" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_paypal_payflow_api_settings_sandbox_flag" parameterized="true"/>
1717
<element name="enableSolution" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_enable_paypal_payflow" parameterized="true"/>
1818
<element name="enableVault" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_required_payflowpro_cc_vault_active" parameterized="true"/>
19-
<element name="paymentGateway" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways-head" parameterized="true"/>
20-
</section>
19+
<element name="paymentGateway" type="button" selector="//*[@id='payment_{{countryCode}}_other_paypal_payment_solutions']//*[@id='payment_{{countryCode}}_paypal_payment_gateways-head']" parameterized="true"/> </section>
2120
</sections>
Lines changed: 17 additions & 0 deletions
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="PayFlowCreditCardSection">
12+
<element name="creditCardNumber" type="input" selector="//*[@id='co-transparent-form']//*[@id='payment_form_payflowpro']//*[@id='payflowpro_cc_number']"/>
13+
<element name="expirationMonth" type="select" selector="//*[@id='co-transparent-form']//*[@id='payment_form_payflowpro']//*[@id='payflowpro_cc_type_exp_div']//*[@id='payflowpro_expiration']/option[contains(., {{creditCardDetails.month}})]" parameterized="true"/>
14+
<element name="expirationYear" type="select" selector="//*[@id='co-transparent-form']//*[@id='payment_form_payflowpro']//*[@id='payflowpro_cc_type_exp_div']//*[@id='payflowpro_expiration_yr']/option[contains(.,{{creditCardDetails.year}})]" parameterized="true"/>
15+
<element name="cvv" type="input" selector="//*[@id='co-transparent-form']//*[@id='payment_form_payflowpro']//*[@id='payflowpro_cc_type_cvv_div']//*[@id='payflowpro_cc_cid']"/>
16+
</section>
17+
</sections>

app/code/Magento/Paypal/Test/Mftf/Test/StoreFrontGuestCheckoutWithPayPalPayflowProCreditCardWithSeveralProductsTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
2424
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
2525
<actionGroup ref="AdminPayPalPayflowProActionGroup" stepKey="configPaypalPayflowPro">
26-
<argument name="credentials" value="SamplePaypalPaymentsProConfig"/>
26+
<argument name="credentials" value="_CREDS"/>
2727
</actionGroup>
2828
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
2929
<argument name="tags" value="config full_page"/>
Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1010
<test name="StorefrontAddProductToCartAndGoToCheckoutWithInvalidCreditCardTest">
1111
<annotations>
12-
<features value="Braintree"/>
13-
<stories value="Checkout with invalid credit card details through Braintree credit card payment method"/>
14-
<title value="Checkout with invalid credit card details through Braintree credit card payment method"/>
15-
<description value="Checkout with invalid credit card details through Braintree credit card payment method"/>
12+
<features value="payflow"/>
13+
<stories value="Checkout with invalid credit card details through Paypal payflow credit card payment method"/>
14+
<title value="Checkout with invalid credit card details through Paypal payflow credit card payment method"/>
15+
<description value="Checkout with invalid credit card details through Paypal payflow credit card payment method"/>
1616
<severity value="MINOR"/>
1717
<testCaseId value="AC-8920"/>
18-
<group value="pr_exclude"/>
1918
</annotations>
2019
<before>
2120
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
@@ -26,7 +25,7 @@
2625
</createData>
2726
<!-- New Product -->
2827
<createData entity="SimpleProduct2" stepKey="simpleProduct">
29-
<field key="price">100</field>
28+
<field key="price">9000000</field>
3029
</createData>
3130
<!-- Reindex and cache flush -->
3231
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
@@ -35,14 +34,14 @@
3534
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
3635
<argument name="tags" value=""/>
3736
</actionGroup>
38-
<!-- Enable Braintree -->
39-
<actionGroup ref="AdminBraintreeEnableActionGroup" stepKey="ConfigBraintree">
40-
<argument name="credentials" value="SampleBraintreeConfig"/>
37+
<!-- Paypal Payflow -->
38+
<actionGroup ref="AdminPayPalPayflowProActionGroup" stepKey="ConfigPayflow">
39+
<argument name="credentials" value="_CREDS"/>
4140
</actionGroup>
4241
</before>
4342
<after>
4443
<magentoCLI command="config:set paypal/general/merchant_country US" stepKey="setMerchantCountry"/>
45-
<magentoCLI command="config:set payment/braintree/active 0" stepKey="disablePayPalExpress"/>
44+
<createData entity="RollbackPaypalPayflowPro" stepKey="rollbackPaypalPayflowProConfig"/>
4645
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer" />
4746
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
4847
<deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/>
@@ -59,16 +58,13 @@
5958
<!-- Select Shipping method and fill the credit card details -->
6059
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRate"/>
6160
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToReview"/>
62-
<actionGroup ref="CheckoutSelectCreditCardPaymentActionGroup" stepKey="selectCreditCard"/>
61+
<click selector="{{StorefrontCheckoutPaymentMethodSection.checkPayFlowCreditCard}}" stepKey="selectCreditCardPaymentMethod"/>
6362
<checkOption selector="{{StorefrontCheckoutPaymentMethodSection.billingAddressSameAsShipping}}" stepKey="checkBillingAddressSameAsShippingCheckbox"/>
64-
<actionGroup ref="FillBraintreeCreditCardActionGroup" stepKey="fillCreditCardDetails">
65-
<argument name="creditCardDetails" value="InvalidCreditCard"/>
63+
<actionGroup ref="FillPayFlowCreditCardActionGroup" stepKey="fillCreditCardDetails">
64+
<argument name="creditCardDetails" value="VisaDefaultCard"/>
6665
</actionGroup>
67-
<!-- Place Order and assert the error message -->
66+
<!-- Place Order and assert the url -->
6867
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/>
69-
<actionGroup ref="StorefrontAssertCheckoutErrorMessageActionGroup" stepKey="assertErrorMessage">
70-
<argument name="message" value="Your payment could not be taken. Please try again or use a different payment method. Credit card number is not an accepted test number."/>
71-
</actionGroup>
7268
<wait time="6" stepKey="waitForPageLoad" />
7369
<seeCurrentUrlMatches regex="~\/checkout/#payment~" stepKey="seeCurrentUrl"/>
7470
</test>

app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminBraintreeEnableActionGroup.xml

Lines changed: 0 additions & 31 deletions
This file was deleted.

app/code/Magento/Sales/Test/Mftf/ActionGroup/FillBraintreeCreditCardActionGroup.xml

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)