Files
Igor StuevandGitHub 246447e6fd pools pages (#2468)
* pools pages

* fixes and changes

* revert demo config
2024-12-16 14:43:50 +01:00

31 lines
834 B
TypeScript

import React from 'react';
import * as poolMock from 'mocks/pools/pool';
import { test, expect } from 'playwright/lib';
import PoolEntity from './PoolEntity';
test.use({ viewport: { width: 300, height: 100 } });
test('with icons +@dark-mode', async({ render, mockAssetResponse }) => {
await mockAssetResponse('https://localhost:3000/utia.jpg', './playwright/mocks/image_s.jpg');
await mockAssetResponse('https://localhost:3000/secondary_utia.jpg', './playwright/mocks/image_md.jpg');
const component = await render(
<PoolEntity
pool={ poolMock.base }
/>,
);
await expect(component).toHaveScreenshot();
});
test('no icons +@dark-mode', async({ render }) => {
const component = await render(
<PoolEntity
pool={ poolMock.noIcons }
/>,
);
await expect(component).toHaveScreenshot();
});