Skip to content

Commit

Permalink
should fail without the fix
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored and bigandy committed Feb 19, 2021
1 parent 17fb30e commit c361a0b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/grid/data-grid/src/tests/selection.DataGrid.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ describe('<DataGrid /> - Selection', () => {
it('with no rows, the checkbox should not be checked', () => {
render(
<div style={{ width: 300, height: 300 }}>
<DataGrid rows={[]} columns={[{ field: 'brand', width: 100 }]} />
<DataGrid rows={[]} checkboxSelection columns={[{ field: 'brand', width: 100 }]} />
</div>,
);
const checkedIcon = document.querySelector('[data-testid="CheckBoxOutlineBlankIcon"]');

expect(checkedIcon).to.not.be.instanceof(window.HTMLDivElement);
const selectAll = screen.getByRole('checkbox', {
name: /select all rows checkbox/i,
});
expect(selectAll).to.have.property('checked', false);
});
});

Expand Down

0 comments on commit c361a0b

Please sign in to comment.