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
Having this same issue while using the plugin with StoryBook 6.5: #190 (comment)
Using cypress open to open a test risks an infinite loop.
Running a test against any story file with 3 or more stories tends to get stuck in an infinite loop.
This doesn't happen when I run cypress run --component.
/** * this generates a snapshot for each story exported in [ComponentName].stories.tsx */exportconsttestComponents=(componentName: string,stories: Record<string,Story|Meta>,viewport?: {width: number;height: number})=>{describe(`${componentName} components`,()=>{beforeEach(()=>{if(viewport){cy.viewport(viewport.width,viewport.height);}cy.on('uncaught:exception',(err)=>{console.error('Uncaught exception:',err.message);returnfalse;});});conststoryEntries=Object.entries(stories).filter(([key])=>key!=='default');storyEntries.forEach(([storyName,Story])=>{constviewportName=viewport ? `-${viewport.width}x${viewport.height}` : '';consttitle=`${componentName}-${storyName}${viewportName}`;it(`renders ${storyName}${viewportName}`,()=>{// @ts-expect-error: Ignore type checking for Story componentcy.mount(React.createElement(Story,Story.args));cy.matchImage({ title });});});});};
Describe the Bug
Having this same issue while using the plugin with StoryBook 6.5: #190 (comment)
Using
cypress open
to open a test risks an infinite loop.Running a test against any story file with 3 or more stories tends to get stuck in an infinite loop.
This doesn't happen when I run
cypress run --component
.Tabs.stories.tsx
![image](https://private-user-images.githubusercontent.com/95831188/376095533-f5d36db1-060f-4be8-8592-5a6c1ebf749c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNzEzODQsIm5iZiI6MTczOTE3MTA4NCwicGF0aCI6Ii85NTgzMTE4OC8zNzYwOTU1MzMtZjVkMzZkYjEtMDYwZi00YmU4LTg1OTItNWE2YzFlYmY3NDljLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDA3MDQ0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY2Y2I5ZWY0ZTZiYjg1MDQ5OTJiN2MxNjZhYTM0N2Q2NjYyOWQ5N2MwZjkwOGYwZGRmYjViY2RhMzQwOWU1MDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.K6vlpMDxPlijKOIvJ5Bua4IM6GC4aV1HJLoeBVmEt5I)
Steps to reproduce
Run
cypress open
, select test.Expected behavior
Test should run successfully without going into an infinite loop.
Additional context
"cypress": "^13.15.0",
"@cypress/react": "^8.0.2",
"@frsource/cypress-plugin-visual-regression-diff": "^3.3.10",
"react": "^17.0.2",
Package version
3.3.10
Device
MBP
OS and version
Mac OS 15.0.1
Browser and version
Version 129.0.6668.91 (Official Build) (x86_64)
Node version
20.x
I can work on it by myself
Code of Conduct
The text was updated successfully, but these errors were encountered: