From e60965adb0824ce1215ce04f0c0f62f33525c0fa Mon Sep 17 00:00:00 2001 From: David Grigoryan Date: Wed, 15 Aug 2018 13:31:55 +0400 Subject: [PATCH] MAGETWO-62891: New address is not marked as "Default Billing" - Add automated test --- ...ltBillingAndShippingAddressActionGroup.xml | 146 ++++++++++++++++++ ...OfDefaultBillingAndShippingAddressData.xml | 26 ++++ ...efaultBillingAndShippingAddressSection.xml | 94 +++++++++++ ...OfDefaultBillingAndShippingAddressTest.xml | 62 ++++++++ 4 files changed, 328 insertions(+) create mode 100644 app/code/Magento/Checkout/Test/Mftf/ActionGroup/IdentityOfDefaultBillingAndShippingAddressActionGroup.xml create mode 100644 app/code/Magento/Checkout/Test/Mftf/Data/IdentityOfDefaultBillingAndShippingAddressData.xml create mode 100644 app/code/Magento/Checkout/Test/Mftf/Section/IdentityOfDefaultBillingAndShippingAddressSection.xml create mode 100644 app/code/Magento/Checkout/Test/Mftf/Test/IdentityOfDefaultBillingAndShippingAddressTest.xml diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/IdentityOfDefaultBillingAndShippingAddressActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/IdentityOfDefaultBillingAndShippingAddressActionGroup.xml new file mode 100644 index 0000000000000..e126bd4b5f743 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/IdentityOfDefaultBillingAndShippingAddressActionGroup.xml @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Checkout/Test/Mftf/Data/IdentityOfDefaultBillingAndShippingAddressData.xml b/app/code/Magento/Checkout/Test/Mftf/Data/IdentityOfDefaultBillingAndShippingAddressData.xml new file mode 100644 index 0000000000000..a627eb3102bf6 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Data/IdentityOfDefaultBillingAndShippingAddressData.xml @@ -0,0 +1,26 @@ + + + + + + testProduct + testSku + 210 + 10 + testProduct + + + + BirminghamStreet + Birmingham + 35005 + 222222222 + + + diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/IdentityOfDefaultBillingAndShippingAddressSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/IdentityOfDefaultBillingAndShippingAddressSection.xml new file mode 100644 index 0000000000000..8e8183a2be946 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Section/IdentityOfDefaultBillingAndShippingAddressSection.xml @@ -0,0 +1,94 @@ + + + + +
+ + + + +
+ +
+ + + + + + + +
+ +
+ + + + + + + +
+ +
+ + + + + +
+ +
+ + + + + + + + + + + + + +
+ +
+ + +
+ +
+ + + + + + + + + + +
+ +
+ + +
+ +
+ + + + + + +
+ +
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/IdentityOfDefaultBillingAndShippingAddressTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/IdentityOfDefaultBillingAndShippingAddressTest.xml new file mode 100644 index 0000000000000..48e4cc631e175 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Test/IdentityOfDefaultBillingAndShippingAddressTest.xml @@ -0,0 +1,62 @@ + + + + + + + + + <description value="In 'Address book' field 'Default Billing Address' should be the same as 'Default Shipping Address'"/> + <severity value="MAJOR"/> + <testCaseId value="MAGETWO-94108"/> + <stories value="MAGETWO-62891: New address is not marked as 'Default Billing'"/> + <group value="customer"/> + </annotations> + + <before> + <!--Login as admin--> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + + <!--Create product--> + <actionGroup ref="GoToProductPage" stepKey="goToProductPage"/> + <actionGroup ref="CreateSimpleProduct" stepKey="createSimpleProduct"/> + </before> + + <!--Go to Storefront--> + <amOnPage url="" stepKey="DoToStorefront"/> + + <!--Create account--> + <actionGroup ref="StorefrontCreateAccountActionGroup" stepKey="storefrontCreateAccountActionGroup"/> + + <!--Add product to cart--> + <actionGroup ref="FindAndAddProductToCardActionGroup" stepKey="FindAndAddProductToCard"/> + + <!--Fill shipment form--> + <actionGroup ref="FillShipmentFormActionGroup" stepKey="ShipmentFormActionGroup"/> + + <!--Fill cart data--> + <actionGroup ref="MarkMyBillingAndShippingAddressAreTheSame" stepKey="markMyBillingAndShippingAddressAreTheSame"/> + + <!--Go To My Account--> + <actionGroup ref="GoToMyAccountPage" stepKey="goToMyAccountPage"/> + + <!--Assert That Shipping And Billing Address are the same--> + <actionGroup ref="AssertThatShippingAndBillingAddressTheSame" stepKey="assertThatShippingAndBillingAddressTheSame"/> + + <after> + <!--Delete created Product--> + <amOnPage url="/admin" stepKey="GoToDashboard"/> + <actionGroup ref="GoToProductPage" stepKey="againGoToProductPage"/> + <actionGroup ref="DeleteCreatedProduct" stepKey="deleteCreatedProduct"/> + + <!--Delete created Customer--> + <actionGroup ref="DeleteCreatedCustomerActionGroup" stepKey="deleteCreatedCustomer"/> + </after> + </test> +</tests>