diff --git a/e2e/create-a-stablecoin.test.ts b/e2e/create-a-stablecoin.test.ts index de36c52f..a5c82657 100644 --- a/e2e/create-a-stablecoin.test.ts +++ b/e2e/create-a-stablecoin.test.ts @@ -18,8 +18,8 @@ test('create a stablecoin', async ({ page }) => { await page.goto('/guide/issuance/create-a-stablecoin') - // Step 1: Sign up with passkey - const signUpButton = page.getByRole('button', { name: 'Sign up' }).first() + // Step 1: Sign in + const signUpButton = page.getByRole('button', { name: 'Sign in' }).first() await expect(signUpButton).toBeVisible({ timeout: 90000 }) await signUpButton.click() diff --git a/e2e/distribute-rewards.test.ts b/e2e/distribute-rewards.test.ts index 39ae4275..71ca4975 100644 --- a/e2e/distribute-rewards.test.ts +++ b/e2e/distribute-rewards.test.ts @@ -18,8 +18,8 @@ test('distribute rewards', async ({ page }) => { await page.goto('/guide/issuance/distribute-rewards') - // Step 1: Sign up with passkey - const signUpButton = page.getByRole('button', { name: 'Sign up' }).first() + // Step 1: Sign in + const signUpButton = page.getByRole('button', { name: 'Sign in' }).first() await expect(signUpButton).toBeVisible({ timeout: 90000 }) await signUpButton.click() diff --git a/e2e/executing-swaps.test.ts b/e2e/executing-swaps.test.ts index 264d02d2..fafd6523 100644 --- a/e2e/executing-swaps.test.ts +++ b/e2e/executing-swaps.test.ts @@ -18,8 +18,8 @@ test('executing swaps', async ({ page }) => { await page.goto('/guide/stablecoin-dex/executing-swaps') - // Step 1: Sign up with passkey - const signUpButton = page.getByRole('button', { name: 'Sign up' }).first() + // Step 1: Sign in + const signUpButton = page.getByRole('button', { name: 'Sign in' }).first() await expect(signUpButton).toBeVisible({ timeout: 90000 }) await signUpButton.click() diff --git a/e2e/manage-stablecoin.test.ts b/e2e/manage-stablecoin.test.ts index 8aa13c4d..446adb10 100644 --- a/e2e/manage-stablecoin.test.ts +++ b/e2e/manage-stablecoin.test.ts @@ -18,8 +18,8 @@ test('manage stablecoin - grant and revoke roles', async ({ page }) => { await page.goto('/guide/issuance/manage-stablecoin') - // Step 1: Sign up with passkey - const signUpButton = page.getByRole('button', { name: 'Sign up' }).first() + // Step 1: Sign in + const signUpButton = page.getByRole('button', { name: 'Sign in' }).first() await expect(signUpButton).toBeVisible({ timeout: 90000 }) await signUpButton.click() diff --git a/e2e/mint-stablecoins.test.ts b/e2e/mint-stablecoins.test.ts index 05c2ac98..2ccbca30 100644 --- a/e2e/mint-stablecoins.test.ts +++ b/e2e/mint-stablecoins.test.ts @@ -18,8 +18,8 @@ test('mint stablecoins', async ({ page }) => { await page.goto('/guide/issuance/mint-stablecoins') - // Step 1: Sign up with passkey - const signUpButton = page.getByRole('button', { name: 'Sign up' }).first() + // Step 1: Sign in + const signUpButton = page.getByRole('button', { name: 'Sign in' }).first() await expect(signUpButton).toBeVisible({ timeout: 90000 }) await signUpButton.click() diff --git a/e2e/providing-liquidity.test.ts b/e2e/providing-liquidity.test.ts index 3967c2eb..6a40c75b 100644 --- a/e2e/providing-liquidity.test.ts +++ b/e2e/providing-liquidity.test.ts @@ -18,8 +18,8 @@ test('providing liquidity - place and query order', async ({ page }) => { await page.goto('/guide/stablecoin-dex/providing-liquidity') - // Step 1: Sign up with passkey - const signUpButton = page.getByRole('button', { name: 'Sign up' }).first() + // Step 1: Sign in + const signUpButton = page.getByRole('button', { name: 'Sign in' }).first() await expect(signUpButton).toBeVisible({ timeout: 90000 }) await signUpButton.click() diff --git a/e2e/send-a-payment.test.ts b/e2e/send-a-payment.test.ts index 8049bfdd..128ea009 100644 --- a/e2e/send-a-payment.test.ts +++ b/e2e/send-a-payment.test.ts @@ -18,8 +18,8 @@ test('send a payment', async ({ page }) => { await page.goto('/guide/payments/send-a-payment') - // Step 1: Sign up with passkey - const signUpButton = page.getByRole('button', { name: 'Sign up' }).first() + // Step 1: Sign in + const signUpButton = page.getByRole('button', { name: 'Sign in' }).first() await expect(signUpButton).toBeVisible({ timeout: 90000 }) await signUpButton.click() diff --git a/e2e/use-for-fees.test.ts b/e2e/use-for-fees.test.ts index 5a6df28d..d80f73d2 100644 --- a/e2e/use-for-fees.test.ts +++ b/e2e/use-for-fees.test.ts @@ -18,8 +18,8 @@ test('use stablecoin for fees', async ({ page }) => { await page.goto('/guide/issuance/use-for-fees') - // Step 1: Sign up with passkey - const signUpButton = page.getByRole('button', { name: 'Sign up' }).first() + // Step 1: Sign in + const signUpButton = page.getByRole('button', { name: 'Sign in' }).first() await expect(signUpButton).toBeVisible({ timeout: 90000 }) await signUpButton.click() diff --git a/playwright.config.ts b/playwright.config.ts index 8c52ede9..b9437203 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -9,7 +9,8 @@ export default defineConfig({ timeout: 180000, // 3 min default timeout for testnet transactions reporter: 'html', use: { - baseURL: 'http://localhost:5173', + baseURL: 'https://localhost:5173', + ignoreHTTPSErrors: true, trace: 'on-first-retry', }, projects: [ @@ -19,8 +20,9 @@ export default defineConfig({ }, ], webServer: { - command: 'pnpm run dev 2>/dev/null', - url: 'http://localhost:5173', + command: process.env.CI ? 'VITE_E2E=true pnpm run dev 2>/dev/null' : 'pnpm run dev 2>/dev/null', + url: 'https://localhost:5173', + ignoreHTTPSErrors: true, reuseExistingServer: !process.env.CI, stdout: 'ignore', stderr: 'ignore', diff --git a/src/components/guides/Demo.tsx b/src/components/guides/Demo.tsx index 7b94b16e..544d8fe6 100644 --- a/src/components/guides/Demo.tsx +++ b/src/components/guides/Demo.tsx @@ -15,7 +15,7 @@ import LucideRotateCcw from '~icons/lucide/rotate-ccw' import LucideWalletCards from '~icons/lucide/wallet-cards' import { cva, cx } from '../../../cva.config' import { usePostHogTracking } from '../../lib/posthog' -import { useTempoWalletConnector } from '../../wagmi.config' +import { useTempoWalletConnector, useWebAuthnConnector } from '../../wagmi.config' import { Container as ParentContainer } from '../Container' import { alphaUsd } from './tokens' @@ -359,7 +359,10 @@ export namespace StringFormatter { export function Login() { const connect = useConnect() - const connector = useTempoWalletConnector() + const tempoWallet = useTempoWalletConnector() + const webAuthn = useWebAuthnConnector() + const isE2E = import.meta.env.VITE_E2E === 'true' + const connector = isE2E ? webAuthn : tempoWallet return (