feat: add shared decks and multi-account Mastodon OAuth
This commit is contained in:
+10
-2
@@ -1,8 +1,15 @@
|
||||
import { mkdtempSync } from 'node:fs'
|
||||
import { tmpdir } from 'node:os'
|
||||
import { join } from 'node:path'
|
||||
import { defineConfig, devices } from '@playwright/test'
|
||||
|
||||
const appPort = 4173
|
||||
const relayPort = 6911
|
||||
const chromiumExecutable = process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE
|
||||
const databasePath =
|
||||
process.env.TWITTER_LITE_E2E_DB_PATH ??
|
||||
join(mkdtempSync(join(tmpdir(), 'twitter-lite-e2e-')), 'workspace.sqlite')
|
||||
process.env.TWITTER_LITE_E2E_DB_PATH = databasePath
|
||||
|
||||
if (!chromiumExecutable) {
|
||||
throw new Error(
|
||||
@@ -16,6 +23,7 @@ export default defineConfig({
|
||||
workers: 1,
|
||||
use: {
|
||||
baseURL: `http://127.0.0.1:${appPort}`,
|
||||
extraHTTPHeaders: { 'Tailscale-User-Login': '[email protected]' },
|
||||
launchOptions: { executablePath: chromiumExecutable },
|
||||
screenshot: 'only-on-failure',
|
||||
trace: 'retain-on-failure',
|
||||
@@ -28,8 +36,8 @@ export default defineConfig({
|
||||
timeout: 120_000,
|
||||
},
|
||||
{
|
||||
command: `TWITTER_RELAY_BASE_URL=http://127.0.0.1:${relayPort} BIRD_PROFILE_NAME=e2e pnpm exec vite dev --host 127.0.0.1 --port ${appPort} --strictPort`,
|
||||
url: `http://127.0.0.1:${appPort}`,
|
||||
command: `TWITTER_LITE_MASTODON_ORIGINS= TWITTER_LITE_CREDENTIAL_KEY_FILE= TWITTER_LITE_DB_PATH=${databasePath} TWITTER_LITE_ORIGIN=http://127.0.0.1:${appPort} [email protected] TWITTER_RELAY_BASE_URL=http://127.0.0.1:${relayPort} BIRD_PROFILE_NAME=e2e pnpm exec vite dev --host 127.0.0.1 --port ${appPort} --strictPort`,
|
||||
port: appPort,
|
||||
reuseExistingServer: false,
|
||||
timeout: 120_000,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user