diff --git a/packages/extension/cypress/e2e/NFT.cy.ts b/packages/extension/cypress/e2e/NFT.cy.ts index e4d812ea1..a469277a6 100644 --- a/packages/extension/cypress/e2e/NFT.cy.ts +++ b/packages/extension/cypress/e2e/NFT.cy.ts @@ -331,6 +331,15 @@ describe('Mint', () => { sendMessage(message, cb) {} }; + (win as any).chrome.storage = { + local: { + get(key, cb) {}, + set(obj, cb) { + if (cb) cb(); + } + } + }; + cy.stub((win as any).chrome.runtime, 'sendMessage').resolves({}); } }); diff --git a/packages/extension/cypress/e2e/networks.cy.ts b/packages/extension/cypress/e2e/networks.cy.ts index 5912edf28..4b59e814e 100644 --- a/packages/extension/cypress/e2e/networks.cy.ts +++ b/packages/extension/cypress/e2e/networks.cy.ts @@ -29,6 +29,15 @@ describe('Switch networks', () => { sendMessage(message, cb) {} }; + (win as any).chrome.storage = { + local: { + get(key, cb) {}, + set(obj, cb) { + if (cb) cb(); + } + } + }; + cy.stub((win as any).chrome.runtime, 'sendMessage').resolves({}); } }); diff --git a/packages/extension/cypress/e2e/offers.cy.ts b/packages/extension/cypress/e2e/offers.cy.ts index f30da0387..6e28d3c65 100644 --- a/packages/extension/cypress/e2e/offers.cy.ts +++ b/packages/extension/cypress/e2e/offers.cy.ts @@ -235,6 +235,15 @@ describe('Offers', () => { sendMessage(message, cb) {} }; + (win as any).chrome.storage = { + local: { + get(key, cb) {}, + set(obj, cb) { + if (cb) cb(); + } + } + }; + cy.stub((win as any).chrome.runtime, 'sendMessage').resolves({}); } }); diff --git a/packages/extension/cypress/e2e/payments.cy.ts b/packages/extension/cypress/e2e/payments.cy.ts index 14253bd3e..481ecd97d 100644 --- a/packages/extension/cypress/e2e/payments.cy.ts +++ b/packages/extension/cypress/e2e/payments.cy.ts @@ -34,6 +34,15 @@ describe('Make payment - XRP', () => { sendMessage(message, cb) {} }; + (win as any).chrome.storage = { + local: { + get(key, cb) {}, + set(obj, cb) { + if (cb) cb(); + } + } + }; + cy.stub((win as any).chrome.runtime, 'sendMessage').resolves({}); } } @@ -127,6 +136,15 @@ describe('Make payment - ETH', () => { sendMessage(message, cb) {} }; + (win as any).chrome.storage = { + local: { + get(key, cb) {}, + set(obj, cb) { + if (cb) cb(); + } + } + }; + cy.stub((win as any).chrome.runtime, 'sendMessage').resolves({}); } } @@ -218,6 +236,15 @@ describe('Make payment - SOLO', () => { (win as any).chrome.runtime = { sendMessage(message, cb) {} }; + + (win as any).chrome.storage = { + local: { + get(key, cb) {}, + set(obj, cb) { + if (cb) cb(); + } + } + }; } } ); @@ -256,6 +283,15 @@ describe('Make payment - SOLO', () => { (win as any).chrome.runtime = { sendMessage(message, cb) {} }; + + (win as any).chrome.storage = { + local: { + get(key, cb) {}, + set(obj, cb) { + if (cb) cb(); + } + } + }; } } ); diff --git a/packages/extension/cypress/e2e/send_token.cy.ts b/packages/extension/cypress/e2e/send_token.cy.ts index 5f4403517..cf50b19f7 100644 --- a/packages/extension/cypress/e2e/send_token.cy.ts +++ b/packages/extension/cypress/e2e/send_token.cy.ts @@ -30,6 +30,15 @@ describe('Send Token', () => { sendMessage(message, cb) {} }; + (win as any).chrome.storage = { + local: { + get(key, cb) {}, + set(obj, cb) { + if (cb) cb(); + } + } + }; + cy.stub((win as any).chrome.runtime, 'sendMessage').resolves({}); } }); diff --git a/packages/extension/cypress/e2e/set_account.cy.ts b/packages/extension/cypress/e2e/set_account.cy.ts index 3420351d3..a00cd7f88 100644 --- a/packages/extension/cypress/e2e/set_account.cy.ts +++ b/packages/extension/cypress/e2e/set_account.cy.ts @@ -30,6 +30,15 @@ describe('Set Account', () => { sendMessage(message, cb) {} }; + (win as any).chrome.storage = { + local: { + get(key, cb) {}, + set(obj, cb) { + if (cb) cb(); + } + } + }; + cy.stub((win as any).chrome.runtime, 'sendMessage').resolves({}); } } diff --git a/packages/extension/cypress/e2e/submit_transaction.cy.ts b/packages/extension/cypress/e2e/submit_transaction.cy.ts index fa5a20197..3e37ab6b4 100644 --- a/packages/extension/cypress/e2e/submit_transaction.cy.ts +++ b/packages/extension/cypress/e2e/submit_transaction.cy.ts @@ -107,6 +107,15 @@ describe('Submit Transaction', () => { sendMessage(message, cb) {} }; + (win as any).chrome.storage = { + local: { + get(key, cb) {}, + set(obj, cb) { + if (cb) cb(); + } + } + }; + cy.stub((win as any).chrome.runtime, 'sendMessage').resolves({}); } }); diff --git a/packages/extension/cypress/e2e/trustlines.cy.ts b/packages/extension/cypress/e2e/trustlines.cy.ts index c914bcfff..6517503a7 100644 --- a/packages/extension/cypress/e2e/trustlines.cy.ts +++ b/packages/extension/cypress/e2e/trustlines.cy.ts @@ -238,6 +238,15 @@ const navigate = (url: string, password: string) => { sendMessage(message, cb) {} }; + (win as any).chrome.storage = { + local: { + get(key, cb) {}, + set(obj, cb) { + if (cb) cb(); + } + } + }; + cy.stub((win as any).chrome.runtime, 'sendMessage').resolves({}); } }); diff --git a/packages/extension/cypress/e2e/wallet_management.cy.ts b/packages/extension/cypress/e2e/wallet_management.cy.ts index b8bc11d62..7a85a94ad 100644 --- a/packages/extension/cypress/e2e/wallet_management.cy.ts +++ b/packages/extension/cypress/e2e/wallet_management.cy.ts @@ -16,6 +16,15 @@ describe('Setup the initial wallet (no previous wallet)', () => { sendMessage(message, cb) {} }; + (win as any).chrome.storage = { + local: { + get(key, cb) {}, + set(obj, cb) { + if (cb) cb(); + } + } + }; + cy.stub((win as any).chrome.runtime, 'sendMessage').resolves({}); } }); @@ -237,6 +246,15 @@ describe('Add an additional wallet (with previous wallet)', () => { sendMessage(message, cb) {} }; + (win as any).chrome.storage = { + local: { + get(key, cb) {}, + set(obj, cb) { + if (cb) cb(); + } + } + }; + cy.stub((win as any).chrome.runtime, 'sendMessage').resolves({}); } }); @@ -396,6 +414,15 @@ describe('Edit wallet', () => { sendMessage(message, cb) {} }; + (win as any).chrome.storage = { + local: { + get(key, cb) {}, + set(obj, cb) { + if (cb) cb(); + } + } + }; + cy.stub((win as any).chrome.runtime, 'sendMessage').resolves({}); } }); @@ -533,6 +560,15 @@ describe('Switch wallet', () => { sendMessage(message, cb) {} }; + (win as any).chrome.storage = { + local: { + get(key, cb) {}, + set(obj, cb) { + if (cb) cb(); + } + } + }; + cy.stub((win as any).chrome.runtime, 'sendMessage').resolves({}); } }); @@ -587,6 +623,15 @@ describe('Reset password', () => { sendMessage(message, cb) {} }; + (win as any).chrome.storage = { + local: { + get(key, cb) {}, + set(obj, cb) { + if (cb) cb(); + } + } + }; + cy.stub((win as any).chrome.runtime, 'sendMessage').resolves({}); } });