|
@@ -18,6 +18,9 @@ describe('DataTablePagination', () => {
|
|
|
// 检查分页组件是否渲染
|
|
// 检查分页组件是否渲染
|
|
|
expect(screen.getByRole('navigation')).toBeInTheDocument();
|
|
expect(screen.getByRole('navigation')).toBeInTheDocument();
|
|
|
|
|
|
|
|
|
|
+ // 检查分页信息是否正确显示
|
|
|
|
|
+ expect(screen.getByText('共 100 条记录,第 1 / 10 页')).toBeInTheDocument();
|
|
|
|
|
+
|
|
|
// 检查页码是否正确显示
|
|
// 检查页码是否正确显示
|
|
|
expect(screen.getByText('1')).toBeInTheDocument();
|
|
expect(screen.getByText('1')).toBeInTheDocument();
|
|
|
expect(screen.getByText('10')).toBeInTheDocument();
|
|
expect(screen.getByText('10')).toBeInTheDocument();
|