Skip to content

Commit

Permalink
Speed up e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jmduke committed Sep 9, 2024
1 parent 4fa2080 commit e576a03
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions components/DomainIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
const DISABLE_ICONHORSE = process.env.DISABLE_ICONHORSE === "true";

const DomainIcon = ({ domain }: { domain: string }) => {
if (DISABLE_ICONHORSE) {
return null;
}
return <img src={`https://icon.horse/icon/${domain}`} className="h-5 w-5 inline-block" />;
};

Expand Down
6 changes: 3 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
3 changes: 2 additions & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ export default defineConfig({
stdout: 'ignore',
stderr: 'pipe',
},
testMatch: '*.e2e-test.ts'
testMatch: '*.e2e-test.ts',
fullyParallel: true,
});

0 comments on commit e576a03

Please sign in to comment.