TWNTY-4602 - Increase coverage for coverage for twenty-front:storybook:modules (#4649)
* Increase coverage for coverage for `twenty-front:storybook:modules` Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Chiazokam <chiazokamecheta@gmail.com> * Increase code coverage threshold * Increase code coverage threshold * Increase code coverage threshold --------- Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Chiazokam <chiazokamecheta@gmail.com> Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
committed by
GitHub
parent
04c5d066f8
commit
e126c5c7f3
@ -0,0 +1,37 @@
|
||||
import { expect } from '@storybook/jest';
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import { within } from '@storybook/test';
|
||||
|
||||
import { ComponentWithRecoilScopeDecorator } from '~/testing/decorators/ComponentWithRecoilScopeDecorator';
|
||||
import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';
|
||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
|
||||
import { ObjectMetadataNavItems } from '../ObjectMetadataNavItems';
|
||||
|
||||
const meta: Meta<typeof ObjectMetadataNavItems> = {
|
||||
title: 'Modules/ObjectMetadata/ObjectMetadataNavItems',
|
||||
component: ObjectMetadataNavItems,
|
||||
decorators: [
|
||||
ObjectMetadataItemsDecorator,
|
||||
ComponentWithRouterDecorator,
|
||||
ComponentWithRecoilScopeDecorator,
|
||||
SnackBarDecorator,
|
||||
],
|
||||
parameters: {
|
||||
msw: graphqlMocks,
|
||||
},
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof ObjectMetadataNavItems>;
|
||||
|
||||
export const Default: Story = {
|
||||
play: async () => {
|
||||
const canvas = within(document.body);
|
||||
expect(await canvas.findByText('People')).toBeInTheDocument();
|
||||
expect(await canvas.findByText('Companies')).toBeInTheDocument();
|
||||
expect(await canvas.findByText('Opportunities')).toBeInTheDocument();
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user