Remove Danger warnings for changes in tests
What does this MR do and why?
This change removes data-testid
warnings when only tests have changed. It preserves warnings when production code has changed.
As our tests are the ones validating the test ids, a change that only impacts tests wouldn't change the outcome of other higher tests: e.g. a refactor in our unit tests don't require review or re-run of e2e tests.
Screenshots or screen recordings
For example, we don't want this warning to be triggered by changes in the tests themselves:
How to set up and validate locally
I added a mock commit with testid changes in both specs and production code and ran:
bundle exec rake danger_local
Only production code is shown.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Miguel Rincon