Skip to content

Fixed #24400 Issues Found on Grid Multi-Select Column #26626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<element name="firstRowEditLink" type="text" selector="tr[data-repeat-index='0'] .action-menu-item" timeout="30"/>
<element name="gridRow" type="text" selector="//*[@data-role='sticky-el-root']/parent::div/parent::div/following-sibling::div//tbody//*[@class='data-row'][{{row}}]" parameterized="true"/>
<element name="selectFirstRow" type="checkbox" selector="//td[@class='data-grid-checkbox-cell']"/>
<element name="firstRowCheckbox" type="checkbox" selector="//tr[contains(@data-repeat-index, '0')]//input[@type='checkbox']"/>
<element name="customerCheckboxByEmail" type="checkbox" selector="//tr[@class='data-row' and //div[text()='{{customerEmail}}']]//input[@type='checkbox']" parameterized="true" timeout="30"/>
<element name="customerEditLinkByEmail" type="text" selector="//tr[@class='data-row' and //div[text()='{{customerEmail}}']]//a[@class='action-menu-item']" parameterized="true" timeout="30"/>
<element name="customerGroupByEmail" type="text" selector="//tr[@class='data-row' and //div[text()='{{customerEmail}}']]//div[text()='{{customerGroup}}']" parameterized="true"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?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="AdminGridSelectAllCheckboxTest">
<annotations>
<stories value="Select All Rows in Grid"/>
<title value="Select All Rows Grid ans unselect row"/>
<description value="Test for check selected rows in Grid and Select All selector"/>
<group value="ui"/>
</annotations>
<before>
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
<createData entity="Simple_US_Customer" stepKey="createCustomer1"/>
<createData entity="Simple_US_Customer" stepKey="createCustomer2"/>
</before>
<after>
<deleteData createDataKey="createCustomer1" stepKey="deleteCustomer1"/>
<deleteData createDataKey="createCustomer2" stepKey="deleteCustomer2"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomerPage"/>
<waitForPageLoad stepKey="waitForCustomerPage"/>
<actionGroup ref="AdminSelectAllCustomers" stepKey="selectAllCustomers1"/>
<seeCheckboxIsChecked selector="{{AdminCustomerGridSection.firstRowCheckbox}}" stepKey="checkFirstCheckboxIsChecked"/>
<click selector="{{AdminCustomerGridSection.selectFirstRow}}" stepKey="unselectFirstRow"/>
<dontSeeCheckboxIsChecked selector="{{AdminCustomerGridSection.firstRowCheckbox}}" stepKey="checkFirstCheckboxIsUnchecked"/>
<actionGroup ref="AdminSelectAllCustomers" stepKey="selectAllCustomers2"/>
<seeCheckboxIsChecked selector="{{AdminCustomerGridSection.firstRowCheckbox}}" stepKey="reCheckFirstCheckboxIsChecked"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ define([
* @returns {Multiselect} Chainable.
*/
togglePage: function () {
return this.isPageSelected() ? this.deselectPage() : this.selectPage();
return this.isPageSelected() && !this.excluded().length ? this.deselectPage() : this.selectPage();
},

/**
Expand Down