-
Notifications
You must be signed in to change notification settings - Fork 0
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
Proposal: Change the way our uikit tests are structures & snapshots are generated #1
Conversation
…on implementing tests
We already do this in |
e6caf40
to
3ff5c57
Compare
So we do! I'm not sure it's working? We'd see styles in our snapshots and non-hashed classnames if it was. I've spent too much time trying to debug it this morning, sunken cost fallacy kicking in - will just make an issue and leave it. |
Closing as per Slack discussion. Made an issue for the fact that |
…cakeswap#19) * chore(tab-menu): Rough component setup * chore(tab-menu): Testing user * style(styled-tab): V rough component layout and styles * style(styled-tab): Specific styles applied * style(styled-tab): Refinding styles and element types * fix(tab-menu): Tidy interfaces and props being passed to tab-bar * test(tab-menu): Added snapshot * style(tab-menu): Update comp names and add extra stories * chore(tab-menu): Remove unused commented code * test(tab-menu): Fix incorrect test import * style(tab-menu): Add width % handling below 576px * test(tab-menu): Update snaps * test(tab-menu): Remove test files from this PR - see #1 for proposal on implementing tests * style(tab-menu): Move away from % widths and towards flex-grow * style(tab-menu): Set 8px min padding to tab * style(tab-menu): Fix import order * style(tab-menu): Remove styled tabmenu comp and move into tabmenu * style(tab-menu): Change breakpoint for style change to 853px * test(tab-menu): Add tabmenu test file * test(tab-menu): Remove duplicate setupTests * fix(tab-menu): Del & regenerate yarn.lock
All just my opinion, keen to hear yours!
Problem
Proposed solution
.toMatchSnapshot()
instead oftoMatchInlineSnapshot()
jest-styled-components
to capture styles in snapshots (so that inadvertant style changes are caught), and remove hashes from classNamesNext steps
renderWithTheme
, rather than the specific test.