forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
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 magento#96 from magento-pangolin/MC-4457
MC-4457
- Loading branch information
Showing
24 changed files
with
961 additions
and
7 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...ento/Checkout/Test/Mftf/ActionGroup/CustomerCheckoutFillNewShippingAddressActionGroup.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. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="CustomerCheckoutFillNewShippingAddressActionGroup"> | ||
<arguments> | ||
<argument name="address" type="entity"/> | ||
</arguments> | ||
<selectOption selector="{{CheckoutShippingSection.country}}" userInput="{{address.country}}" stepKey="selectCounty"/> | ||
<fillField selector="{{CheckoutShippingSection.street}}" userInput="{{address.street}}" stepKey="fillStreet"/> | ||
<fillField selector="{{CheckoutShippingSection.city}}" userInput="{{address.city}}" stepKey="fillCity"/> | ||
<selectOption selector="{{CheckoutShippingSection.region}}" userInput="{{address.state}}" stepKey="selectRegion"/> | ||
<fillField selector="{{CheckoutShippingSection.postcode}}" userInput="{{address.postcode}}" stepKey="fillZipCode"/> | ||
<fillField selector="{{CheckoutShippingSection.telephone}}" userInput="{{address.telephone}}" stepKey="fillPhone"/> | ||
<fillField selector="{{CheckoutShippingSection.company}}" userInput="{{address.company}}" stepKey="fillCompany"/> | ||
</actionGroup> | ||
</actionGroups> |
25 changes: 25 additions & 0 deletions
25
...Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillNewShippingAddressActionGroup.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,25 @@ | ||
<?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/actionGroupSchema.xsd"> | ||
<actionGroup name="GuestCheckoutFillNewShippingAddressActionGroup"> | ||
<arguments> | ||
<argument name="customer" type="entity"/> | ||
<argument name="address" type="entity"/> | ||
</arguments> | ||
<fillField selector="{{CheckoutShippingSection.email}}" userInput="{{customer.email}}" stepKey="fillEmailField"/> | ||
<fillField selector="{{CheckoutShippingSection.firstName}}" userInput="{{customer.firstName}}" stepKey="fillFirstName"/> | ||
<fillField selector="{{CheckoutShippingSection.lastName}}" userInput="{{customer.lastName}}" stepKey="fillLastName"/> | ||
<fillField selector="{{CheckoutShippingSection.street}}" userInput="{{address.street}}" stepKey="fillStreet"/> | ||
<fillField selector="{{CheckoutShippingSection.city}}" userInput="{{address.city}}" stepKey="fillCity"/> | ||
<selectOption selector="{{CheckoutShippingSection.region}}" userInput="{{address.state}}" stepKey="selectRegion"/> | ||
<fillField selector="{{CheckoutShippingSection.postcode}}" userInput="{{address.postcode}}" stepKey="fillZipCode"/> | ||
<fillField selector="{{CheckoutShippingSection.telephone}}" userInput="{{address.telephone}}" stepKey="fillPhone"/> | ||
</actionGroup> | ||
</actionGroups> |
25 changes: 25 additions & 0 deletions
25
app/code/Magento/Checkout/Test/Mftf/ActionGroup/LoginAsCustomerOnCheckoutPageActionGroup.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,25 @@ | ||
<?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/actionGroupSchema.xsd"> | ||
<actionGroup name="LoginAsCustomerOnCheckoutPageActionGroup"> | ||
<arguments> | ||
<argument name="customer" type="entity"/> | ||
</arguments> | ||
<waitForPageLoad stepKey="waitForCheckoutShippingSectionToLoad"/> | ||
<fillField selector="{{CheckoutShippingSection.email}}" userInput="{{customer.email}}" stepKey="fillEmailField"/> | ||
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/> | ||
<waitForElementVisible selector="{{CheckoutShippingSection.password}}" stepKey="waitForElementVisible"/> | ||
<fillField selector="{{CheckoutShippingSection.password}}" userInput="{{customer.password}}" stepKey="fillPasswordField"/> | ||
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear2"/> | ||
<doubleClick selector="{{CheckoutShippingSection.loginButton}}" stepKey="clickLoginBtn"/> | ||
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear3"/> | ||
<waitForPageLoad stepKey="waitForLogin"/> | ||
</actionGroup> | ||
</actionGroups> |
20 changes: 20 additions & 0 deletions
20
...code/Magento/Checkout/Test/Mftf/ActionGroup/LoginAsCustomerUsingSignInLinkActionGroup.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,20 @@ | ||
<?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/actionGroupSchema.xsd"> | ||
<actionGroup name="LoginAsCustomerUsingSignInLinkActionGroup"> | ||
<arguments> | ||
<argument name="customer" type="entity"/> | ||
</arguments> | ||
<click selector="{{StorefrontCustomerSignInLinkSection.signInLink}}" stepKey="clickOnCustomizeAndAddToCartButton"/> | ||
<fillField selector="{{StorefrontCustomerSignInLinkSection.email}}" userInput="{{customer.email}}" stepKey="fillEmail"/> | ||
<fillField selector="{{StorefrontCustomerSignInLinkSection.password}}" userInput="{{customer.password}}" stepKey="fillPassword"/> | ||
<click selector="{{StorefrontCustomerSignInLinkSection.signInBtn}}" stepKey="clickSignInBtn"/> | ||
</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
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
106 changes: 106 additions & 0 deletions
106
...code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingDefaultAddressTest.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,106 @@ | ||
<?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="OnePageCheckoutAsCustomerUsingDefaultAddressTest"> | ||
<annotations> | ||
<features value="OnePageCheckout"/> | ||
<stories value="OnePageCheckout within Offline Payment Methods"/> | ||
<title value="OnePageCheckout as customer using default address test"/> | ||
<description value="Checkout as customer using default address"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-14741"/> | ||
<group value="checkout"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<!-- Create Simple Product --> | ||
<createData entity="SimpleProduct2" stepKey="createSimpleProduct"> | ||
<field key="price">560</field> | ||
</createData> | ||
|
||
<!-- Create customer --> | ||
<createData entity="Simple_US_Customer_Multiple_Addresses" stepKey="createCustomer"/> | ||
</before> | ||
<after> | ||
<!-- Admin log out --> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
|
||
<!-- Customer log out --> | ||
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> | ||
|
||
<!-- Delete created product --> | ||
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> | ||
|
||
<!-- Delete customer --> | ||
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> | ||
</after> | ||
|
||
<!-- Add Simple Product to cart --> | ||
<amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="navigateToSimpleProductPage"/> | ||
<waitForPageLoad stepKey="waitForSimpleProductPageLoad"/> | ||
<actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProductPage"> | ||
<argument name="productName" value="$$createSimpleProduct.name$$"/> | ||
</actionGroup> | ||
|
||
<!-- Go to shopping cart --> | ||
<actionGroup ref="clickViewAndEditCartFromMiniCart" stepKey="goToShoppingCartFromMinicart"/> | ||
<actionGroup ref="FillShippingZipForm" stepKey="fillShippingZipForm"> | ||
<argument name="address" value="US_Address_CA"/> | ||
</actionGroup> | ||
<click selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="clickProceedToCheckout"/> | ||
<waitForPageLoad stepKey="waitForProceedToCheckout"/> | ||
|
||
|
||
<!-- Login as customer on checkout page --> | ||
<actionGroup ref="LoginAsCustomerOnCheckoutPageActionGroup" stepKey="customerLogin"> | ||
<argument name="customer" value="$createCustomer$"/> | ||
</actionGroup> | ||
|
||
<!-- Fill customer address data --> | ||
<waitForElementVisible selector="{{CheckoutShippingSection.shipHereButton(UK_Not_Default_Address.street[0])}}" stepKey="waitForShipHereVisible"/> | ||
<!-- Change address --> | ||
<click selector="{{CheckoutShippingSection.shipHereButton(UK_Not_Default_Address.street[0])}}" stepKey="clickShipHere"/> | ||
|
||
<!-- Click next button to open payment section --> | ||
<click selector="{{CheckoutShippingGuestInfoSection.next}}" stepKey="clickNext"/> | ||
<waitForPageLoad stepKey="waitForShipmentPageLoad"/> | ||
|
||
<!-- Select payment solution --> | ||
<checkOption selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="selectPaymentSolution" /> | ||
|
||
<!-- Check order summary in checkout --> | ||
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPaymentSectionLoaded"/> | ||
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrderButton"/> | ||
<seeElement selector="{{CheckoutSuccessMainSection.success}}" stepKey="orderIsSuccessfullyPlaced"/> | ||
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> | ||
|
||
<!-- Login as admin --> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
|
||
<!-- Open created order in backend --> | ||
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="goToOrders"/> | ||
<waitForPageLoad stepKey="waitForOrdersPageLoad"/> | ||
<actionGroup ref="OpenOrderById" stepKey="filterOrderGridById"> | ||
<argument name="orderId" value="$grabOrderNumber"/> | ||
</actionGroup> | ||
|
||
<!-- Assert order total --> | ||
<scrollTo selector="{{AdminOrderTotalSection.grandTotal}}" stepKey="scrollToOrderTotalSection"/> | ||
<see selector="{{AdminOrderTotalSection.grandTotal}}" userInput="$565.00" stepKey="checkOrderTotalInBackend"/> | ||
|
||
<!-- Assert order addresses --> | ||
<see selector="{{AdminShipmentAddressInformationSection.billingAddress}}" userInput="{{UK_Not_Default_Address.street[0]}}" stepKey="seeBillingAddressStreet"/> | ||
<see selector="{{AdminShipmentAddressInformationSection.billingAddress}}" userInput="{{UK_Not_Default_Address.city}}" stepKey="seeBillingAddressCity"/> | ||
<see selector="{{AdminShipmentAddressInformationSection.billingAddress}}" userInput="{{UK_Not_Default_Address.postcode}}" stepKey="seeBillingAddressPostcode"/> | ||
<see selector="{{AdminShipmentAddressInformationSection.shippingAddress}}" userInput="{{UK_Not_Default_Address.street[0]}}" stepKey="seeShippingAddressStreet"/> | ||
<see selector="{{AdminShipmentAddressInformationSection.shippingAddress}}" userInput="{{UK_Not_Default_Address.city}}" stepKey="seeShippingAddressCity"/> | ||
<see selector="{{AdminShipmentAddressInformationSection.shippingAddress}}" userInput="{{UK_Not_Default_Address.postcode}}" stepKey="seeShippingAddressPostcode"/> | ||
</test> | ||
</tests> |
Oops, something went wrong.