Skip to content

Commit 55184ce

Browse files
committed
MC-4538: Convert RegisterCustomerFrontendEntityTest to MFTF
Addressing more review comments
1 parent 03429a3 commit 55184ce

File tree

6 files changed

+16
-13
lines changed

6 files changed

+16
-13
lines changed

app/code/Magento/Customer/Test/Mftf/ActionGroup/DeleteCustomerActionGroup.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,23 @@
2424
<click stepKey="clickOnOk" selector="{{CustomersPageSection.ok}}"/>
2525
<waitForElementVisible stepKey="waitForSuccessfullyDeletedMessage" selector="{{CustomersPageSection.deletedSuccessMessage}}" time="10"/>
2626
</actionGroup>
27-
<actionGroup name="DeleteNewCustomerByEmailActionGroup">
27+
<actionGroup name="DeleteCustomerByEmailActionGroup">
2828
<arguments>
2929
<argument name="email" type="string"/>
3030
</arguments>
3131
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/>
3232
<waitForPageLoad stepKey="waitForAdminCustomerPageLoad"/>
3333
<click selector="{{AdminCustomerFiltersSection.filtersButton}}" stepKey="clickFilterButton"/>
34+
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="cleanFiltersIfTheySet"/>
3435
<waitForPageLoad stepKey="waitForClearFilters"/>
35-
<fillField selector="{{AdminCustomerFiltersSection.emailInput}}" userInput="{{CustomerEntityOne.email}}" stepKey="filterEmail"/>
36+
<fillField selector="{{AdminCustomerFiltersSection.emailInput}}" userInput="{{email}}" stepKey="filterEmail"/>
3637
<click selector="{{AdminCustomerFiltersSection.apply}}" stepKey="applyFilter"/>
37-
<waitForPageLoad stepKey="waitForApplyFilters"/>
38-
<checkOption selector="{{CustomersPageSection.customerCheckbox(email)}}" stepKey="seeCustomerEmailInGrid"/>
38+
<waitForPageLoad stepKey="waitForPageToLoad"/>
39+
<click selector="{{AdminCustomerGridSection.selectFirstRow}}" stepKey="clickOnEditButton1"/>
3940
<click selector="{{CustomersPageSection.actions}}" stepKey="clickActionsDropdown"/>
4041
<click selector="{{CustomersPageSection.delete}}" stepKey="clickDelete"/>
42+
<waitForElementVisible selector="{{CustomersPageSection.ok}}" stepKey="waitForOkToVisible"/>
4143
<click selector="{{CustomersPageSection.ok}}" stepKey="clickOkConfirmationButton"/>
42-
<waitForElementVisible stepKey="waitForSuccessfullyDeletedMessage" selector="{{CustomersPageSection.deletedSuccessMessage}}" time="10"/>
44+
<waitForElementVisible stepKey="waitForSuccessfullyDeletedMessage" selector="{{CustomersPageSection.deletedSuccessMessage}}" time="30"/>
4345
</actionGroup>
4446
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
<section name="AdminCustomerGridSection">
1212
<element name="customerGrid" type="text" selector="table[data-role='grid']"/>
1313
<element name="firstRowEditLink" type="text" selector="tr[data-repeat-index='0'] .action-menu-item" timeout="30"/>
14+
<element name="selectFirstRow" type="checkbox" selector="//td[@class='data-grid-checkbox-cell']"/>
1415
</section>
1516
</sections>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<section name="CustomersPageSection">
1212
<element name="addNewCustomerButton" type="button" selector="//*[@id='add']"/>
1313
<element name="customerCheckbox" type="button" selector="//*[contains(text(),'{{args}}')]/parent::td/preceding-sibling::td/label[@class='data-grid-checkbox-cell-inner']" parameterized="true"/>
14-
<element name="actions" type="button" selector="//div[@class='col-xs-2']/div[@class='action-select-wrap']/button[@class='action-select']"/>
15-
<element name="delete" type="button" selector="//*[contains(@class,'admin__data-grid-header-row row row-gutter')]//*[text()='Delete']"/>
16-
<element name="ok" type="button" selector="//button[@data-role='action']//span[text()='OK']"/>
14+
<element name="actions" type="button" selector="//div[@class='col-xs-2']/div[@class='action-select-wrap']/button[@class='action-select']" timeout="30"/>
15+
<element name="delete" type="button" selector="//*[contains(@class,'admin__data-grid-header-row row row-gutter')]//*[text()='Delete']" timeout="30"/>
16+
<element name="ok" type="button" selector="//button[@data-role='action']//span[text()='OK']" timeout="30"/>
1717
<element name="deletedSuccessMessage" type="button" selector="//*[@class='message message-success success']"/>
1818
</section>
1919
</sections>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontPanelHeaderSection">
1212
<element name="WelcomeMessage" type="text" selector=".greet.welcome span"/>
13-
<element name="createAnAccountLink" type="select" selector=".panel.header li:nth-child(3)" timeout="30"/>
13+
<element name="createAnAccountLink" type="select" selector="//div[@class='panel wrapper']//li/a[contains(.,'Create an Account')]" timeout="30"/>
1414
<element name="notYouLink" type="button" selector=".greet.welcome span a"/>
1515
<element name="customerWelcome" type="text" selector=".panel.header .customer-welcome"/>
1616
<element name="customerWelcomeMenu" type="text" selector=".panel.header .customer-welcome .customer-menu"/>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2424
</before>
2525
<after>
26-
<actionGroup ref="DeleteNewCustomerByEmailActionGroup" stepKey="deleteNewUser">
26+
<actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteNewUser">
2727
<argument name="email" value="{{CustomerEntityOne.email}}"/>
2828
</actionGroup>
2929
<actionGroup ref="logout" stepKey="logout"/>
@@ -34,7 +34,7 @@
3434
<argument name="customer" value="CustomerEntityOne" />
3535
</actionGroup>
3636

37-
<!--Verify created new customer in grid-->
37+
<!--Assert verify created new customer in grid-->
3838
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/>
3939
<waitForPageLoad stepKey="waitForNavigateToCustomersPageLoad"/>
4040
<click selector="{{AdminCustomerFiltersSection.filtersButton}}" stepKey="clickFilterButton"/>
@@ -44,7 +44,7 @@
4444
<see selector="{{AdminCustomerGridSection.customerGrid}}" userInput="{{CustomerEntityOne.lastname}}" stepKey="seeAssertCustomerLastNameInGrid"/>
4545
<see selector="{{AdminCustomerGridSection.customerGrid}}" userInput="{{CustomerEntityOne.email}}" stepKey="seeAssertCustomerEmailInGrid"/>
4646

47-
<!--Verify created new customer is subscribed to newsletter-->
47+
<!--Assert verify created new customer is subscribed to newsletter-->
4848
<click selector="{{AdminCustomerGridSection.firstRowEditLink}}" stepKey="clickFirstRowEditLink"/>
4949
<waitForPageLoad stepKey="waitForEditLinkLoad"/>
5050
<click selector="{{AdminEditCustomerInformationSection.newsLetter}}" stepKey="clickNewsLetter"/>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2424
</before>
2525
<after>
26-
<actionGroup ref="DeleteNewCustomerByEmailActionGroup" stepKey="deleteNewUser">
26+
<actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteNewUser">
2727
<argument name="email" value="{{CustomerEntityOne.email}}"/>
2828
</actionGroup>
2929
<actionGroup ref="logout" stepKey="logout"/>

0 commit comments

Comments
 (0)