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

Quick: Avoid DataFilesSystemSelector test error #262

Merged
merged 3 commits into from
Dec 11, 2020

Conversation

wesleyboar
Copy link
Member

Overview:

Avoid console error from DataFilesSystemSelector on npm run test.

Warning: value prop on select should not be null. Consider using an empty string to clear the component or undefined for uncontrolled components.

PR Status:

  • Ready.

Related Jira tickets:

  • N/A

Summary of Changes:

  • Fix (?): Default to empty string if value is null.*

* Setting to undefined also removes the error—considered because "empty string is a valid option value" so maybe it should not be a fallback—but I blindly opted to do what the error message said.

Testing Steps:

  1. Run npm run test.
  2. No console error.

UI Photos:

N/A

Notes:

The reference I found on the issue was an issue complaining about the messaging and a PR to improve the error messaging which still can sometimes mention empty string as the solution.

Test passes, but console error occurs.

> Warning: `value` prop on `select` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.
@codecov
Copy link

codecov bot commented Nov 20, 2020

Codecov Report

Merging #262 (6f77ee5) into master (73a8c4b) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #262   +/-   ##
=======================================
  Coverage   60.10%   60.10%           
=======================================
  Files         315      315           
  Lines        9707     9707           
  Branches     1517     1517           
=======================================
  Hits         5834     5834           
  Misses       3609     3609           
  Partials      264      264           
Flag Coverage Δ
javascript 60.82% <ø> (ø)
unittests 59.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...DataFilesSystemSelector/DataFilesSystemSelector.js 75.00% <ø> (ø)

Copy link
Collaborator

@jarosenb jarosenb left a comment

Choose a reason for hiding this comment

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

LGTM!

@wesleyboar wesleyboar mentioned this pull request Dec 10, 2020
3 tasks
@rstijerina rstijerina merged commit 213d5f3 into master Dec 11, 2020
@rstijerina rstijerina deleted the quick/prevent-console-error-in-data-files-test branch December 11, 2020 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants