Skip to content

feat(test): configurable screenshot and viewTree artifact modes#164

Open
padmarajnidagundi wants to merge 1 commit into
mobile-next:mainfrom
padmarajnidagundi:feat/qa-artifact-modes
Open

feat(test): configurable screenshot and viewTree artifact modes#164
padmarajnidagundi wants to merge 1 commit into
mobile-next:mainfrom
padmarajnidagundi:feat/qa-artifact-modes

Conversation

@padmarajnidagundi

Copy link
Copy Markdown

Summary

Adds configurable test artifact capture modes to improve QA workflows and reporting flexibility.

What changed

  • Added screenshot config option with modes: on | on-failure | off.
  • Expanded viewTree config option to support: on | on-failure | off.
  • Updated fixture attachment logic to use mode-based decisions:
    • Screenshots can now be attached for every test or only failures.
    • Accessibility view-tree JSON can now be attached for every test or only failures.
  • Added unit tests for mode validation and attach behavior.
  • Updated docs in README and fixture docs.

Why this helps QA

  • Enables always-on artifacts for audits and flaky-test triage.
  • Keeps CI lean by allowing failure-only artifact capture.
  • Standardizes behavior across screenshot and view-tree artifacts.

Validation

  • npm run build
  • npx playwright test --config=tests/mobilewright.config.ts packages/mobilewright/src/config.test.ts packages/test/src/fixtures.test.ts

Both passed locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant