Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for switching between keplr windows with same url #27

Merged
merged 2 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion commands/playwright-keplr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 10 additions & 0 deletions tests/e2e/specs/keplr/keplr-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading