diff --git a/commands/playwright-keplr.js b/commands/playwright-keplr.js index 2c2f42fcb..45b8e5e5f 100644 --- a/commands/playwright-keplr.js +++ b/commands/playwright-keplr.js @@ -340,7 +340,8 @@ module.exports = { if ( page .url() - .includes(`chrome-extension://${keplrExtensionData.id}/popup.html`) + .includes(`chrome-extension://${keplrExtensionData.id}/popup.html`) && + page !== keplrWindow ) { keplrNotificationWindow = page; retries = 0; diff --git a/tests/e2e/specs/keplr/keplr-spec.js b/tests/e2e/specs/keplr/keplr-spec.js index a2f9b1791..927c2d128 100644 --- a/tests/e2e/specs/keplr/keplr-spec.js +++ b/tests/e2e/specs/keplr/keplr-spec.js @@ -103,6 +103,16 @@ describe('Keplr', () => { expect(tokenValue).to.equal(331); }); }); + it(`should differntiate between keplrWindow and keplrNotificationWindow when they have the same URL`, () => { + cy.getTokenAmount('ATOM').then(tokenValue => { + expect(tokenValue).to.equal(0); + }); + + cy.contains('Make an Offer').click(); + cy.confirmTransaction().then(taskCompleted => { + expect(taskCompleted).to.be.true; + }); + }); it(`should disconnect the wallet from all the connected DAPPs`, () => { cy.disconnectWalletFromDapp().then(taskCompleted => { expect(taskCompleted).to.be.true;