Skip to content

Commit

Permalink
Revert tests to previous form
Browse files Browse the repository at this point in the history
  • Loading branch information
MBilalShafi committed Aug 23, 2024
1 parent 5df1de4 commit e118386
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('<DataGridPro /> - Row selection', () => {
expect(selectAllCheckbox.checked).to.equal(true);
});

it('should select all rows of all the pages if 1 row of another page is selected', () => {
it('should unselect all rows of all the pages if 1 row of another page is selected', () => {
render(
<TestDataGridSelection
checkboxSelection
Expand All @@ -78,8 +78,8 @@ describe('<DataGridPro /> - Row selection', () => {
name: /select all rows/i,
});
fireEvent.click(selectAllCheckbox);
expect(apiRef.current.getSelectedRows()).to.have.keys([0, 1, 2, 3]);
expect(selectAllCheckbox.checked).to.equal(true);
expect(apiRef.current.getSelectedRows()).to.have.length(0);
expect(selectAllCheckbox.checked).to.equal(false);
});

it('should select all visible rows if pagination is not enabled', () => {
Expand Down Expand Up @@ -168,7 +168,7 @@ describe('<DataGridPro /> - Row selection', () => {
expect(selectAllCheckbox.checked).to.equal(true);
});

it('should select all the rows of the current page if 1 row of the current page is selected', () => {
it('should unselect all the rows of the current page if 1 row of the current page is selected', () => {
render(
<TestDataGridSelection
checkboxSelection
Expand All @@ -188,8 +188,8 @@ describe('<DataGridPro /> - Row selection', () => {
name: /select all rows/i,
});
fireEvent.click(selectAllCheckbox);
expect(apiRef.current.getSelectedRows()).to.have.keys([0, 2, 3]);
expect(selectAllCheckbox.checked).to.equal(true);
expect(apiRef.current.getSelectedRows()).to.have.keys([0]);
expect(selectAllCheckbox.checked).to.equal(false);
});

it('should not set the header checkbox in a indeterminate state when some rows of other pages are not selected', () => {
Expand Down

0 comments on commit e118386

Please sign in to comment.