You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We tried to upgrade to v7, and encountered errors in Cypress when running our tests:
The following error originated from your test code, not from Cypress.
module is not defined
at <unknown> (http://localhost:5173/__cypress/src/node_modules/.vite/deps/@storybook_react.js?v=a45a78f5:8127:1)
From previous event:
We use Cypress 12.9.0 and Storybook 7.0.3
To Reproduce
Here is a simple test having this issue:
import { mount } from 'cypress/react18';
import * as stories from '../../stories/MyComponent.stories';
import { composeStories } from '@storybook/react';
const { MyComponent } =
composeStories(stories);
describe('reservation MF', () => {
it('Should do sthg, () => {
mount(<MyComponent />);
});
});
@yann-combarnous Do you have a reproduction you can share? I've created what I think is a fix at #22085 but I don't have an easy way to test it. Thanks!
@yann-combarnous Do you have a reproduction you can share? I've created what I think is a fix at #22085 but I don't have an easy way to test it. Thanks!
Tried to create a repro with CodeSandbox, but it seems cypress cannot be run there, even in headless mode due to missing docker dep. Any sandbox environment you would know that supports it ?
Describe the bug
With Storybook v6, we were using the following guide to run Cypress component tests with Storybook: https://www.cypress.io/blog/2021/05/19/cypress-x-storybook-2-0/#header
We tried to upgrade to v7, and encountered errors in Cypress when running our tests:
We use Cypress 12.9.0 and Storybook 7.0.3
To Reproduce
Here is a simple test having this issue:
System
Additional context
This is the piece of code from Storybook where module is not defined:
The text was updated successfully, but these errors were encountered: