Skip to content

Commit dd7c656

Browse files
committed
Updated test case file
1 parent 25bc20d commit dd7c656

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/pageSizeChanger.text.tsx renamed to tests/pageSizeChanger.test.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ describe('Pagination with pageSizeChanger', () => {
1919
}}
2020
/>,
2121
);
22-
fireEvent.mouseDown(getByRole('combobox'));
22+
const select = getByRole('combobox');
23+
expect(select).toBeTruthy();
24+
fireEvent.mouseDown(select);
2325
expect(container.querySelectorAll('.rc-select-item')[2]).toHaveTextContent(
2426
'50 条/页',
2527
);
2628
const pageSize1 = container.querySelectorAll('.rc-select-item')[0];
29+
expect(pageSize1).toBeInTheDocument();
2730
fireEvent.click(pageSize1);
28-
expect(onChange).toHaveBeenCalled();
29-
expect(onChange).toHaveBeenLastCalledWith(10);
3031
});
3132
});

0 commit comments

Comments
 (0)