Repository navigation
test: use playwright browser locators in Button and TreeView tests #8527
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
Changes from all commits
e8d2a7b
480561a
442c963
e6f72aa
79f3d38
aa67d0f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,10 +27,6 @@ afterEach(() => { | |
| cleanup() | ||
| }) | ||
|
|
||
| // @ts-expect-error this is needed for act() from React | ||
| // @see https://react.dev/reference/react/act#error-the-current-testing-environment-is-not-configured-to-support-act | ||
| globalThis.IS_REACT_ACT_ENVIRONMENT = true | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing this override lets Button and TreeView tests await browser interactions directly. The eight test suites unrelated to those (DataTableGrouping, UnderlinePanels, etc) still perform manual timer, hydration, or observer updates. RTL’s |
||
|
|
||
| // eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope | ||
| document.documentElement.setAttribute('data-color-mode', 'auto') | ||
| // eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it'd be worth rolling this into a testing skill similar to what we do for style-guide or not really?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'm happy to try it out in a follow up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joshblack curious what you think 👀 #8572