From 72bedd2fa572be7d9a1ddba9c0fc942679c5a8ef Mon Sep 17 00:00:00 2001 From: rabi-siddique Date: Mon, 4 Mar 2024 09:24:06 +0500 Subject: [PATCH] chore: adding a test case for validating the switchToExtensionWindow function --- tests/e2e/specs/keplr/playwright-spec.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/e2e/specs/keplr/playwright-spec.js b/tests/e2e/specs/keplr/playwright-spec.js index 46bad8fdf..6d0bc67b4 100644 --- a/tests/e2e/specs/keplr/playwright-spec.js +++ b/tests/e2e/specs/keplr/playwright-spec.js @@ -28,5 +28,14 @@ describe('Playwright', () => { expect(isActive).to.be.false; }); }); + it(`switchToExtensionWindow should properly switch active tab to keplr window`, () => { + cy.switchToExtensionWindow(); + cy.isExtensionWindowActive().then(isActive => { + expect(isActive).to.be.true; + }); + cy.isCypressWindowActive().then(isActive => { + expect(isActive).to.be.false; + }); + }); }); }); \ No newline at end of file