test(badge): refine badge tests - (FE-6443)#7759
Open
divyajindel wants to merge 1 commit intomasterfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed behaviour
Our unit testing and regression testing frameworks need to be optimised. Use GitHub Copilot in VS Code to analyse the
*.test.tsx,*.pw.tsx, and*.stories.tsxfiles to rapidly identify duplicate tests across the platforms, remove unnecessary code, flaky tests and speed up the carbon repo build time.Current behaviour
The Playwright test suite takes ~20 minutes to run. Some tests are flaky, requiring repeated reruns which adds additional time to the build. Historically, requirements around test coverage have resulted in tests being duplicated in the regression test suite that are already in unit test, resulting in a longer build time than is necessary. Accessibility tests exist for most components that would not detect an accessibility violation.
Checklist
d.tsfile added or updated if requiredQA
Additional context
Testing instructions
Aim to move individual keystroke and prop test cases into Jest where possible if not covered already, move styling tests, presentation type (icon positions, button types etc) tests, and user interactions into Chromatic snapshot tests, leave convoluted test scenarios and a11y tests in Playwright. Assess coverage and remove unnecessary tests that add no value, particularly among the accessibility test cases. More details are contained in the associated tickets in Jira, including suggested successful prompts and guidelines. After implementing the changes:
npm run test).