Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Planning v4 #584

Closed
3 of 4 tasks
Quramy opened this issue Mar 26, 2022 · 5 comments · Fixed by #640
Closed
3 of 4 tasks

Planning v4 #584

Quramy opened this issue Mar 26, 2022 · 5 comments · Fixed by #640

Comments

@Quramy
Copy link
Member

Quramy commented Mar 26, 2022

New features

  • Support to Storybook play function
  • Dual export

Breaking changes

  • Drop to support SB v4
  • Drop to support Node.js<=v12

Others

  • Mark focus/hover/click props as deprecated
@Quramy Quramy pinned this issue Mar 26, 2022
@Quramy Quramy changed the title 4.0.0 Planning v4 Mar 26, 2022
@sag1v
Copy link

sag1v commented Mar 29, 2022

What are the alternatives for focus/hover/click?

@Quramy
Copy link
Member Author

Quramy commented Mar 29, 2022

You can use storybook/testing-library in play function instead of Storycap’s click or focus fields.

@sag1v
Copy link

sag1v commented Mar 29, 2022

There are a lot of issues with the current implementation of hover/click/focus/waitFor inconsistent behavior, every test run yields different results when hover/focus are involved. I tried to solve this but the bugs keeps on popping out
I think there's a major bug with the async way we're capturing the screenshots, can't find exactly what it is yet nor reproduce it outside our private repo. I hope that this alternative won't get any worse.

@sag1v
Copy link

sag1v commented Mar 30, 2022

@Quramy how do you suggest handling trusted events with react-testing-library? AFAIK it doesn't support them like puppeteer does.

I mean, if i have a button with a style selector of :hover, calling userEvent.hover() from react-testing-library will only trigger the mouseover event but it won't get labeled as trusted hence we won't see the relevant style that was set in our :hover selector.

This is kind of useless for visual tests isn't it?

I'm not sure moving away from puppeteer (for hover/focus) is worthwhile.

@kodai3
Copy link

kodai3 commented Dec 23, 2022

Hi, Thank you for your work.

I know Storybook play function is kind of supported by MetricsWatcher.
But I still have some flaky snapshot with async play function, is there any other way but to delay for now?

@Quramy Quramy mentioned this issue Feb 2, 2023
@Quramy Quramy unpinned this issue Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants