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

Fix prop types for SendGasRow component tests #7833

Merged
merged 1 commit into from
Jan 15, 2020

Conversation

whymarrh
Copy link
Contributor

This PR adds required props to the SendGasRow component tests to reduce noise in the output.

Before:

$ yarn test:unit
yarn run v1.19.2
$ cross-env METAMASK_ENV=test mocha --exit --require test/setup.js --recursive "test/unit/**/*.js" "ui/app/**/*.test.js"


  SendGasRow Component
    render
Warning: Failed prop type: Invalid prop `gasFeeError` of type `string` supplied to `SendGasRow`, expected `boolean`.
    in SendGasRow
Warning: Failed prop type: Invalid prop `showError` of type `string` supplied to `SendRowWrapper`, expected `boolean`.
    in SendRowWrapper
      ✓ should render a SendRowWrapper component
      ✓ should pass the correct props to SendRowWrapper
      ✓ should render a GasFeeDisplay as a child of the SendRowWrapper
      ✓ should render the GasFeeDisplay
      ✓ should render the GasPriceButtonGroup if gasButtonGroupShown is true
      ✓ should render an advanced options button if gasButtonGroupShown is true


  6 passing (344ms)

✨  Done in 20.66s.

After:

$ yarn test:unit
yarn run v1.19.2
$ cross-env METAMASK_ENV=test mocha --exit --require test/setup.js --recursive "test/unit/**/*.js" "ui/app/**/*.test.js"


  SendGasRow Component
    render
      ✓ should render a SendRowWrapper component
      ✓ should pass the correct props to SendRowWrapper
      ✓ should render a GasFeeDisplay as a child of the SendRowWrapper
      ✓ should render the GasFeeDisplay
      ✓ should render the GasPriceButtonGroup if gasButtonGroupShown is true
      ✓ should render an advanced options button if gasButtonGroupShown is true


  6 passing (342ms)

✨  Done in 19.00s.

@whymarrh whymarrh changed the title Fix prop types fro SendGasRow component tests Fix prop types for SendGasRow component tests Jan 15, 2020
@whymarrh whymarrh force-pushed the fix-props-sgr-tests branch from 2ea34da to db5c714 Compare January 15, 2020 20:44
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@whymarrh whymarrh merged commit 948a2ce into MetaMask:develop Jan 15, 2020
@whymarrh whymarrh deleted the fix-props-sgr-tests branch January 15, 2020 21:14
yqrashawn pushed a commit to yqrashawn/conflux-portal that referenced this pull request Jan 16, 2020
yqrashawn pushed a commit to Conflux-Chain/conflux-portal that referenced this pull request Jan 16, 2020
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.

2 participants