Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: visual #996

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const config: StorybookConfig = {
'@storybook/preset-scss',
{name: '@storybook/addon-essentials', options: {backgrounds: false}},
'./theme-addon/register.tsx',
'storycap',
],
};

Expand Down
11 changes: 9 additions & 2 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import '../styles/fonts.scss';
// eslint-disable-next-line import/order
import '../styles/styles.scss';

import React from 'react';

import {MINIMAL_VIEWPORTS} from '@storybook/addon-viewport';
import type {Decorator, Preview} from '@storybook/react';
import {withScreenshot} from 'storycap';

import {Lang, MobileProvider, ThemeProvider, configure} from '../src';
import {DocsDecorator} from '../src/demo/DocsDecorator/DocsDecorator';
Expand All @@ -31,8 +31,12 @@ const withContextProvider: Decorator = (Story, context) => {
);
};

export const decorators = [
withScreenshot, // Registration the decorator is required
];

const preview: Preview = {
decorators: [WithMobile, WithLang, withContextProvider],
decorators: [WithMobile, WithLang, withContextProvider, withScreenshot],
parameters: {
docs: {
theme: themes.light,
Expand All @@ -52,6 +56,9 @@ const preview: Preview = {
method: 'alphabetical',
},
},
screenshot: {
waitAssets: true,
},
},
globalTypes: {
theme: {
Expand Down
Binary file added __screenshots__/Colors/Backgrounds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added __screenshots__/Colors/Effects.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added __screenshots__/Colors/Lines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added __screenshots__/Colors/Misc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added __screenshots__/Colors/Private.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added __screenshots__/Colors/Texts.png
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.
Binary file added __screenshots__/Components/Alert/Examples.png
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.
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.
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.
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.
Binary file added __screenshots__/Components/Basic/Link/Link.png
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added __screenshots__/Components/Button/Default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added __screenshots__/Components/Button/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added __screenshots__/Components/Button/Link.png
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added __screenshots__/Components/Button/Size.png
Binary file added __screenshots__/Components/Card/Default.png
Binary file added __screenshots__/Components/Card/Showcase.png
Binary file added __screenshots__/Components/Checkbox/Default.png
Binary file added __screenshots__/Components/Checkbox/Label.png
Binary file added __screenshots__/Components/Checkbox/Size.png
Binary file added __screenshots__/Components/Dialog/Default.png
Binary file added __screenshots__/Components/Dialog/Showcase.png
Binary file added __screenshots__/Components/Disclosure/Size.png
Binary file added __screenshots__/Components/Hotkey/Default.png
Binary file added __screenshots__/Components/Hotkey/Examples.png
Binary file added __screenshots__/Components/Icon/Default.png
Binary file added __screenshots__/Components/Label/Default.png
Binary file added __screenshots__/Components/Label/Icon.png
Binary file added __screenshots__/Components/Label/Showcase.png
Binary file added __screenshots__/Components/Label/Size.png
Binary file added __screenshots__/Components/Label/Theme.png
Binary file added __screenshots__/Components/Link/Default.png
Binary file added __screenshots__/Components/Link/Showcase.png
Binary file added __screenshots__/Components/List/Default.png
Binary file added __screenshots__/Components/List/Item/Active.png
Binary file added __screenshots__/Components/List/Showcase.png
Binary file added __screenshots__/Components/List/Sortable.png
Binary file added __screenshots__/Components/Loader/Default.png
Binary file added __screenshots__/Components/Loader/Size.png
Binary file added __screenshots__/Components/Menu/Default.png
Binary file added __screenshots__/Components/Menu/Group.png
Binary file added __screenshots__/Components/Menu/Item Active.png
Binary file added __screenshots__/Components/Menu/Item Icon.png
Binary file added __screenshots__/Components/Menu/Item Theme.png
Binary file added __screenshots__/Components/Modal/Default.png
Binary file added __screenshots__/Components/Persona/Closable.png
Binary file added __screenshots__/Components/Persona/Default.png
Binary file added __screenshots__/Components/Persona/Email.png
Binary file added __screenshots__/Components/Persona/Empty.png
Binary file added __screenshots__/Components/Persona/Image.png
Binary file added __screenshots__/Components/Popover/Size.png
Binary file added __screenshots__/Components/Popover/Theme.png
Binary file added __screenshots__/Components/Popup/Default.png
Binary file added __screenshots__/Components/Popup/Placement.png
Binary file added __screenshots__/Components/Portal/Default.png
Binary file added __screenshots__/Components/Progress/Default.png
Binary file added __screenshots__/Components/Progress/Size.png
Binary file added __screenshots__/Components/Progress/Stack.png
Binary file added __screenshots__/Components/Progress/Theme.png
Binary file added __screenshots__/Components/Radio/Default.png
Binary file added __screenshots__/Components/Radio/Showcase.png
Binary file added __screenshots__/Components/Select/Default.png
Binary file added __screenshots__/Components/Select/Showcase.png
Binary file added __screenshots__/Components/Sheet/Default.png
Binary file added __screenshots__/Components/Sheet/Showcase.png
Binary file added __screenshots__/Components/Sheet/With Menu.png
Binary file added __screenshots__/Components/Switch/Default.png
Binary file added __screenshots__/Components/Switch/Disabled.png
Binary file added __screenshots__/Components/Switch/Label.png
Binary file added __screenshots__/Components/Switch/Showcase.png
Binary file added __screenshots__/Components/Switch/Size.png
Binary file added __screenshots__/Components/Table/Adaptive.png
Binary file added __screenshots__/Components/Table/Default.png
Binary file added __screenshots__/Components/Tabs/Default.png
Binary file added __screenshots__/Components/Text/Default.png
Binary file added __screenshots__/Components/Text/Ellipsis.png
Binary file added __screenshots__/Components/Text/Word Break.png
Binary file added __screenshots__/Components/TextArea/Default.png
Binary file added __screenshots__/Components/Toaster/Default.png
Binary file added __screenshots__/Components/Tooltip/Default.png
Binary file added __screenshots__/Components/User/Default.png
Binary file added __screenshots__/Components/UserAvatar/Size.png
Binary file added __screenshots__/Hooks/useFileInput/Default.png
Binary file added __screenshots__/Layout/Col/All Mods.png
Binary file added __screenshots__/Layout/Col/Dynamic.png
Binary file added __screenshots__/Layout/Col/Static.png
Binary file added __screenshots__/Layout/Container/Default.png
Binary file added __screenshots__/Layout/Flex/Default.png
Binary file added __screenshots__/Layout/Flex/Flex Gap.png
Binary file added __screenshots__/Layout/Flex/Gap And Row Gap.png
Binary file added __screenshots__/Layout/Layout.png
Binary file added __screenshots__/Layout/Row/Default.png
Binary file added __screenshots__/Layout/Row/Zero Spacings.png
Binary file added __screenshots__/Typography/Fonts.png
Binary file added __screenshots__/Typography/Variants.png
Loading