Skip to content

Commit

Permalink
chore: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
linhf123 committed May 21, 2024
1 parent 433641e commit aa91b9e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/design/src/table/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@ describe('Table', () => {
expect(asFragment().firstChild).toMatchSnapshot();
});

it('row selection should work', () => {
const { container, asFragment } = render(
<TableTest
rowSelection={{
selectedRowKeys: ['1', '2'],
}}
/>
);
// selection column
expect(container.querySelector('.ant-table-selection-column')).toBeTruthy();
// batch operation bar
expect(container.querySelector('.ant-table-batch-operation-bar')).toBeTruthy();
});

it('default pagination should work', () => {
const { container, asFragment } = render(<TableTest />);
// pagination.showTotal
Expand Down

0 comments on commit aa91b9e

Please sign in to comment.