Skip to content

Block Editor: Test ContrastChecker notices by string comparison#19169

Merged
aduth merged 1 commit intomasterfrom
remove/contrast-checker-snapshots
Dec 16, 2019
Merged

Block Editor: Test ContrastChecker notices by string comparison#19169
aduth merged 1 commit intomasterfrom
remove/contrast-checker-snapshots

Conversation

@aduth
Copy link
Copy Markdown
Member

@aduth aduth commented Dec 16, 2019

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
Copy Markdown
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.

2 participants