Skip to content

Commit

Permalink
chore: addressing PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rabi-siddique committed Mar 4, 2024
1 parent 7c42815 commit 9d8db98
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
8 changes: 2 additions & 6 deletions commands/keplr.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ let extensionId;
let extensionVersion;
let registrationUrl;
let permissionsUrl;
let switchBackToCypressWindow;

const keplr = {
async resetState() {
Expand Down Expand Up @@ -71,12 +72,7 @@ const keplr = {
return true;
},
async importWallet(secretWordsOrPrivateKey, password, newAccount) {
const keplrWindow = playwright.keplrWindow();
const currentUrl = await keplrWindow.url();
if (!currentUrl.includes('registr')) {
await module.exports.goToRegistration();
}

await module.exports.goToRegistration();
await playwright.waitAndClickByText(
newAccount
? onboardingElements.createWalletButton
Expand Down
1 change: 1 addition & 0 deletions commands/metamask.js
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ const metamask = {
return true;
},
async disconnectWalletFromDapp() {
await playwright.switchToKeplrWindow();
await switchToMetamaskIfNotActive();
await playwright.waitAndClick(mainPageElements.optionsMenu.button);
await playwright.waitAndClick(
Expand Down
6 changes: 2 additions & 4 deletions tests/e2e/specs/keplr/keplr-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ describe('Keplr', () => {
});
});
it(`should disconnect the wallet from all the connected DAPPs`, () => {
cy.switchToExtensionWindow().then(() => {
cy.disconnectWalletFromDapp().then(taskCompleted => {
expect(taskCompleted).to.be.true;
});
cy.disconnectWalletFromDapp().then(taskCompleted => {
expect(taskCompleted).to.be.true;
});
});
});
Expand Down

0 comments on commit 9d8db98

Please sign in to comment.