import { setProjectAnnotations } from '@storybook/react'; import { configure } from '@testing-library/cypress'; import { mount } from 'cypress/react'; import * as sbPreview from '../../.storybook/preview'; import './commands'; // Augment the Cypress namespace to include type definitions for // your custom command. // Alternatively, can be defined in cypress/support/component.d.ts // with a at the top of your spec. /* eslint-disable @typescript-eslint/no-namespace */ declare global { namespace Cypress { interface Chainable { mount: typeof mount; } } } /* eslint-enable @typescript-eslint/no-namespace */ Cypress.Commands.add('mount', mount); configure({ testIdAttribute: 'data-test' }); setProjectAnnotations(sbPreview);