From 4d2d34847435f85a11f3d13d299411cfc813514c Mon Sep 17 00:00:00 2001 From: matstyler Date: Mon, 5 Feb 2024 14:19:16 +0100 Subject: [PATCH] fix: format --- examples/new-dawn/playwright.config.ts | 16 +++++------ .../test/wallet-setup/connected.setup.ts | 28 +++++++++++-------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/examples/new-dawn/playwright.config.ts b/examples/new-dawn/playwright.config.ts index e11b98f3f..10e86e197 100644 --- a/examples/new-dawn/playwright.config.ts +++ b/examples/new-dawn/playwright.config.ts @@ -1,11 +1,11 @@ -import { defineConfig, devices } from '@playwright/test'; +import { defineConfig, devices } from "@playwright/test"; /** * See https://playwright.dev/docs/test-configuration. */ export default defineConfig({ // Look for test files in the "test/e2e" directory, relative to this configuration file. - testDir: './test/e2e', + testDir: "./test/e2e", // Run all tests in parallel. fullyParallel: true, @@ -15,21 +15,21 @@ export default defineConfig({ use: { // We are using locally deployed MetaMask Test Dapp. - baseURL: 'http://localhost:9999', + baseURL: "http://localhost:9999", }, // Synpress currently only supports Chromium, however, this will change in the future. projects: [ { - name: 'chromium', - use: { ...devices['Desktop Chrome'] } - } + name: "chromium", + use: { ...devices["Desktop Chrome"] }, + }, ], // Serve MetaMask Test Dapp locally before starting the tests. webServer: { - command: 'pnpm run serve:test-dapp', - url: 'http://localhost:9999', + command: "pnpm run serve:test-dapp", + url: "http://localhost:9999", reuseExistingServer: true, }, }); diff --git a/examples/new-dawn/test/wallet-setup/connected.setup.ts b/examples/new-dawn/test/wallet-setup/connected.setup.ts index 0446f645b..ef52a06f4 100644 --- a/examples/new-dawn/test/wallet-setup/connected.setup.ts +++ b/examples/new-dawn/test/wallet-setup/connected.setup.ts @@ -1,24 +1,28 @@ -import { MetaMask, defineWalletSetup, getExtensionId } from '@synthetixio/synpress' -import 'dotenv/config' +import { + MetaMask, + defineWalletSetup, + getExtensionId, +} from "@synthetixio/synpress"; +import "dotenv/config"; -const SEED_PHRASE = process.env.SEED_PHRASE -const PASSWORD = process.env.WALLET_PASSWORD +const SEED_PHRASE = process.env.SEED_PHRASE; +const PASSWORD = process.env.WALLET_PASSWORD; export default defineWalletSetup(PASSWORD, async (context, walletPage) => { // This is a workaround for the fact that the MetaMask extension ID changes. // This workaround won't be needed in the near future! 😁 - const extensionId = await getExtensionId(context, 'MetaMask') + const extensionId = await getExtensionId(context, "MetaMask"); - const metamask = new MetaMask(context, walletPage, PASSWORD, extensionId) + const metamask = new MetaMask(context, walletPage, PASSWORD, extensionId); - await metamask.importWallet(SEED_PHRASE) + await metamask.importWallet(SEED_PHRASE); - const page = await context.newPage() + const page = await context.newPage(); // Go to a locally hosted MetaMask Test Dapp. - await page.goto('http://localhost:9999') + await page.goto("http://localhost:9999"); - await page.locator('#connectButton').click() + await page.locator("#connectButton").click(); - await metamask.connectToDapp() -}) + await metamask.connectToDapp(); +});