-
Notifications
You must be signed in to change notification settings - Fork 190
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
Update to React 18.3.1, Storybook 8.2.9, and vitest 2.0.5 #2230
Conversation
956be60
to
6ff3dca
Compare
storybook tests are now working but still need to fix some type errors, React 18 changed how children are defined |
c8fd248
to
5fa8555
Compare
5fa8555
to
7a29b32
Compare
I have renamed my commit and pushed again, but in my machine, the tests aren't passing. It tries to delete the View YAML button from the snapshots... |
7a29b32
to
14cd60a
Compare
ae850fa
to
07132e4
Compare
07132e4
to
527abd8
Compare
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.
@sniok , I just noticed a couple of things that should be addressed, and a nit.
frontend/src/components/horizontalPodAutoscaler/HPAList.stories.tsx
Outdated
Show resolved
Hide resolved
0bd4146
to
859c294
Compare
frontend/src/components/common/NameValueTable/NameValueTable.stories.tsx
Outdated
Show resolved
Hide resolved
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.
Tests pass for me locally now.
Smaller separate commits/PRs would be good for some of these changes. Many of them could be brought in separate PRs before an update to react 18 is done. This would make the PR smaller so the github UI is happy and usable. It will also mean there are commit messages explaining some of the changes.
These things that are removed should be called out in the PR description:
- MuiStyles being removed means plugins that use old style muiv4 styles will be broken. What's the plan?
- The axe-core/react being removed in favor of e2e playwright testing issue: Integrate a11y checks as a part of e2e tests #2239
Can you please add a "Testing done" section to the PR description? I expect we will need to manually test the whole frontend.
252b4a2
to
eb83de6
Compare
eb83de6
to
4938dfe
Compare
4938dfe
to
6fe2478
Compare
@joaquimrocha can you please test this locally now? We understand the Notifications test was sometimes failing. We decided to remove the Notifications test because that code isn't being used at the moment anyway. I'm giving this a final test now. |
bdcb75e
to
1b437ee
Compare
Co-authored-by: Oleksandr Dubenko <oldubenko@microsoft.com> Signed-off-by: Joaquim Rocha <joaquim.rocha@microsoft.com>
This is a pretty big commit that upgrades storybook version and also changes the way we mock backend in stories. Previosly stories would override methods in particular resources Like Pod.useList = () => mockData. But this wasn't playing nicely with vite and wasn't reliable as we were modifying global values during runtime. Instead all of that mocking is happening in the mock service worker (msw). Which intersepts network requests and is a reliable way of mocking. In addition to that, the storybook.test.tsx also had some changes to run the stories in a way the documentation recommends. This also changed the output of the snapshots slightly, which required regeneration of all snapshots. Signed-off-by: Oleksandr Dubenko <oldubenko@microsoft.com>
1b437ee
to
2f91c6e
Compare
The test-plugins job hanging forever is not related to this PR, it's happening on other PRs too. |
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.
Thanks 🎉🎈
I tried to update the deps to work with react 18 and remove the mui/styles compatibility package.
Headlamp seems to work fine but the storybook tests are failing (snapshots not rendering anything in DocumentFragment).
fixes #1554
cc/ @sniok , @vyncent-t