# QA360 Example: UI Advanced with Playwright++
# Full-featured UI/E2E testing with artifacts, reporting, and more

version: 2
name: ui-advanced-tests
description: Advanced UI tests with Playwright++ features (artifacts, video, screenshots, HTML report)

gates:
  ui-smoke:
    adapter: playwright-ui
    enabled: true
    config:
      baseUrl: "https://example.com"

      # Page definitions to test
      pages:
        - url: "/"
          expectedElements: ["body", "main"]
        - url: "/about"
          expectedElements: ["body"]

      # === Playwright++ Features ===

      # Artifacts configuration
      artifacts:
        # When to take screenshots: 'always' | 'only-on-failure' | 'never'
        screenshots: "only-on-failure"
        # When to record video: 'always' | 'retain-on-failure' | 'never'
        video: "retain-on-failure"
        # When to capture trace: 'always' | 'retain-on-failure' | 'never' | 'on-first-failure'
        trace: "on-first-failure"
        # Custom output directory for artifacts
        outputDir: ".qa360/artifacts/ui"

      # HTML report generation (standalone file with embedded screenshots/videos)
      htmlReport: ".qa360/reports/ui-report.html"

      # Stop execution after N failures
      bail: 3

      # Accessibility scoring
      budgets:
        a11y_min: 90

execution:
  default_timeout: 60000
  default_retries: 1
  on_failure: continue
  parallel: false
