From e1e66fbf628c7316cbe4443924fe53acc0c94c07 Mon Sep 17 00:00:00 2001 From: Duddino Date: Wed, 27 Nov 2024 23:41:46 +0100 Subject: [PATCH] Oh wow, it now works. I can't believe it. It will never break again --- cypress/e2e/private_mode.cy.js | 9 +++++---- cypress/fixtures/e2e | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cypress/e2e/private_mode.cy.js b/cypress/e2e/private_mode.cy.js index 4c51e2202..1c8e884ac 100644 --- a/cypress/e2e/private_mode.cy.js +++ b/cypress/e2e/private_mode.cy.js @@ -1,5 +1,5 @@ describe('public/private mode tests', () => { - beforeEach(() => { + const before = () => { cy.clearDb(); cy.playback('GET', /(xpub|address|getshielddata|duddino|block)/, { matching: { ignores: ['hostname', 'port'] }, @@ -7,8 +7,6 @@ describe('public/private mode tests', () => { cy.visit('/'); cy.waitForLoading().should('be.visible'); - cy.setExplorer(0); - cy.setNode(0); cy.goToTab('dashboard'); cy.importWallet( 'hawk crash art bottom rookie surprise grit giant fitness entire course spray' @@ -16,19 +14,22 @@ describe('public/private mode tests', () => { cy.encryptWallet('123456'); cy.waitForSync(); cy.togglePrivateMode(); - }); + }; it('switches back to public mode when not available', () => { + before(); // We should be in private mode here cy.get('[data-testid="shieldModePrefix"]').should('exist'); cy.deleteWallet(); // When importing a non shield capable wallet, we should be in public mode cy.importWallet('DLabsktzGMnsK5K9uRTMCF6NoYNY6ET4Bb'); cy.waitForSync(); + cy.wait('@sync'); cy.get('[data-testid="shieldModePrefix"]').should('not.exist'); }); it('remembers private mode', () => { + before(); cy.visit('/'); cy.waitForSync(); cy.get('[data-testid="shieldModePrefix"]').should('exist'); diff --git a/cypress/fixtures/e2e b/cypress/fixtures/e2e index 41ca3427d..889f01aa1 160000 --- a/cypress/fixtures/e2e +++ b/cypress/fixtures/e2e @@ -1 +1 @@ -Subproject commit 41ca3427de738100c6c0ad11860e3467d92548c2 +Subproject commit 889f01aa12381e4e29a5c86cd5975c374518a017