-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Snapshot testing - Part 3] Shared lending platform #1087
Conversation
…variable (SBL_ENABLE_PLAYWRIGHT_SNAPSHOT_TESTING)
…variable (SBL_ENABLE_PLAYWRIGHT_SNAPSHOT_TESTING)
… .snapshot-ignore to the element) to simplify the process
…t__filing-details
…ed-lending-platform
…t__shared-lending-platform
dffce7c
to
9d45947
Compare
task: [Snapshots] Update docs to include snapshot testing scripts
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.
Looking great and thanks for remembering to add the documentation to the readme.
I did notice the flakiness you mentioned when it comes to the footer: just like you said the gray on black with the link dots cause the most issues.
My thought on it: could we have one assertion for the unauthenticated landing page that does the image diff on the full page and the footer, then mask the footer with a mask for the rest of the tests since the footer is static?
You could add a bool that's like isFlakyRegionIgnored
or just isFooterIgnored
to your takeSnapshot function that defaults to true. Then for your one test on the unauthenticated landing page that includes the full page and footer, you could set isFlakyRegionIgnored=false
. Then for the rest of the tests, isFlakyRegionIgnored
could default to true, and a mask could be applied to another class like .snapshot-ignore-flaky
or you could just pick out the footer class that already exists and mask that.
I think it would cut down a lot on the flakiness hopefully, since then we won't be testing the footer over and over. 🤞
I've got a draft to mask the Footer on most pages but will wait until we merge #1072 to cut down on merge conflicts. |
There is the option in playwright just to take a screenshot of an element, so you could just take a screenshot of the footer if you wanted to. I'm not sure though if that would make the test more/less flaky @meissadia, but might be worth testing? |
@billhimmelsbach To avoid blocking this PR as we head into the holidays, I've created a follow-up ticket to explore the Footer flakiness. |
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.
Great! Thanks for ticketing that.
Closes #1062
Closes #1090
Changes
This PR builds off of #1072, so includes all of those commits, but is separate to emphasize this PR's focus on adding snapshots to the
shared-lending-platform
tests. Once #1072 is reviewed and merged, this PR should be much easier to review.How to test this PR
yarn test:e2e:snapshot
shared-filing-platform
testsScreenshots