Skip to content

Commit

Permalink
Oh wow, it now works. I can't believe it. It will never break again
Browse files Browse the repository at this point in the history
  • Loading branch information
Duddino committed Nov 27, 2024
1 parent 8abd767 commit e1e66fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions cypress/e2e/private_mode.cy.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
describe('public/private mode tests', () => {
beforeEach(() => {
const before = () => {
cy.clearDb();
cy.playback('GET', /(xpub|address|getshielddata|duddino|block)/, {
matching: { ignores: ['hostname', 'port'] },
}).as('sync');
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'
);
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');
Expand Down

0 comments on commit e1e66fb

Please sign in to comment.