Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(suite-desktop): add e2e test for passphrase numbering of unautho… #13107

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading