Type alias StoryFileCyExtension

StoryFileCyExtension: {
    cy?: VoidFn;
    cyIncludeStories?: boolean | string[];
    cyOnly?: boolean;
    cySkip?: boolean;
}

Extensions to the default export from storybook files

Type declaration

  • Optional cy?: VoidFn

    Add a function to execute within cypress. Can contain setup beforeEach etc

  • Optional cyIncludeStories?: boolean | string[]

    You could specify this as a way of not skipping, but completely ignoring some/all stories.

    If it is an array of strings, then it will simply replace the includeStories.

    If it is true, then it removes includeStories, which is useful for a special case when using an mdx file as source of documentation but writing components in CSF. You'll want to have have default export includeStories: [] but then will need to specify this (unless using an external test file) in order for composeStories to pick up the stories properly see DocsInMDX story

  • Optional cyOnly?: boolean

    Add cyOnly to default export to use describe.only for these story tests

  • Optional cySkip?: boolean

    Add cySkip to default export to use describe.skip for these story tests