From e576a03ce667494376cf1caa4a06720696a9c1c8 Mon Sep 17 00:00:00 2001 From: Justin Duke Date: Mon, 9 Sep 2024 15:54:58 -0400 Subject: [PATCH] Speed up e2e tests --- .env.sample | 1 + components/DomainIcon.tsx | 5 +++++ justfile | 6 +++--- playwright.config.ts | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.env.sample b/.env.sample index 9d3aaa4..fceaa2f 100644 --- a/.env.sample +++ b/.env.sample @@ -2,3 +2,4 @@ DATABASE_URL=DATABASE_URL DISABLE_PUPPETEER=true DISABLE_DATABASE=true SHOVEL_PRO_URL=https://buy.stripe.com/28o8xEc6ZdpSe9GaEG +DISABLE_ICONHORSE=true diff --git a/components/DomainIcon.tsx b/components/DomainIcon.tsx index 10ac5ea..c9e1dd3 100644 --- a/components/DomainIcon.tsx +++ b/components/DomainIcon.tsx @@ -1,4 +1,9 @@ +const DISABLE_ICONHORSE = process.env.DISABLE_ICONHORSE === "true"; + const DomainIcon = ({ domain }: { domain: string }) => { + if (DISABLE_ICONHORSE) { + return null; + } return ; }; diff --git a/justfile b/justfile index 05f36c0..5273041 100644 --- a/justfile +++ b/justfile @@ -2,14 +2,14 @@ server-dev: bun dev | pino-pretty server-playwright: - PINO_LEVEL=silent DISABLE_DATABASE=true DISABLE_PUPPETEER=true bun playwright | pino-pretty + PINO_LEVEL=silent DISABLE_DATABASE=true DISABLE_PUPPETEER=true DISABLE_ICONHORSE=true bun playwright install: bun i bunx playwright install test *args: - PINO_LEVEL=silent DISABLE_DATABASE=true DISABLE_PUPPETEER=true bun test {{args}} + PINO_LEVEL=silent DISABLE_DATABASE=true DISABLE_PUPPETEER=true DISABLE_ICONHORSE=true bun test {{args}} e2e-test *args: - PINO_LEVEL=silent DISABLE_DATABASE=true DISABLE_PUPPETEER=true bun e2e-test {{args}} + PINO_LEVEL=silent DISABLE_DATABASE=true DISABLE_PUPPETEER=true DISABLE_ICONHORSE=true bun e2e-test {{args}} diff --git a/playwright.config.ts b/playwright.config.ts index 2b4d269..4d5f5ed 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -8,5 +8,6 @@ export default defineConfig({ stdout: 'ignore', stderr: 'pipe', }, - testMatch: '*.e2e-test.ts' + testMatch: '*.e2e-test.ts', + fullyParallel: true, });