|
9 | 9 | xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
|
10 | 10 | <test name="StorefrontAddProductToCartAndGoToCheckoutWithInvalidCreditCardTest">
|
11 | 11 | <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"/> |
16 | 16 | <severity value="MINOR"/>
|
17 | 17 | <testCaseId value="AC-8920"/>
|
18 |
| - <group value="pr_exclude"/> |
19 | 18 | </annotations>
|
20 | 19 | <before>
|
21 | 20 | <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
|
|
26 | 25 | </createData>
|
27 | 26 | <!-- New Product -->
|
28 | 27 | <createData entity="SimpleProduct2" stepKey="simpleProduct">
|
29 |
| - <field key="price">100</field> |
| 28 | + <field key="price">9000000</field> |
30 | 29 | </createData>
|
31 | 30 | <!-- Reindex and cache flush -->
|
32 | 31 | <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
|
|
35 | 34 | <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
|
36 | 35 | <argument name="tags" value=""/>
|
37 | 36 | </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"/> |
41 | 40 | </actionGroup>
|
42 | 41 | </before>
|
43 | 42 | <after>
|
44 | 43 | <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"/> |
46 | 45 | <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer" />
|
47 | 46 | <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
|
48 | 47 | <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/>
|
|
59 | 58 | <!-- Select Shipping method and fill the credit card details -->
|
60 | 59 | <actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRate"/>
|
61 | 60 | <actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToReview"/>
|
62 |
| - <actionGroup ref="CheckoutSelectCreditCardPaymentActionGroup" stepKey="selectCreditCard"/> |
| 61 | + <click selector="{{StorefrontCheckoutPaymentMethodSection.checkPayFlowCreditCard}}" stepKey="selectCreditCardPaymentMethod"/> |
63 | 62 | <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"/> |
66 | 65 | </actionGroup>
|
67 |
| - <!-- Place Order and assert the error message --> |
| 66 | + <!-- Place Order and assert the url --> |
68 | 67 | <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> |
72 | 68 | <wait time="6" stepKey="waitForPageLoad" />
|
73 | 69 | <seeCurrentUrlMatches regex="~\/checkout/#payment~" stepKey="seeCurrentUrl"/>
|
74 | 70 | </test>
|
|
0 commit comments