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

Add required props for TransactionListItemDetails tests #7834

Merged
merged 1 commit into from
Jan 16, 2020

Conversation

whymarrh
Copy link
Contributor

This PR adds required props to the TransactionListItemDetails 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"


  TransactionListItemDetails Component
Warning: Failed prop type: The prop `recipientAddress` is marked as required in `TransactionListItemDetails`, but its value is `undefined`.
    in TransactionListItemDetails
Warning: Failed prop type: The prop `senderAddress` is marked as required in `TransactionListItemDetails`, but its value is `undefined`.
    in TransactionListItemDetails
Warning: Failed prop type: The prop `tryReverseResolveAddress` is marked as required in `TransactionListItemDetails`, but its value is `undefined`.
    in TransactionListItemDetails
    ✓ should render properly
    ✓ should render a retry button
    ✓ should disable the Copy Tx ID and View In Etherscan buttons when tx hash is missing
    ✓ should render functional Copy Tx ID and View In Etherscan buttons when tx hash exists


  4 passing (344ms)

✨  Done in 18.68s.

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"


  TransactionListItemDetails Component
    ✓ should render properly (46ms)
    ✓ should render a retry button
    ✓ should disable the Copy Tx ID and View In Etherscan buttons when tx hash is missing
    ✓ should render functional Copy Tx ID and View In Etherscan buttons when tx hash exists


  4 passing (298ms)

✨  Done in 18.98s.

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 48c9b01 into MetaMask:develop Jan 16, 2020
@whymarrh whymarrh deleted the fix-props-tx-tests branch January 16, 2020 03:34
yqrashawn pushed a commit to yqrashawn/conflux-portal that referenced this pull request Jan 19, 2020
yqrashawn pushed a commit to Conflux-Chain/conflux-portal that referenced this pull request Jan 19, 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