@ -44,7 +44,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByText } = renderWithLocalization (
const { getByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
await waitFor ( ( ) => getByText ( enLocale . secretRecoveryPhrase . message ) ) ;
await waitFor ( ( ) => getByText ( enLocale . secretRecoveryPhrase . message ) ) ;
@ -56,7 +59,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . keyboard ( 'test' ) ;
await userEvent . keyboard ( 'test' ) ;
@ -68,7 +74,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
for ( const index of new Array ( 11 ) . keys ( ) ) {
for ( const index of new Array ( 11 ) . keys ( ) ) {
@ -83,7 +92,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
for ( const index of new Array ( 11 ) . keys ( ) ) {
for ( const index of new Array ( 11 ) . keys ( ) ) {
@ -100,7 +112,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
for ( const index of new Array ( 10 ) . keys ( ) ) {
for ( const index of new Array ( 10 ) . keys ( ) ) {
@ -117,7 +132,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = invalidChecksum . split ( ' ' ) ;
const srpParts = invalidChecksum . split ( ' ' ) ;
@ -133,7 +151,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = invalidWordCorrectChecksum . split ( ' ' ) ;
const srpParts = invalidWordCorrectChecksum . split ( ' ' ) ;
@ -149,7 +170,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
@ -166,7 +190,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
@ -185,7 +212,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
@ -205,7 +235,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( 'test' ) ;
await userEvent . paste ( 'test' ) ;
@ -217,7 +250,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
for ( const index of new Array ( 11 ) . keys ( ) ) {
for ( const index of new Array ( 11 ) . keys ( ) ) {
@ -232,7 +268,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = invalidChecksum . split ( ' ' ) ;
const srpParts = invalidChecksum . split ( ' ' ) ;
@ -248,7 +287,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = invalidWordCorrectChecksum . split ( ' ' ) ;
const srpParts = invalidWordCorrectChecksum . split ( ' ' ) ;
@ -264,7 +306,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
@ -281,7 +326,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
@ -300,7 +348,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
@ -320,7 +371,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( 'test' ) ;
await userEvent . paste ( 'test' ) ;
@ -332,7 +386,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( tooManyWords ) ;
await userEvent . paste ( tooManyWords ) ;
@ -345,7 +402,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( invalidInput ) ;
await userEvent . paste ( invalidInput ) ;
@ -357,7 +417,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-1' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-1' ) . focus ( ) ;
await userEvent . paste ( invalidInput ) ;
await userEvent . paste ( invalidInput ) ;
@ -369,7 +432,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-1' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-1' ) . focus ( ) ;
await userEvent . paste ( correct ) ;
await userEvent . paste ( correct ) ;
@ -383,7 +449,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-1' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-1' ) . focus ( ) ;
await userEvent . paste ( correct ) ;
await userEvent . paste ( correct ) ;
@ -398,7 +467,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -414,7 +486,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -433,7 +508,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -452,7 +530,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -472,7 +553,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -487,7 +571,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -504,7 +591,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -523,7 +613,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -542,7 +635,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -560,7 +656,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( correct ) ;
await userEvent . paste ( correct ) ;
@ -572,7 +671,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( invalidChecksum ) ;
await userEvent . paste ( invalidChecksum ) ;
@ -586,7 +688,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( poorlyFormattedInput ) ;
await userEvent . paste ( poorlyFormattedInput ) ;
@ -598,7 +703,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-1' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-1' ) . focus ( ) ;
await userEvent . paste ( poorlyFormattedInput ) ;
await userEvent . paste ( poorlyFormattedInput ) ;
@ -614,7 +722,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByText , queryByText } = renderWithLocalization (
const { getByText , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
await waitFor ( ( ) => getByText ( enLocale . secretRecoveryPhrase . message ) ) ;
await waitFor ( ( ) => getByText ( enLocale . secretRecoveryPhrase . message ) ) ;
@ -631,7 +742,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = tooFewWords . split ( ' ' ) ;
const srpParts = tooFewWords . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -649,7 +763,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByRole , getByTestId , queryByText } = renderWithLocalization (
const { getByRole , getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
await userEvent . selectOptions ( getByRole ( 'combobox' ) , '15' ) ;
await userEvent . selectOptions ( getByRole ( 'combobox' ) , '15' ) ;
const srpParts = invalidWordCount . split ( ' ' ) ;
const srpParts = invalidWordCount . split ( ' ' ) ;
@ -668,7 +785,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = invalidChecksum . split ( ' ' ) ;
const srpParts = invalidChecksum . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -688,7 +808,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = invalidWordCorrectChecksum . split ( ' ' ) ;
const srpParts = invalidWordCorrectChecksum . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -708,7 +831,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -729,7 +855,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -753,7 +882,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -777,7 +909,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -802,7 +937,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = tooFewWords . split ( ' ' ) ;
const srpParts = tooFewWords . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -820,7 +958,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , getByRole , queryByText } = renderWithLocalization (
const { getByTestId , getByRole , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
await userEvent . selectOptions ( getByRole ( 'combobox' ) , '15' ) ;
await userEvent . selectOptions ( getByRole ( 'combobox' ) , '15' ) ;
const srpParts = invalidWordCount . split ( ' ' ) ;
const srpParts = invalidWordCount . split ( ' ' ) ;
@ -839,7 +980,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = invalidChecksum . split ( ' ' ) ;
const srpParts = invalidChecksum . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -859,7 +1003,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = invalidWordCorrectChecksum . split ( ' ' ) ;
const srpParts = invalidWordCorrectChecksum . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -879,7 +1026,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -900,7 +1050,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -924,7 +1077,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -948,7 +1104,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -971,7 +1130,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( tooFewWords ) ;
await userEvent . paste ( tooFewWords ) ;
@ -986,7 +1148,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( invalidWordCount ) ;
await userEvent . paste ( invalidWordCount ) ;
@ -1001,7 +1166,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( invalidChecksum ) ;
await userEvent . paste ( invalidChecksum ) ;
@ -1018,7 +1186,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( invalidWordCorrectChecksum ) ;
await userEvent . paste ( invalidWordCorrectChecksum ) ;
@ -1035,7 +1206,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( correct ) ;
await userEvent . paste ( correct ) ;
@ -1053,7 +1227,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( poorlyFormattedInput ) ;
await userEvent . paste ( poorlyFormattedInput ) ;
@ -1074,7 +1251,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
for ( const index of new Array ( 12 ) . keys ( ) ) {
for ( const index of new Array ( 12 ) . keys ( ) ) {
@ -1093,7 +1273,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryAllByRole } = renderWithLocalization (
const { getByTestId , queryAllByRole } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -1108,7 +1291,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryAllByRole } = renderWithLocalization (
const { getByTestId , queryAllByRole } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -1123,7 +1309,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryAllByRole } = renderWithLocalization (
const { getByTestId , queryAllByRole } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( correct ) ;
await userEvent . paste ( correct ) ;
@ -1137,7 +1326,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -1161,7 +1353,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -1187,7 +1382,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -1217,7 +1415,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -1247,7 +1448,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( correct ) ;
await userEvent . paste ( correct ) ;
@ -1277,7 +1481,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -1304,7 +1511,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -1333,7 +1543,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryAllByRole } = renderWithLocalization (
const { getByTestId , queryAllByRole } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
await userEvent . click ( getByTestId ( 'import-srp__srp-word-0-checkbox' ) ) ;
await userEvent . click ( getByTestId ( 'import-srp__srp-word-0-checkbox' ) ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
@ -1353,7 +1566,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryAllByRole } = renderWithLocalization (
const { getByTestId , queryAllByRole } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
await userEvent . click ( getByTestId ( 'import-srp__srp-word-0-checkbox' ) ) ;
await userEvent . click ( getByTestId ( 'import-srp__srp-word-0-checkbox' ) ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
@ -1373,7 +1589,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryAllByRole } = renderWithLocalization (
const { getByTestId , queryAllByRole } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
await userEvent . click ( getByTestId ( 'import-srp__srp-word-0-checkbox' ) ) ;
await userEvent . click ( getByTestId ( 'import-srp__srp-word-0-checkbox' ) ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
@ -1390,7 +1609,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryAllByRole } = renderWithLocalization (
const { getByTestId , queryAllByRole } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( correct ) ;
await userEvent . paste ( correct ) ;
@ -1410,7 +1632,10 @@ describe('srp-input', () => {
const writeTextSpy = jest . spyOn ( window . navigator . clipboard , 'writeText' ) ;
const writeTextSpy = jest . spyOn ( window . navigator . clipboard , 'writeText' ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -1426,7 +1651,10 @@ describe('srp-input', () => {
const writeTextSpy = jest . spyOn ( window . navigator . clipboard , 'writeText' ) ;
const writeTextSpy = jest . spyOn ( window . navigator . clipboard , 'writeText' ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
const srpParts = correct . split ( ' ' ) ;
const srpParts = correct . split ( ' ' ) ;
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
for ( const index of new Array ( srpParts . length ) . keys ( ) ) {
@ -1442,7 +1670,10 @@ describe('srp-input', () => {
const writeTextSpy = jest . spyOn ( window . navigator . clipboard , 'writeText' ) ;
const writeTextSpy = jest . spyOn ( window . navigator . clipboard , 'writeText' ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( tooManyWords ) ;
await userEvent . paste ( tooManyWords ) ;
@ -1455,7 +1686,10 @@ describe('srp-input', () => {
const writeTextSpy = jest . spyOn ( window . navigator . clipboard , 'writeText' ) ;
const writeTextSpy = jest . spyOn ( window . navigator . clipboard , 'writeText' ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( tooFewWords ) ;
await userEvent . paste ( tooFewWords ) ;
@ -1468,7 +1702,10 @@ describe('srp-input', () => {
const writeTextSpy = jest . spyOn ( window . navigator . clipboard , 'writeText' ) ;
const writeTextSpy = jest . spyOn ( window . navigator . clipboard , 'writeText' ) ;
const { getByTestId } = renderWithLocalization (
const { getByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( correct ) ;
await userEvent . paste ( correct ) ;
@ -1482,7 +1719,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { queryByTestId , queryByRole } = renderWithLocalization (
const { queryByTestId , queryByRole } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
expect (
expect (
@ -1502,7 +1742,12 @@ describe('srp-input', () => {
getByTestId ,
getByTestId ,
queryByTestId ,
queryByTestId ,
queryByRole ,
queryByRole ,
} = renderWithLocalization ( < SrpInput onChange = { onChange } / > ) ;
} = renderWithLocalization (
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( new Array ( 15 ) . fill ( 'test' ) . join ( ' ' ) ) ;
await userEvent . paste ( new Array ( 15 ) . fill ( 'test' ) . join ( ' ' ) ) ;
@ -1524,7 +1769,12 @@ describe('srp-input', () => {
getByTestId ,
getByTestId ,
queryByTestId ,
queryByTestId ,
queryByRole ,
queryByRole ,
} = renderWithLocalization ( < SrpInput onChange = { onChange } / > ) ;
} = renderWithLocalization (
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
await userEvent . selectOptions ( getByRole ( 'combobox' ) , '15' ) ;
await userEvent . selectOptions ( getByRole ( 'combobox' ) , '15' ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( correct ) ;
await userEvent . paste ( correct ) ;
@ -1546,7 +1796,12 @@ describe('srp-input', () => {
getByTestId ,
getByTestId ,
queryByTestId ,
queryByTestId ,
queryByRole ,
queryByRole ,
} = renderWithLocalization ( < SrpInput onChange = { onChange } / > ) ;
} = renderWithLocalization (
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( invalidWordCount ) ;
await userEvent . paste ( invalidWordCount ) ;
@ -1564,7 +1819,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByRole , queryByTestId , queryByRole } = renderWithLocalization (
const { getByRole , queryByTestId , queryByRole } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
await userEvent . selectOptions ( getByRole ( 'combobox' ) , '24' ) ;
await userEvent . selectOptions ( getByRole ( 'combobox' ) , '24' ) ;
@ -1582,7 +1840,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByRole , getByTestId , queryByTestId } = renderWithLocalization (
const { getByRole , getByTestId , queryByTestId } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( new Array ( 15 ) . fill ( 'test' ) . join ( ' ' ) ) ;
await userEvent . paste ( new Array ( 15 ) . fill ( 'test' ) . join ( ' ' ) ) ;
@ -1603,7 +1864,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( tooManyWords ) ;
await userEvent . paste ( tooManyWords ) ;
@ -1617,7 +1881,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , getByText , queryByText } = renderWithLocalization (
const { getByTestId , getByText , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( tooManyWords ) ;
await userEvent . paste ( tooManyWords ) ;
@ -1632,7 +1899,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( tooManyWords ) ;
await userEvent . paste ( tooManyWords ) ;
@ -1647,7 +1917,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( tooManyWords ) ;
await userEvent . paste ( tooManyWords ) ;
@ -1662,7 +1935,10 @@ describe('srp-input', () => {
const onChange = jest . fn ( ) ;
const onChange = jest . fn ( ) ;
const { getByTestId , queryByText } = renderWithLocalization (
const { getByTestId , queryByText } = renderWithLocalization (
< SrpInput onChange = { onChange } / > ,
< SrpInput
onChange = { onChange }
srpText = { enLocale . secretRecoveryPhrase . message }
/ > ,
) ;
) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
getByTestId ( 'import-srp__srp-word-0' ) . focus ( ) ;
await userEvent . paste ( tooManyWords ) ;
await userEvent . paste ( tooManyWords ) ;