Files
tom goriunovandGitHub 22f8016a8f Playwright tests refactoring, pt.5 (#1952)
* next part of test refactoring

* more refactoring

* more refactoring

* fixes and clean-up

* fixes

* build fixes

* more fixes
2024-05-25 15:41:32 +02:00

26 lines
645 B
TypeScript

import React from 'react';
import type { PaginationParams } from './types';
import { test, expect } from 'playwright/lib';
import Pagination from './Pagination';
test.use({ viewport: { width: 250, height: 50 } });
test('default view', async({ render }) => {
const props: PaginationParams = {
page: 2,
isVisible: true,
isLoading: false,
hasNextPage: true,
hasPages: true,
canGoBackwards: false,
onNextPageClick: () => {},
onPrevPageClick: () => {},
resetPage: () => {},
};
const component = await render(<Pagination { ...props } w="fit-content"/>);
await expect(component).toHaveScreenshot();
});