-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for multiselect with search on grid.
- Loading branch information
1 parent
1c9ba3e
commit 1f6e82f
Showing
2 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
app/code/Magento/Ui/Test/Mftf/Test/AdminGridSearchSelectAllTest.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,57 @@ | ||
<?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="AdminGridSearchSelectAllTest"> | ||
<annotations> | ||
<stories value="Selection should be removed during search."/> | ||
<title value="Selection should be removed during search."/> | ||
<description value="Empty selected before and after search, like it works for filter"/> | ||
<testCaseId value=""/> | ||
<severity value="CRITICAL"/> | ||
<group value="uI"/> | ||
</annotations> | ||
<before> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||
<!--Create three customers--> | ||
<createData entity="Simple_US_Customer" stepKey="firstCustomer"/> | ||
<createData entity="Simple_US_Customer" stepKey="secondCustomer"/> | ||
<createData entity="Simple_US_Customer" stepKey="thirdCustomer"/> | ||
</before> | ||
<after> | ||
<!--Remove two created customers, third already deleted--> | ||
<deleteData createDataKey="firstCustomer" stepKey="deleteFirstCustomer"/> | ||
<deleteData createDataKey="secondCustomer" stepKey="deleteSecondCustomer"/> | ||
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> | ||
</after> | ||
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomerPage"/> | ||
<!-- search Admin Data Grid By Keyword --> | ||
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/> | ||
<fillField selector="{{AdminDataGridHeaderSection.search}}" userInput="$$secondCustomer.email$$" stepKey="fillKeywordSearchFieldWithSecondCustomerEmail"/> | ||
<click selector="{{AdminDataGridHeaderSection.submitSearch}}" stepKey="clickKeywordSearch"/> | ||
<waitForPageLoad stepKey="waitForPageLoad"/> | ||
<!-- Check select all action --> | ||
<actionGroup ref="AdminSelectAllCustomers" stepKey="selectAllCustomers"/> | ||
<seeCheckboxIsChecked selector="{{AdminCustomerGridMainActionsSection.customerCheckbox($$secondCustomer.email$$)}}" stepKey="checkSecondCustomerIsCheckedAfterSelectAll"/> | ||
<!-- Clear searching By Keyword--> | ||
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickClearFiltersAfterSearch"/> | ||
<waitForPageLoad stepKey="waitForPageLoadAfterSearchRemoved"/> | ||
<!-- Check if selection has bee removed --> | ||
<dontSeeCheckboxIsChecked selector="{{AdminCustomerGridMainActionsSection.customerCheckbox($$secondCustomer.email$$)}}" stepKey="checkSecondCustomerCheckboxIsUnchecked"/> | ||
<!-- Check delete action --> | ||
<click selector="{{AdminCustomerGridMainActionsSection.customerCheckbox(($$thirdCustomer.email$$)}}" stepKey="selectThirdCustomer"/> | ||
<seeCheckboxIsChecked selector="{{AdminCustomerGridMainActionsSection.customerCheckbox($$thirdCustomer.email$$)}}" stepKey="checkThirdCustomerIsChecked"/> | ||
<!-- Use delete action for selected --> | ||
<click selector="{{AdminCustomerGridMainActionsSection.actions}}" stepKey="clickActions"/> | ||
<click selector="{{AdminCustomerGridMainActionsSection.delete}}" stepKey="clickDelete"/> | ||
<waitForAjaxLoad stepKey="waitForLoadConfirmation"/> | ||
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmDelete"/> | ||
<!-- Check if only one record record has been deleted --> | ||
<see selector="{{AdminMessagesSection.success}}" userInput="A total of 1 record(s) were deleted" stepKey="seeSuccess"/> | ||
</test> | ||
</tests> |
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