Skip to content

Commit

Permalink
Test blinker ...
Browse files Browse the repository at this point in the history
  • Loading branch information
klassm committed Aug 1, 2023
1 parent c1edcc8 commit 3812444
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions __tests__/selection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,24 +141,28 @@ describe('Selection tests', () => {
{ title: 'Id', field: 'id' },
{ title: 'Word', field: 'word' }
];
const data = [
...rawData,
{ id: 11, word: 'test', parentId: 0 },
{ id: 12, word: 'test', parentId: 1 }
];
render(
<MaterialTable
parentChildData={(row, rows) => rows.find((a) => a.id === row.parentId)}
data={[
...rawData,
{ id: 11, word: 'test', parentId: 0 },
{ id: 12, word: 'test', parentId: 1 }
]}
data={data}
columns={columns}
options={{
selection: true
}}
/>
);
expect(screen.getAllByRole('checkbox')).toHaveLength(6);
screen
.getAllByRole('checkbox')
.forEach((box) => expect(box).not.toBeChecked());

await waitFor(async () => {
const checkboxes = await screen.findAllByRole('checkbox');
expect(checkboxes).toHaveLength(6);
checkboxes.forEach((box) => expect(box).not.toBeChecked());
});

const search = screen.getByRole('textbox', {
name: /search/i
});
Expand Down

0 comments on commit 3812444

Please sign in to comment.