Skip to content

Commit effd2ab

Browse files
committed
MAGETWO-86766: Admin Create Customer functional test fails
1 parent 5a04525 commit effd2ab

File tree

4 files changed

+34
-7
lines changed

4 files changed

+34
-7
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="searchAndMultiSelectActionGroup">
12+
<arguments>
13+
<argument name="dropDownSelector"/>
14+
<argument name="options" type="string"/>
15+
</arguments>
16+
<waitForPageLoad stepKey="waitForPageLoad"/>
17+
<waitForElementVisible selector="{{dropDownSelector}} .action-select.admin__action-multiselect" stepKey="waitForDropdown"/>
18+
<click selector="{{dropDownSelector}} .action-select.admin__action-multiselect" stepKey="clickDropdown"/>
19+
<selectMultipleOptions filterSelector="{{dropDownSelector}} .admin__action-multiselect-search-wrap>input" optionSelector="{{dropDownSelector}} .admin__action-multiselect-label>span" stepKey="selectSpecifiedOptions">
20+
<array>[{{options}}]</array>
21+
</selectMultipleOptions>
22+
</actionGroup>
23+
</actionGroups>

app/code/Magento/Customer/Test/Mftf/Section/AdminNewCustomerAccountInformationSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
<element name="firstName" type="input" selector="input[name='customer[firstname]']"/>
1414
<element name="lastName" type="input" selector="input[name='customer[lastname]']"/>
1515
<element name="email" type="input" selector="input[name='customer[email]']"/>
16+
<element name="group" type="select" selector="[name='customer[group_id]']"/>
1617
</section>
1718
</sections>

app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerTest.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
1111
<test name="AdminCreateCustomerTest">
1212
<annotations>
1313
<features value="Customer Creation"/>
@@ -18,16 +18,14 @@
1818
<testCaseId value="MAGETWO-72095"/>
1919
<group value="customer"/>
2020
<group value="create"/>
21-
<group value="skip"/>
2221
</annotations>
2322
<after>
24-
<amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/>
23+
<actionGroup ref="logout" stepKey="logout"/>
2524
</after>
2625

2726
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/>
28-
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/>
29-
<click selector="{{AdminCustomerGridMainActionsSection.addNewCustomer}}" stepKey="clickCreateCustomer"/>
30-
<waitForElement selector="{{AdminNewCustomerAccountInformationSection.firstName}}" stepKey="waitInfoTab"/>
27+
<amOnPage url="{{AdminNewCustomerPage.url}}" stepKey="navigateToCreateCustomer"/>
28+
<waitForPageLoad time="30" stepKey="waitForPageLoad"/>
3129
<fillField userInput="{{CustomerEntityOne.firstname}}" selector="{{AdminNewCustomerAccountInformationSection.firstName}}" stepKey="fillFirstName"/>
3230
<fillField userInput="{{CustomerEntityOne.lastname}}" selector="{{AdminNewCustomerAccountInformationSection.lastName}}" stepKey="fillLastName"/>
3331
<fillField userInput="{{CustomerEntityOne.email}}" selector="{{AdminNewCustomerAccountInformationSection.email}}" stepKey="fillEmail"/>

app/code/Magento/Sales/Test/Mftf/Data/CustomerGroupData.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77
-->
88

99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
1111
<entity name="GeneralCustomerGroup" type="customerGroup">
1212
<data key="code">General</data>
1313
</entity>
14+
<entity name="DefaultCustomerGroup" type="customerGroup">
15+
<array key="group_names">
16+
<item>General</item>
17+
</array>
18+
</entity>
1419
</entities>

0 commit comments

Comments
 (0)