Added Playwright E2E testing setup (#1893)

This commit is contained in:
Zane
2025-03-28 08:20:14 -07:00
committed by GitHub
parent 5fcb3eb984
commit 594fa7ef6b
5 changed files with 350 additions and 1 deletions
+5 -1
View File
@@ -15,7 +15,10 @@
"bundle:windows": "node scripts/build-main.js && npm run make -- --platform=win32 --arch=x64 && node scripts/copy-windows-dlls.js",
"bundle:intel": "npm run make -- --arch=x64 && cd out/Goose-darwin-x64 && ditto -c -k --sequesterRsrc --keepParent Goose.app Goose_intel_mac.zip",
"debug": "echo 'run --remote-debugging-port=8315' && lldb out/Goose-darwin-arm64/Goose.app",
"test-e2e": "electron-forge start > /tmp/out.txt & ELECTRON_PID=$! && sleep 12 && if grep -q 'renderer: ChatWindow loaded' /tmp/out.txt; then echo 'process is running'; pkill -f electron; else echo 'not starting correctly'; cat /tmp/out.txt; pkill -f electron; exit 1; fi",
"test-e2e": "npm run generate-api && playwright test",
"test-e2e:ui": "npm run generate-api && playwright test --ui",
"test-e2e:debug": "npm run generate-api && playwright test --debug",
"test-e2e:report": "playwright show-report",
"lint": "eslint \"src/**/*.{ts,tsx}\" --fix",
"lint:check": "eslint \"src/**/*.{ts,tsx}\"",
"format": "prettier --write \"src/**/*.{ts,tsx,css,json}\"",
@@ -35,6 +38,7 @@
"@electron/fuses": "^1.8.0",
"@eslint/js": "^8.56.0",
"@hey-api/openapi-ts": "^0.64.4",
"@playwright/test": "^1.51.1",
"@tailwindcss/typography": "^0.5.15",
"@types/cors": "^2.8.17",
"@types/electron-squirrel-startup": "^1.0.2",