[TEST] Unit tests for Login component #283
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Abstract
This together with #277 #279 #282 completes the test coverage for the Login component i.e. the screen where the user selects how to import/create its wallet.
This test coverage is very important: first of all we are sure that all the privatekeys/secrets and passwords are relayed correctly to the Dashboard (which still needs unit tests tho) and at the same time this protects us from all stupid bugs like the missing optional passphrase in import wallet that we had to fix some weeks ago.
The idea of this PR is simpe: we create the
Login
component, verify that its children components are created with the correct props, emit a random event from the children component (we can do this since all children components have already been unit tested) and finally verify that theLogin
relays the correct event with correct parameters.