-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix alignment of warning icon when Input is of size m * Remove custom derivation path from redux because it should not be persistent. Add error message when derivation path is invalid * Prevent the currently typed passphrase from being deleted when changing enableCustomDerivationPath setting * Remove test because customDerivationPath is not in redux store anymore * Use the defaultDerivationPath when enableCustomDerivationPath is true * Remove test for login component which we will deprecate * remove unused * Add tests for CustomDerivationPath * Use getByLabelText from render instead of importing it, also change the test name to correspond to what is does * Add test to make sure that onAddAccount is called with both a passphrase and a derivationPath * Add test for when passphrase is correct but derivation path is incorrect. * Fix typo * Remove this second failsafe check since the button is already disabled this function cannot be called if isSubmitDisabled, add test for checking if button is disabled instead * Make sure disabled buttons dont have cursor pointer * remove unused css rule * add link to issue
- Loading branch information
1 parent
01f498f
commit 06f6084
Showing
14 changed files
with
190 additions
and
74 deletions.
There are no files selected for viewing
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
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
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
23 changes: 23 additions & 0 deletions
23
src/modules/auth/components/CustomDerivationPath/index.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,23 @@ | ||
import { render, fireEvent } from '@testing-library/react'; | ||
import React from 'react'; | ||
|
||
import CustomDerivationPath from './index'; | ||
|
||
describe('CustomDerivationPath', () => { | ||
const props = { | ||
onChange: jest.fn(), | ||
value: '', | ||
}; | ||
|
||
it('Should render without breaking', () => { | ||
render(<CustomDerivationPath {...props} />); | ||
}); | ||
|
||
it('Should call onChange when input changes', () => { | ||
const { getByLabelText } = render(<CustomDerivationPath {...props} />); | ||
const input = getByLabelText('Custom derivation path'); | ||
fireEvent.change(input, { target: { value: 'hello' } }); | ||
|
||
expect(props.onChange).toHaveBeenCalledWith('hello'); | ||
}); | ||
}); |
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
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
Oops, something went wrong.