diff --git a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-custom-Icon-size-dark-chromium-linux.png b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-custom-Icon-size-dark-chromium-linux.png new file mode 100644 index 0000000000..eb239ab292 Binary files /dev/null and b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-custom-Icon-size-dark-chromium-linux.png differ diff --git a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-custom-Icon-size-dark-webkit-linux.png b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-custom-Icon-size-dark-webkit-linux.png new file mode 100644 index 0000000000..d40f60298a Binary files /dev/null and b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-custom-Icon-size-dark-webkit-linux.png differ diff --git a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-custom-Icon-size-light-chromium-linux.png b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-custom-Icon-size-light-chromium-linux.png new file mode 100644 index 0000000000..753ece634b Binary files /dev/null and b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-custom-Icon-size-light-chromium-linux.png differ diff --git a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-custom-Icon-size-light-webkit-linux.png b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-custom-Icon-size-light-webkit-linux.png new file mode 100644 index 0000000000..17816deff0 Binary files /dev/null and b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-custom-Icon-size-light-webkit-linux.png differ diff --git a/src/components/Button/__tests__/Button.visual.test.tsx b/src/components/Button/__tests__/Button.visual.test.tsx index 7823448f6e..f0dc1ed4b0 100644 --- a/src/components/Button/__tests__/Button.visual.test.tsx +++ b/src/components/Button/__tests__/Button.visual.test.tsx @@ -2,7 +2,7 @@ import React from 'react'; import {test} from '~playwright/core'; -import {ButtonStories} from './helpersPlaywright'; +import {ButtonStories, CustomIconSizeButton} from './helpersPlaywright'; test.describe('Button', () => { test('render story: ', async ({mount, expectScreenshot}) => { @@ -70,4 +70,10 @@ test.describe('Button', () => { await expectScreenshot(); }); + + test('render custom Icon size', async ({mount, expectScreenshot}) => { + await mount(); + + await expectScreenshot(); + }); }); diff --git a/src/components/Button/__tests__/helpersPlaywright.ts b/src/components/Button/__tests__/helpersPlaywright.ts deleted file mode 100644 index 9b22942626..0000000000 --- a/src/components/Button/__tests__/helpersPlaywright.ts +++ /dev/null @@ -1,5 +0,0 @@ -import {composeStories} from '@storybook/react'; - -import * as DefaultButtonStories from '../__stories__/Button.stories'; - -export const ButtonStories = composeStories(DefaultButtonStories); diff --git a/src/components/Button/__tests__/helpersPlaywright.tsx b/src/components/Button/__tests__/helpersPlaywright.tsx new file mode 100644 index 0000000000..c22d3c6769 --- /dev/null +++ b/src/components/Button/__tests__/helpersPlaywright.tsx @@ -0,0 +1,41 @@ +import React from 'react'; + +import {ChevronDown, Globe} from '@gravity-ui/icons'; +import {composeStories} from '@storybook/react'; + +import {Button} from '..'; +import {Showcase} from '../../../demo/Showcase'; +import {Icon} from '../../Icon'; +import * as DefaultButtonStories from '../__stories__/Button.stories'; + +export const ButtonStories = composeStories(DefaultButtonStories); + +export const CustomIconSizeButton = () => ( + + + + + + + +);