-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3161 from magento-epam/EPAM-PR-7-8-10
EPAM PRs 7, 8, 10. Pangolins MFTF version bump.
- Loading branch information
Showing
54 changed files
with
1,788 additions
and
279 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
app/code/Magento/Braintree/Test/Mftf/ActionGroup/StorefrontFillCartDataActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?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/testSchema.xsd"> | ||
<actionGroup name="StorefrontFillCartDataActionGroup"> | ||
<arguments> | ||
<argument name="cartData" defaultValue="PaymentAndShippingInfo"/> | ||
</arguments> | ||
<switchToIFrame selector="{{BraintreeConfigurationPaymentSection.cartFrame}}" stepKey="switchToIframe"/> | ||
<fillField selector="{{BraintreeConfigurationPaymentSection.cartCode}}" userInput="{{cartData.cardNumber}}" stepKey="setCartCode"/> | ||
<switchToIFrame stepKey="switchBack"/> | ||
<switchToIFrame selector="{{BraintreeConfigurationPaymentSection.monthFrame}}" stepKey="switchToIframe1"/> | ||
<fillField selector="{{BraintreeConfigurationPaymentSection.month}}" userInput="{{cartData.month}}" stepKey="setMonth"/> | ||
<switchToIFrame stepKey="switchBack1"/> | ||
<switchToIFrame selector="{{BraintreeConfigurationPaymentSection.yearFrame}}" stepKey="switchToIframe2"/> | ||
<fillField selector="{{BraintreeConfigurationPaymentSection.year}}" userInput="{{cartData.year}}" stepKey="setYear"/> | ||
<switchToIFrame stepKey="switchBack2"/> | ||
<switchToIFrame selector="{{BraintreeConfigurationPaymentSection.codeFrame}}" stepKey="switchToIframe3"/> | ||
<fillField selector="{{BraintreeConfigurationPaymentSection.verificationNumber}}" userInput="{{cartData.cvv}}" stepKey="setVerificationNumber"/> | ||
<switchToIFrame stepKey="SwitchBackToWindow"/> | ||
|
||
</actionGroup> | ||
|
||
</actionGroups> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
app/code/Magento/Braintree/Test/Mftf/Section/BraintreeConfigurationPaymentSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<section name="BraintreeConfigurationPaymentSection"> | ||
<element name="creditCart" type="radio" selector="#braintree"/> | ||
<element name="paymentMethod" type="radio" selector="//div[@class='payment-group']//input[contains(@id, 'braintree_cc_vault_')]"/> | ||
<element name="cartFrame" type="iframe" selector="braintree-hosted-field-number"/> | ||
<element name="monthFrame" type="iframe" selector="braintree-hosted-field-expirationMonth"/> | ||
<element name="yearFrame" type="iframe" selector="braintree-hosted-field-expirationYear"/> | ||
<element name="codeFrame" type="iframe" selector="braintree-hosted-field-cvv"/> | ||
<element name="cartCode" type="input" selector="#credit-card-number"/> | ||
<element name="month" type="input" selector="#expiration-month"/> | ||
<element name="year" type="input" selector="#expiration-year"/> | ||
<element name="verificationNumber" type="input" selector="#cvv"/> | ||
</section> | ||
</sections> |
108 changes: 108 additions & 0 deletions
108
app/code/Magento/Braintree/Test/Mftf/Test/BraintreeCreditCardOnCheckoutTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="BraintreeCreditCardOnCheckoutTest"> | ||
<annotations> | ||
<features value="Braintree"/> | ||
<stories value="MAGETWO-91624 - Braintree saved cards use billing address the same as shipping"/> | ||
<title value="Use saved for Braintree credit card on checkout with selecting billing address"/> | ||
<description value="Use saved for Braintree credit card on checkout with selecting billing address"/> | ||
<severity value="MAJOR"/> | ||
<testCaseId value="MAGETWO-93767"/> | ||
<group value="braintree"/> | ||
</annotations> | ||
|
||
<before> | ||
<createData entity="_defaultCategory" stepKey="category"/> | ||
<createData entity="SimpleProduct" stepKey="product"> | ||
<requiredEntity createDataKey="category"/> | ||
</createData> | ||
<createData entity="Simple_US_Customer" stepKey="customer"/> | ||
<createData entity="BraintreeConfig" stepKey="BraintreeConfigurationData"/> | ||
<createData entity="CustomBraintreeConfigurationData" stepKey="CustomBraintreeConfigurationData"/> | ||
</before> | ||
|
||
<after> | ||
<deleteData createDataKey="product" stepKey="deleteProduct1"/> | ||
<deleteData createDataKey="customer" stepKey="deleteCustomer"/> | ||
<deleteData createDataKey="category" stepKey="deleteCategory"/> | ||
<createData entity="DefaultBraintreeConfig" stepKey="DefaultBraintreeConfig"/> | ||
<createData entity="RollBackCustomBraintreeConfigurationData" stepKey="RollBackCustomBraintreeConfigurationData"/> | ||
<actionGroup ref="StorefrontSignOutActionGroup" stepKey="StorefrontSignOutActionGroup"/> | ||
</after> | ||
<!--Go to storefront--> | ||
<amOnPage url="" stepKey="DoToStorefront"/> | ||
<!--Create account--> | ||
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUserFromStorefrontActionGroup"> | ||
<argument name="Customer" value="Simple_US_Customer"/> | ||
</actionGroup> | ||
|
||
<!--Add product to cart--> | ||
<amOnPage url="$$product.sku$$.html" stepKey="goToProductPage"/> | ||
<waitForPageLoad stepKey="waitForPageLoad"/> | ||
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addProductToCart"/> | ||
<waitForPageLoad stepKey="waitForPageLoad1"/> | ||
<!--Proceed to checkout--> | ||
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="GoToCheckoutFromMinicartActionGroup"/> | ||
|
||
<actionGroup ref="LoggedInCheckoutFillNewBillingAddressActionGroup" stepKey="LoggedInCheckoutFillNewBillingAddressActionGroup"> | ||
<argument name="Address" value="US_Address_CA"/> | ||
</actionGroup> | ||
<waitForPageLoad stepKey="waitForPageLoad2"/> | ||
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext"/> | ||
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" time="30" stepKey="waitForPaymentSectionLoaded"/> | ||
<!--Fill cart data--> | ||
<click selector="{{BraintreeConfigurationPaymentSection.creditCart}}" stepKey="SelectBraintreePaymentMethod"/> | ||
<waitForPageLoad stepKey="waitForPageLoad3"/> | ||
<actionGroup ref="StorefrontFillCartDataActionGroup" stepKey="StorefrontFillCartDataActionGroup"/> | ||
<waitForPageLoad stepKey="waitForPageLoad4"/> | ||
<!--Place order--> | ||
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="PlaceOrder"/> | ||
<waitForPageLoad stepKey="waitForPageLoad5"/> | ||
|
||
<!--Add product to cart again--> | ||
<amOnPage url="$$product.sku$$.html" stepKey="goToProductPage1"/> | ||
<waitForPageLoad stepKey="waitForPageLoad6"/> | ||
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addProductToCart1"/> | ||
<waitForPageLoad stepKey="waitForPageLoad7"/> | ||
<!--Proceed to checkout--> | ||
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="GoToCheckoutFromMinicartActionGroup1"/> | ||
<click selector="{{CheckoutPaymentSection.addressAction('New Address')}}" stepKey="clickOnNewAddress"/> | ||
<waitForPageLoad stepKey="waitForPageLoad8"/> | ||
<actionGroup ref="LoggedInCheckoutFillNewBillingAddressActionGroup" stepKey="LoggedInCheckoutFillNewBillingAddressActionGroup1"> | ||
<argument name="Address" value="US_Address_NY"/> | ||
</actionGroup> | ||
<click selector="{{CheckoutPaymentSection.addressAction('Save Address')}}" stepKey="SaveAddress"/> | ||
<waitForPageLoad stepKey="waitForPageLoad9"/> | ||
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext1"/> | ||
<waitForPageLoad stepKey="waitForPageLoad10"/> | ||
<click selector="{{BraintreeConfigurationPaymentSection.paymentMethod}}" stepKey="SelectBraintreePaymentMethod1"/> | ||
<waitForPageLoad stepKey="waitForPageLoad11"/> | ||
<click selector="{{CheckoutPaymentSection.shippingAndBillingAddressSame}}" stepKey="UncheckCheckBox"/> | ||
|
||
<click selector="{{CheckoutShippingSection.updateAddress}}" stepKey="clickToUpdate"/> | ||
<waitForPageLoad stepKey="waitForPageLoad12"/> | ||
<!--Place order--> | ||
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="PlaceOrder1"/> | ||
<waitForPageLoad stepKey="waitForPageLoad13"/> | ||
|
||
<click selector="{{CheckoutOrderSummarySection.orderNumber}}" stepKey="ClickOnOrderNumber"/> | ||
<waitForPageLoad stepKey="waitForPageLoad14"/> | ||
<!--Check billing and shipping addresses also additional Address info--> | ||
<click selector="{{CheckoutPaymentSection.addressBook}}" stepKey="goToAddressBook"/> | ||
<grabTextFrom selector="{{CheckoutOrderSummarySection.shippingAddress}}" stepKey="shippingAddr"/> | ||
<grabTextFrom selector="{{CheckoutOrderSummarySection.billingAddress}}" stepKey="billingAddr"/> | ||
<grabTextFrom selector="{{CheckoutOrderSummarySection.additionalAddress}}" stepKey="additionalAddress"/> | ||
<see userInput="Shipping Address" stepKey="seeShippingAddress"/> | ||
<see userInput="Billing Address" stepKey="seeBillingAddress"/> | ||
<assertEquals stepKey="assertValuesAreEqual" actual="$billingAddr" expected="$shippingAddr"/> | ||
<assertNotEquals stepKey="assertValuesAreNotEqual" actual="$billingAddr" expected="$additionalAddress"/> | ||
</test> | ||
</tests> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.