Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to fix Playwright tests failing - human edition #1884

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
10 changes: 5 additions & 5 deletions .github/workflows/playwright-tests.yml
Original file line number Diff line number Diff line change
@@ -22,17 +22,17 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: pnpm-setup
uses: pnpm/action-setup@v4
with:
version: 8

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.18.2
node-version: lts/*
cache: 'pnpm'

- name: Install dependencies
@@ -42,7 +42,7 @@ jobs:
run: pnpm db:generate

- name: Install playwright browsers
run: pnpx playwright install --with-deps
run: pnpm exec playwright install --with-deps chromium

- name: Run Playwright tests
run: pnpm run test
run: pnpm exec playwright test
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -24,16 +24,16 @@
"db:push": "prisma db push",
"db:seed": "prisma db seed",
"i-changed-the-schema": "pnpm run db:push && pnpm run db:generate",
"postinstall": "pnpm db:generate && pnpm exec playwright install",
"postinstall": "pnpm db:generate && pnpm exec playwright install chromium",
"stylelint": "NODE_OPTIONS=--no-deprecation stylelint \"**/*.css\""
},
"devDependencies": {
"@codecov/sveltekit-plugin": "0.0.1-beta.12",
"@codecov/sveltekit-plugin": "1.2.1",
"@eslint/compat": "^1.1.1",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.11.1",
"@playwright/test": "^1.46.0",
"@sveltejs/kit": "^2.5.27",
"@playwright/test": "^1.48.2",
"@sveltejs/kit": "^2.7.4",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@types/chroma-js": "^2.4.4",
"@types/js-cookie": "^3.0.6",
@@ -55,17 +55,16 @@
"postcss-preset-env": "^10.0.0",
"prettier": "^3.3.3",
"prettier-plugin-svelte": "^3.2.6",
"prisma": "5.18.0",
"semver": "^7.6.3",
"stylelint": "^16.9.0",
"stylelint-config-standard": "^36.0.1",
"stylelint-declaration-strict-value": "^1.10.6",
"svelte": "^5.0.0",
"svelte": "^5.1.9",
"svelte-check": "^4.0.0",
"svelte-preprocess": "^6.0.2",
"svelte-preprocess": "^6.0.3",
"tslib": "^2.6.3",
"typescript": "^5.5.4",
"vite": "^5.4.4",
"typescript": "^5.6.3",
"vite": "^5.4.10",
"vitest": "^2.0.5"
},
"type": "module",
@@ -81,8 +80,8 @@
"@leveluptuts/svelte-side-menu": "^1.1.0",
"@oddbird/popover-polyfill": "^0.4.4",
"@prisma/client": "5.18.0",
"@sentry/profiling-node": "^8.28.0",
"@sentry/sveltekit": "^8.28.0",
"@sentry/profiling-node": "^8.36.0",
"@sentry/sveltekit": "^8.36.0",
"@sparticuz/chromium": "^122.0.0",
"@svelte-put/shortcut": "^3.1.1",
"@sveltejs/adapter-vercel": "^5.4.3",
@@ -101,6 +100,7 @@
"npm-run-all2": "^6.2.2",
"openai": "^3.3.0",
"p-map": "^7.0.2",
"prisma": "5.18.0",
"puppeteer-core": "^22.12.1",
"rehype-autolink-headings": "^7.1.0",
"rehype-highlight": "^7.0.0",
26 changes: 17 additions & 9 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import type { PlaywrightTestConfig } from '@playwright/test';
import { defineConfig, devices } from '@playwright/test';

const config: PlaywrightTestConfig = {
webServer: {
command: 'pnpm build:svelte && pnpm preview',
port: 4173,
timeout: 600000
},
testDir: 'tests'
};
const config = defineConfig({
fullyParallel: true,
retries: process.env.CI ? 2 : 0,
webServer: {
command: 'pnpm build:svelte && pnpm preview',
port: 4173,
timeout: 600_000
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
testDir: 'tests'
});

export default config;
1,900 changes: 1,101 additions & 799 deletions pnpm-lock.yaml

Large diffs are not rendered by default.