Skip to content

Commit 09c734d

Browse files
committed
MAGETWO-90114: Automate Store Credit with MFTF
1 parent 94ccd58 commit 09c734d

13 files changed

+85
-14
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/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>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="OpenEditCustomerFromAdminActionGroup">
11+
<arguments>
12+
<argument name="customer"/>
13+
</arguments>
14+
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/>
15+
<waitForPageLoad stepKey="waitForPageLoad1" />
16+
<click selector="{{AdminCustomerFiltersSection.filtersButton}}" stepKey="openFilter"/>
17+
<fillField userInput="{{customer.email}}" selector="{{AdminCustomerFiltersSection.emailInput}}" stepKey="filterEmail"/>
18+
<click selector="{{AdminCustomerFiltersSection.apply}}" stepKey="applyFilter"/>
19+
<click selector="{{AdminCustomerGridSection.rowEditAction}}" stepKey="clickEdit"/>
20+
<waitForPageLoad stepKey="waitForPageLoad2" />
21+
</actionGroup>
22+
</actionGroups>

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="/customer/index/edit" area="admin" module="Magento_Customer">
12+
<section name="AdminCustomerAccountInformationSection"/>
13+
<section name="AdminCustomerMainActionsSection"/>
14+
</page>
15+
</pages>

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

Lines changed: 3 additions & 3 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="AdminNewCustomerPage" url="/customer/index/new" area="admin" module="Customer">
12-
<section name="AdminNewCustomerAccountInformationSection"/>
13-
<section name="AdminNewCustomerMainActionsSection"/>
11+
<page name="AdminNewCustomerPage" url="/customer/index/new" area="admin" module="Magento_Customer">
12+
<section name="AdminCustomerAccountInformationSection"/>
13+
<section name="AdminCustomerMainActionsSection"/>
1414
</page>
1515
</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>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

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">
11-
<section name="AdminNewCustomerAccountInformationSection">
11+
<section name="AdminCustomerAccountInformationSection">
1212
<element name="firstName" type="input" selector="input[name='customer[firstname]']"/>
1313
<element name="lastName" type="input" selector="input[name='customer[lastname]']"/>
1414
<element name="email" type="input" selector="input[name='customer[email]']"/>
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/AdminCustomerGridSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
1111
<section name="AdminCustomerGridSection">
1212
<element name="customerGrid" type="text" selector="table[data-role='grid']"/>
13+
<element name="rowEditAction" type="button" selector=".data-grid-actions-cell .action-menu-item"/>
1314
</section>
1415
</sections>

0 commit comments

Comments
 (0)