Skip to content

Commit

Permalink
route
Browse files Browse the repository at this point in the history
  • Loading branch information
Seroxdesign committed Jul 8, 2024
1 parent 339fdab commit 00eddf5
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions wallets/phantom/src/utils/getExtensionPage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { Page } from "@playwright/test";

export const getExtensionPage = async (page: Page, extensionId: string, route: string) => {
const extensionHomeUrl = `chrome-extension://${extensionId}/notification.html`;

const routes: any = {
advanced: `${extensionHomeUrl}#settings/advanced`,
settings: `${extensionHomeUrl}#settings`,
experimental: `${extensionHomeUrl}#settings/experimental`,
addNetwork: `${extensionHomeUrl}#settings/networks/add-network`,
newAccount: `${extensionHomeUrl}#new-account`,
importAccount: `${extensionHomeUrl}#new-account/import`,
importToken: `${extensionHomeUrl}#import-token`,
}

page.goto(routes[route])
}

0 comments on commit 00eddf5

Please sign in to comment.