-
Notifications
You must be signed in to change notification settings - Fork 63
Update Playwright tests utilities to work both when the new_header
flag is enabled and when it's disabled
#1914
Conversation
Storybook and Tailwind configuration previews: Ready Storybook: https://wordpress.github.io/openverse-frontend/_preview/1914 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. |
Size Change: -3.3 kB (0%) Total Size: 820 kB
ℹ️ View Unchanged
|
0719234
to
bd8da8b
Compare
new_header
flag is enabled and when it's disabled
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.
The VContentSettingsButton
aria improvements look great as well. LGTM.
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.
I'm not always a huge fan of "old" and "new" as indicators for things like this. Whatever is "new" today eventually becomes old. I guess at that point we'd come back and refactor all of these to remove the "old" tests... but to someone reading this who isn't clued into the header work, these mode names are cryptic. Are there clearer names than new and old for the mode? Maybe even "new_header" or "old_header"?
Also, one nit, if we could extract the 'old' | 'new'
type out it would help with the eventual "delete the old mode" refactor... if you removed the shared type then TypeScript would tell you precisely everywhere that needed to be changed to accommodate the refactor 🙂
Also, one nit, if we could extract the 'old' | 'new' type out it would help with the eventual "delete the old mode" refactor... if you removed the shared type then TypeScript would tell you precisely everywhere that needed to be changed to accommodate the refactor 🙂 Great suggestions, thank you, @sarayourfriend! I've added the new type, and made |
Rename the tests that use utils functions adding `-old` Update test/playwright/utils/navigation.ts Create a `HeaderMode` type, and set values to 'new_header'/'old_header'
16c3db0
to
b73ace1
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.
LGTM! The -old
filenames would be nice to be -with-old-header
instead, but just a nit pick and don't want to hold up the PR any more. Sorry I didn't think of it before.
Nice work getting this stuff consolidated 🚀
…flag is enabled and when it's disabled (#1914) Add e2e test utils for new_header Rename the tests that use utils functions adding `-old` Update test/playwright/utils/navigation.ts Create a `HeaderMode` type, and set values to 'new_header'/'old_header'
Fixes
Related to #1843 by @dhruvkb
Description
This PR prepares the background for the tests with
new_header
enabled:utils
methods to add themode
parameter. By default, it is set tonew
, and all the functions work with thenew_header
. The previous functions are used whenmode
parameter is set toold
.utils
methods to add-old
suffix to them. The new tests without the suffix will be added in a follow-up PR.md
breakpoint, and now they start atlg
.VContentSettingsButton
to add a number of filters applied.Testing Instructions
The tests in CI should pass.
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin