diff --git a/wallets/phantom/src/utils/getExtensionPage.ts b/wallets/phantom/src/utils/getExtensionPage.ts new file mode 100644 index 000000000..816efd0bb --- /dev/null +++ b/wallets/phantom/src/utils/getExtensionPage.ts @@ -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]) +} \ No newline at end of file