Skip to content

Commit

Permalink
fix: test tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NasgulNexus committed Nov 13, 2023
1 parent 3703033 commit 24d8e78
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 0 additions & 4 deletions playwright/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ const config: PlaywrightTestConfig = {
reporter,
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
viewport: {
width: 1200,
height: 900,
},
testIdAttribute: 'data-qa',
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion src/components/Button/__tests__/Button.visual.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from 'react';
import {Gear} from '@gravity-ui/icons';
import {expect, test} from '@playwright/experimental-ct-react';

import {WrapperTest} from '../../../../playwright/helpers';
import {Button} from '../Button';
import {ButtonViewShowcase} from '../__stories__/ButtonViewShowcase';

Expand Down Expand Up @@ -104,7 +105,11 @@ test.describe('Button', () => {
});

test('ButtonViewShowcase', async ({mount}) => {
const component = await mount(<ButtonViewShowcase />);
const component = await mount(
<WrapperTest>
<ButtonViewShowcase />
</WrapperTest>,
);

await expect(component).toHaveScreenshot();
});
Expand Down

0 comments on commit 24d8e78

Please sign in to comment.