@ -1,4 +1,3 @@
|
||||
import { expect } from '@storybook/jest';
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import { within } from '@storybook/test';
|
||||
|
||||
@ -7,7 +6,6 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
@ -31,17 +29,15 @@ export type Story = StoryObj<typeof RecordIndexPage>;
|
||||
export const Default: Story = {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
decorators: [PageDecorator],
|
||||
play: async ({ canvasElement }) => {
|
||||
const canvas = within(canvasElement);
|
||||
|
||||
await canvas.findByText('Search');
|
||||
await canvas.findByText('Settings');
|
||||
await canvas.findByText('Tasks');
|
||||
|
||||
expect(canvas.queryByText('People')).toBeNull();
|
||||
expect(canvas.queryByText('Opportunities')).toBeNull();
|
||||
expect(canvas.queryByText('Listings')).toBeNull();
|
||||
expect(canvas.queryByText('My Customs')).toBeNull();
|
||||
await canvas.findByText('People');
|
||||
await canvas.findByText('Opportunities');
|
||||
await canvas.findByText('My Customs');
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user