Skip to content
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

Block Editor: Test ContrastChecker notices by string comparison #19169

Merged
merged 1 commit into from Dec 16, 2019

Conversation

aduth
Copy link
Member

This pull request seeks to update ContrastChecker component unit tests to use direct string comparison assertions in place of the existing snapshot tests. As noted at #14995 (comment), the use of snapshot tests here is too unreliable, given that the tinycolor2 dependency uses an internal global increment which can change unexpectedly, requiring updates to the snapshot tests.

Testing Instructions:

Tests should still pass:

npm run test-unit packages/block-editor/src/components/contrast-checker/test/index.js

@aduth aduth added [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Code Quality Issues or PRs that relate to code quality [Package] Block editor /packages/block-editor labels Dec 16, 2019
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice ⭐️

@aduth aduth merged commit 74269e6 into master Dec 16, 2019
@aduth aduth deleted the remove/contrast-checker-snapshots branch December 16, 2019 13:55
@youknowriad youknowriad added this to the Gutenberg 7.2 milestone Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block editor /packages/block-editor [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants