playwright.config.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import { defineConfig, devices } from '@playwright/test'
  2. const webPort = Number(process.env.YAOYAO_E2E_PORT || 18801)
  3. const upstreamPort = Number(process.env.FAKE_HERMES_PORT || 19119)
  4. export default defineConfig({
  5. testDir: './tests/e2e',
  6. // These suites own different fixtures and run with their dedicated configurations.
  7. testIgnore: ['**/workspace-chat.spec.ts', '**/team-tools.spec.ts', '**/avatarReference.spec.ts', '**/avatarRoundTrip.spec.ts', '**/serverIdentity.spec.ts', '**/bot-panels.spec.ts', '**/grok-auth.spec.ts', '**/execution-auth.spec.ts', '**/native-environment.spec.ts', '**/hermes-bridge.spec.ts', '**/credential-vault.spec.ts', '**/desktop-hosts.spec.ts'],
  8. timeout: 30_000,
  9. fullyParallel: false,
  10. workers: 1,
  11. reporter: 'list',
  12. use: {
  13. baseURL: `http://127.0.0.1:${webPort}`,
  14. viewport: { width: 1280, height: 720 },
  15. trace: 'retain-on-failure',
  16. screenshot: 'only-on-failure',
  17. },
  18. projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
  19. webServer: [
  20. {
  21. command: 'node tests/fixtures/fake-hermes.mjs',
  22. port: upstreamPort,
  23. reuseExistingServer: !process.env.YAOYAO_E2E_PORT,
  24. timeout: 15_000,
  25. },
  26. {
  27. command: 'node tests/fixtures/e2e-web-server.mjs',
  28. url: `http://127.0.0.1:${webPort}/healthz`,
  29. reuseExistingServer: !process.env.YAOYAO_E2E_PORT,
  30. timeout: 15_000,
  31. },
  32. ],
  33. })