-
Notifications
You must be signed in to change notification settings - Fork 20
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(table): add screenshot tests using reusable test code #954
test(table): add screenshot tests using reusable test code #954
Conversation
Playwright test resultsDetails 668 tests across 145 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). |
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.
It looks to me that the test here does not generate the correct screenshot in secondary.
The component works as expected in Storybook. So we need to address this faulty screenshot.
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.
Other then the zebra-mode screenshot in darkmode, it looks good
Removing my approval until we know how to handle zebra-mode screenshots
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.
Each test suite has multiple renditions of the component in primary light mode, should we adress this? Apart from that this PR is incredibly complex to review since it covers close to, if not all, tests written for the Table component. Breaking out the tickets in Jira to only cover one aspect at the time, such as filtering, batch, multis election etc., was an attempt at bringing down the complexity level to make it easier to review. Having them all covered in one PR is very challenging and delays the review process quite a bit. For future reference it would be very appreciated if PRs could be kept sleek so we all can work efficiently together, even if the majority of the files changed are screenshots :)
f954cc9
to
7f707dc
Compare
Quality Gate passedIssues Measures |
* test: add testConfiguration file with reusable test code * test: change testConfiguration function parameter name * test: remove undefined test configuration from testConfiguration.ts * test: improve setupPage and getTestDescribeText * test(tooltip): add screenshot tests using reusable test code (#960) * test(tooltip): use reusable test code for lightmode and darkmode screenshot tests * test(tooltip): move non-screenshot tests to not run for all style configurations * test(toggle): add screenshot tests using reusable test code (#959) * test(toggle): add screenshot tests using reusable test code * test(toggle): move non-screenshot tests to not run for all style configurations * test(toggle): remove old screenshots * test(slider): add screenshot tests using reusable test code (#953) * test(toast): add screenshot tests using reusable test code (#958) * test(textarea): add screenshot tests using reusable test code (#957) * test(text-field): add screenshot tests using reusable test code (#956) * test(side-menu): add screenshot tests using reusable test code (#952) * test(radio-button): add screenshot tests using reusable test code (#951) * test(popover menu): add screenshot tests using reusable test code (#950) * test(popover-canvas): add screenshot tests using reusable test code (#949) * test(message): add screenshot tests using reusable test code (#948) * test(chip): add screenshot tests using reusable test code (#947) * test(link): add screenshot tests using reusable test code (#946) * test(header): add screenshot tests using reusable test code (#945) * test(footer): add screenshot tests using reusable test code (#944) * test(dropdown): improved and added more screenshot tests with reusable test code (#943) * test(datetime): update and improve lightmode and darkmode screenshot tests, with reusable test code (#942) * test(checkbox): more and improved screenshot tests using reusable test code (#941) * test(card): use reusable test code for lightmode and darkmode screenshot tests (#940) * test(button): new and improved screenshot tests with reusable test code (#938) * test(breadcrumbs): improved screenshot tests with reusable code (#937) * test(banner): improved and more screenshot tests with reusable code (#936) * test(accordion): more screenshot tests with reusable code (#935) * test(tabs): add screenshot tests using reusable test code (#955) * test(table): add screenshot tests using reusable test code (#954) * test: make testConfiguration.ts more general * test(stepper): add screenshot tests using reusable test code (#971) * test(modal): add screenshot tests using reusable test code (#970) * test(divider): add screenshot tests using reusable test code (#969) * test(block): add screenshot tests using reusable test code (#968) * test(spinner): add screenshot tests using reusable test code (#972) * test(dropdown): update screenshots
Describe pull-request
Adds screenshot tests for table in lightmode and darkmode, using the reusable test code.
Issue Linking:
Jira:
How to test
npm run test
Checklist before submission
npm run build-all
without errorsSuggested test steps
Screenshots
Not applicable
Additional context
There's a lot of files changed in this PR. However, they are all for the same component, and most of the changes are new images for lightmode and darkmode with primary and secondary mode variant. Let me know if it's too much and I'll make multiple PRs of it.
Also, for the following test files
they all have a test that checks the color of an element. This doesn't work when the mode or mode variant changes, because that also changes the color. So, I simply skip that check when we have a configuration. Let me know if this is also important to do for the different modes and mode variants.
Also, I noticed that in the zebra-mode tests, the zebra-mode coloring doesn't work for secondary mode variant with darkmode.