-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(register): passphrase removal (#235)
* feat(register): remove passphrase from post-register screen * chore(register): fix AccountDatum component name * chore(register): added AccountDetails component tests
- Loading branch information
Showing
3 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
__tests__/register/components/AccountDetails/AccountDetails.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import AccountDetails from 'register/components/AccountDetails/AccountDetails'; | ||
|
||
describe('<AccountDetails />', () => { | ||
const account = { | ||
address: 'my-address', | ||
key: 'my-key', | ||
encryptedKey: 'my-encrypted-key', | ||
passphrase: 'my-passphrase' | ||
}; | ||
let wrapper; | ||
|
||
const findDatum = (label) => { | ||
return wrapper.find('AccountDatum').findWhere((node) => node.prop('label') === label); | ||
}; | ||
|
||
beforeEach(() => { | ||
wrapper = shallow(<AccountDetails account={account} />); | ||
}); | ||
|
||
it('renders address', () => { | ||
expect(findDatum('Address').prop('value')).toEqual(account.address); | ||
}); | ||
|
||
it('renders private key', () => { | ||
expect(findDatum('Private Key').prop('value')).toEqual(account.key); | ||
}); | ||
|
||
it('renders encrypted key', () => { | ||
expect(findDatum('Encrypted Key').prop('value')).toEqual(account.encryptedKey); | ||
}); | ||
|
||
it('does not render passphrase', () => { | ||
expect(findDatum('Passphrase')).toHaveLength(0); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters