Skip to content

Commit 356bda2

Browse files
committed
MAGETWO-90113: Automate applying Reward Points during Checkout with MFTF tests
1 parent 35324e5 commit 356bda2

10 files changed

+68
-4
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutPaymentSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@
2525
<element name="ProductOptionsActiveByProductItemName" type="text" selector="//div[@class='product-item-details']//strong[@class='product-item-name'][text()='{{var1}}']//ancestor::div[@class='product-item-details']//div[@class='product options active']" parameterized="true" />
2626
<element name="shipToInfomation" type="text" selector="//div[@class='ship-to']//div[@class='shipping-information-content']" />
2727
<element name="shippingMethodInfomation" type="text" selector="//div[@class='ship-via']//div[@class='shipping-information-content']" />
28+
<element name="paymentMethodTitle" type="text" selector=".payment-method-title span" />
2829
</section>
2930
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutShippingMethodsSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@
1111
<section name="CheckoutShippingMethodsSection">
1212
<element name="next" type="button" selector="button.button.action.continue.primary"/>
1313
<element name="firstShippingMethod" type="radio" selector="//*[@id='checkout-shipping-method-load']//input[@class='radio']"/>
14+
<element name="checkShippingMethodByName" type="radio" selector="//td[contains(., '{{var1}}')]/..//input" parameterized="true"/>
15+
<element name="shippingMethodRowMethodByName" type="text" selector="//td[contains(., '{{var1}}')]/.." parameterized="true"/>
1416
</section>
1517
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutSuccessMainSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<section name="CheckoutSuccessMainSection">
1212
<element name="success" type="text" selector="div.checkout-success"/>
1313
<element name="orderNumber" type="text" selector="div.checkout-success > p:nth-child(1) > span"/>
14+
<element name="orderNumberLink" type="text" selector="div.checkout-success > p:nth-child(1) > a"/>
1415
<element name="orderNumber22" type="text" selector=".order-number>strong"/>
1516
</section>
1617
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/AdminCustomerPage.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
11-
<page name="AdminCustomerPage" url="/customer/index/" area="admin" module="Customer">
12-
<section name="AdminCustomerMainActionsSection"/>
11+
<page name="AdminCustomerPage" url="/customer/index/" area="admin" module="Magento_Customer">
12+
<section name="AdminCustomerGridMainActionsSection"/>
1313
<section name="AdminCustomerMessagesSection"/>
1414
<section name="AdminCustomerGridSection"/>
1515
<section name="AdminCustomerFiltersSection"/>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
11+
<page name="AdminEditCustomerPage" url="/admin/customer/index/edit/id/{{var1}}" area="admin" module="Magento_Customer" parameterized="true">
12+
<section name="AdminCustomerAccountInformationSection"/>
13+
<section name="AdminCustomerMainActionsSection"/>
14+
</page>
15+
</pages>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
11+
<page name="StorefrontCustomerOrderPage" url="/sales/order/history/" area="storefront" module="Magento_Customer">
12+
<section name="StorefrontCustomerOrderViewSection" />
13+
</page>
14+
</pages>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="AdminCustomerGridMainActionsSection">
12+
<element name="addNewCustomer" type="button" selector="#add" timeout="30"/>
13+
</section>
14+
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerMainActionsSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
1111
<section name="AdminCustomerMainActionsSection">
12-
<element name="addNewCustomer" type="button" selector="#add" timeout="30"/>
12+
<element name="saveButton" type="button" selector="#save" timeout="30"/>
1313
</section>
1414
</sections>
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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="StorefrontCustomerOrderViewSection">
12+
<element name="orderTitle" type="text" selector=".page-title span"/>
13+
<element name="myOrdersTable" type="text" selector="#my-orders-table"/>
14+
<element name="subtotal" type="text" selector=".subtotal .amount"/>
15+
<element name="paymentMethod" type="text" selector=".payment-method dt"/>
16+
</section>
17+
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Test/AdminCreateCustomerTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/>
2828
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/>
29-
<click selector="{{AdminCustomerMainActionsSection.addNewCustomer}}" stepKey="clickCreateCustomer"/>
29+
<click selector="{{AdminCustomerGridMainActionsSection.addNewCustomer}}" stepKey="clickCreateCustomer"/>
3030
<fillField userInput="{{CustomerEntityOne.firstname}}" selector="{{AdminNewCustomerAccountInformationSection.firstName}}" stepKey="fillFirstName"/>
3131
<fillField userInput="{{CustomerEntityOne.lastname}}" selector="{{AdminNewCustomerAccountInformationSection.lastName}}" stepKey="fillLastName"/>
3232
<fillField userInput="{{CustomerEntityOne.email}}" selector="{{AdminNewCustomerAccountInformationSection.email}}" stepKey="fillEmail"/>

0 commit comments

Comments
 (0)