-
Notifications
You must be signed in to change notification settings - Fork 19
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
test(banner): add darkmode screenshot test and refactor folder structure #880
Conversation
Playwright test resultsDetails 396 tests across 135 suites Skipped testssrc/components/table/table/test/expandable-row-autocollapse/expandable-row-autocollapse.e2e.ts › tds-table-expandable-row-autoCollapse › NEEDS FIXING: expanding one row collapses the others when autoCollapse is true |
This pull request is automatically being deployed by Amplify Hosting (learn more). |
2ff5d66
to
6351497
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.
Neat implementation! From what I can see you have created a new folder for these test results. Sticking to the current folder structure, with 'basic', 'default', 'information' and 'error' and having the corresponding tests in their respective folders might make it easier to maintain. Looking at the already existing screenshots it looks like they have an icon in the Banner as well, which is a visual element that would need to be tested in dark and light mode as well. Maybe there is a way to build on top of what is already there? :)
@nathalielindqvist I now created a commit aee1078 where I created a file screenshotTests.ts, that I now call from the existing test files for banner. This uses the index.html files for the existing tests, so the icons in those will be present in these screenshots too. Perhaps we could reuse the screenshotTests function (although it would need to be modified slightly to take more parameters for background color and such) in other components' tests (similar tickets in Jira). What do you think about this? |
Update: I removed the reusable test and created lightmode and darkmode folders in banner tests |
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 work! 🌟
One final change: @Lunkan89 and I agreed that it's unnecessary to change html files (and the images) of the existing tests if they are e.g. lightmode with white background, so I restored the html files to how they were before |
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.
Good thinking, looks nice! 🙂
@nathalielindqvist @Lunkan89 |
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.
Looks good
e16d2a1
to
d286348
Compare
Quality Gate passedIssues Measures |
Describe pull-request
Adds screenshot tests for banner in light and dark modes, as well as with different background colors and banner variants.
Issue Linking:
How to test
Provide detailed steps for testing, including any necessary setup.
npm run test
Checklist before submission
npm run build-all
without errorsSuggested test steps
Screenshots
Not applicable
Additional context
None