mirror of
https://github.com/stablyai/orca.git
synced 2026-10-03 00:02:19 +00:00
test: exercise document visibility WebGL screenshots in rendered CI
This commit is contained in:
@@ -245,8 +245,9 @@ jobs:
|
||||
if grep -l '@headful' "${TEST_FILES[@]}" >/dev/null; then
|
||||
E2E_PROJECT_ARGS+=(--project=electron-headful)
|
||||
fi
|
||||
node tests/e2e/diagnose-execution-context.mjs
|
||||
xvfb-run --auto-servernum bash .github/scripts/e2e-with-window-manager.sh env "${E2E_ENV[@]}" \
|
||||
pnpm run test:e2e "${TEST_FILES[@]}" --workers=1 "${E2E_PROJECT_ARGS[@]}"
|
||||
pnpm run test:e2e "${TEST_FILES[@]}" --workers=1 "${E2E_PROJECT_ARGS[@]}" --repeat-each=5
|
||||
|
||||
- name: Upload Playwright traces
|
||||
if: failure()
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import { createRequire } from 'node:module'
|
||||
const require = createRequire(import.meta.url)
|
||||
const file = path.join(path.dirname(require.resolve('playwright-core/package.json')), 'lib/server/chromium/crExecutionContext.js')
|
||||
let source = fs.readFileSync(file, 'utf8')
|
||||
const needle = 'function rewriteError(error) {'
|
||||
if (!source.includes(needle)) throw new Error('Playwright diagnostic hook missing')
|
||||
source = source.replace(needle, needle + '\n console.error("[raw-context-error]", error.message, error.stack);')
|
||||
fs.writeFileSync(file, source)
|
||||
Reference in New Issue
Block a user