Skip to content

Commit

Permalink
test(suite-desktop): add e2e test for passphrase numbering of unautho…
Browse files Browse the repository at this point in the history
…rized device
  • Loading branch information
mroz22 committed Jul 2, 2024
1 parent 83132bf commit b446225
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions packages/suite-web/e2e/tests/suite/passphrase-numbering.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,21 @@ describe('Passphrase numbering', () => {
cy.task('applySettings', { passphrase_always_on_device: false });

cy.viewport(1440, 2560).resetDb();
cy.prefixedVisit('/');
cy.passThroughInitialRun();
});

it('hidden wallet numbering', () => {
const passphraseOne = 'taxation is theft{enter}';
const passphraseTwo = 'meow{enter}';
const passphraseThree = 'abc{enter}';

// first go to a page that does not trigger discovery
cy.prefixedVisit('/settings');
cy.passThroughInitialRun();
// device in the top left menu was not authorized yet, we don't know whether it is a standard wallet or a hidden one
cy.getTestElement('@deviceStatus-connected').should('not.contain', 'Hidden wallet #');

// continue with screens that require device authorization
cy.getTestElement('@suite/menu/suite-index').click();
cy.getTestElement('@passphrase-type/standard').click();
cy.getTestElement('@dashboard/loading', { timeout: 30000 });
cy.getTestElement('@dashboard/loading', { timeout: 30000 }).should('not.exist');
Expand Down Expand Up @@ -99,6 +105,9 @@ describe('Passphrase numbering', () => {
it('when user adds hidden wallet first (no pre-existing standard wallet)', () => {
const passphrase = 'abc{enter}';

cy.prefixedVisit('/');
cy.passThroughInitialRun();

cy.getTestElement('@passphrase-type/hidden').click();
cy.getTestElement('@passphrase/input').type(passphrase);
cy.getTestElement('@passphrase/hidden/submit-button').click();
Expand Down

0 comments on commit b446225

Please sign in to comment.