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

Updated/fixed contrast checker to respect recent changes on Notice component #5800

Merged
merged 1 commit into from
Mar 27, 2018

Conversation

jorgefilipecosta
Copy link
Member

Notices component changed and now instead of receiving a content prop renders the children. Contrast checker is now updated to take into account this recent change of the notices component.

The test cases of ContrastChecker did not fail because they tested that the notices are shown when needed using the notice component, but did not test if the notices component, in fact, rendered the message. The use of shallow was changed to mount in the tests, as I think mount in this case, gives a bigger assurance that messages are in fact rendered. It may create false fails, e.g: class changes in notices. But when doing this changes we should probably test ContrastChecker so this fails just increase the probability of the manual inspection happening so they are good in my option.

How Has This Been Tested?

Go to paragraph and/or button block, set the same color for background and test. Verify contrast checker messages are shown correctly.

Notices component changed and now instead of receiving a content prop renders the children. Contrast checker is now updated to take into account this recent change of the notices component.

The test cases of ContrastChecker did not fail because they tested that the notices are shown when needed using the notice component, but did not test if the notices component, in fact, rendered the message. The use of shallow was changed to mount in the tests, as I think mount in this case, gives a bigger assurance that messages are in fact rendered. It may create false fails, e.g: class changes in notices. But when doing this changes we should probably test ContrastChecker so this fails just increase the probability of the manual inspection happening so they are good in my option.
@jorgefilipecosta jorgefilipecosta added the [Type] Bug An existing feature does not function as intended label Mar 26, 2018
@jorgefilipecosta jorgefilipecosta self-assigned this Mar 26, 2018
@jorgefilipecosta jorgefilipecosta changed the title Fixed: contrast checker display. Fixed: contrast checker display. Updated to respect recent changes on Notice component. Mar 26, 2018
@jorgefilipecosta jorgefilipecosta changed the title Fixed: contrast checker display. Updated to respect recent changes on Notice component. Updated/fixed contrast to respect recent changes on Notice component Mar 26, 2018
@jorgefilipecosta jorgefilipecosta changed the title Updated/fixed contrast to respect recent changes on Notice component Updated/fixed contrast checker to respect recent changes on Notice component Mar 26, 2018
@jorgefilipecosta jorgefilipecosta requested a review from a team March 26, 2018 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants