Skip to content

Commit

Permalink
fix: make sure on home page before starting disconnectWallet
Browse files Browse the repository at this point in the history
fix: make sure to be on Wallet page before disconnecting

Otherwise going to settings screen and/or Disconnect times out
  • Loading branch information
sidvishnoi committed Jan 9, 2025
1 parent f160515 commit 67496ca
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/e2e/pages/popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,15 @@ export async function openPopup(

export async function disconnectWallet(popup: Popup) {
await popup.reload();
await popup.locator(`[href="/settings"]`).click();
await popup.locator('button').getByText('Disconnect').click();
await popup.getByTestId('connect-wallet-form').waitFor({ state: 'visible' });
await popup.locator(`[href="/settings"]`).click({ timeout: 1000 });
await popup.getByRole('tab', { name: 'Wallet' }).click();

await popup
.getByRole('button', { name: 'Disconnect' })
.click({ timeout: 2000 });
await popup
.getByTestId('connect-wallet-form')
.waitFor({ state: 'visible', timeout: 2000 });
}

export type ConnectDetails = {
Expand Down

0 comments on commit 67496ca

Please sign in to comment.