From bd22ef9315d99798aab37381795ebbc12dcdead4 Mon Sep 17 00:00:00 2001 From: matstyler Date: Wed, 11 Dec 2024 10:34:46 +0100 Subject: [PATCH] fix: cleanup --- .../test/playwright/04_externalConfig.spec.ts | 10 ------- .../test/wallet-setup/importedConfig.setup.ts | 27 ------------------- 2 files changed, 37 deletions(-) delete mode 100644 examples/metamask/test/playwright/04_externalConfig.spec.ts delete mode 100644 examples/metamask/test/wallet-setup/importedConfig.setup.ts diff --git a/examples/metamask/test/playwright/04_externalConfig.spec.ts b/examples/metamask/test/playwright/04_externalConfig.spec.ts deleted file mode 100644 index 03088da59..000000000 --- a/examples/metamask/test/playwright/04_externalConfig.spec.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { testWithSynpress } from '@synthetixio/synpress' -import { metaMaskFixtures } from '@synthetixio/synpress/playwright' -import config from '../config' -import importedConfigSetup from '../wallet-setup/importedConfig.setup' - -const test = testWithSynpress(metaMaskFixtures(importedConfigSetup)) - -test('Properly generate cache', async ({ page }) => { - await page.goto(config.baseUrl) -}) diff --git a/examples/metamask/test/wallet-setup/importedConfig.setup.ts b/examples/metamask/test/wallet-setup/importedConfig.setup.ts deleted file mode 100644 index 3154fe324..000000000 --- a/examples/metamask/test/wallet-setup/importedConfig.setup.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { defineWalletSetup } from '@synthetixio/synpress-cache' -import { MetaMask, getExtensionId } from '@synthetixio/synpress/playwright' -import 'dotenv/config' -import config from '../config' - -const SEED_PHRASE = process.env.SEED_PHRASE -const PASSWORD = process.env.WALLET_PASSWORD - -export default defineWalletSetup(PASSWORD, async (context, walletPage) => { - const extensionId = await getExtensionId(context, 'MetaMask') - - const metamask = new MetaMask(context, walletPage, PASSWORD, extensionId) - - await metamask.importWallet(SEED_PHRASE) - - const page = await context.newPage() - - await page.goto(config.baseUrl) - await page.getByRole('button', { name: 'Sign in' }).click() - await page.getByRole('button', { name: 'MetaMask' }).click() - - await metamask.connectToDapp() - - await page.waitForTimeout(2000) - await metamask.confirmSignature() - await page.waitForTimeout(2000) -})