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
When Playwright test function is wrapped with createTest, which is advised here, and a function is passed as a prop to a component, the test fails:
importAllStoriesfrom'./button.stories.portable';import{test}from'@playwright/experimental-ct-react';import{createTest}from'@storybook/react/experimental-playwright';constsbTest=createTest(test);sbTest.describe('Button',()=>{sbTest('Primary',async({ mount })=>{awaitmount(<AllStories.PrimaryonClick={()=>{}}/>);});});
If I do this way, everything works fine
importAllStoriesfrom'./button.stories.portable';import{test,}from'@playwright/experimental-ct-react';test.describe('Button',()=>{test('Primary',async({ mount })=>{awaitmount(<AllStories.PrimaryonClick={()=>{}}/>);});});
Describe the bug
When Playwright
test
function is wrapped withcreateTest
, which is advised here, and a function is passed as a prop to a component, the test fails:If I do this way, everything works fine
Reproduction link
https://github.com/alxkor-com/sb-problem
Reproduction steps
yarn
yarn test-ct
System
Additional context
No response
The text was updated successfully, but these errors were encountered: