SynEdgy / SynEdgy/Sampler.PowerShellUniversalTasks

Add reusable Playwright test harness

Offen
#2 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
PowerShell
Sterne
1
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Summary

Add a reusable Playwright end-to-end test harness to this task module so Sampler-based repositories can run browser tests through the same build entry point and reporting conventions as their Pester tests.

Scope

  • Add a shipped InvokeBuild task file under source/Tasks and export it through a Task.* alias and AliasesToExport metadata.
  • Keep reusable helper logic in one-function-per-file module functions under source/Public or source/Private; do not add a sibling task PSM1.
  • Provide Pester 5 wrapper tasks for importing Pester, running Playwright wrappers, failing the build on test failures, and a convenient testUI workflow alias.
  • Support defaults-first configuration where invocation parameters override build.yaml, and build.yaml overrides module defaults.
  • Default test discovery to tests/playwright, with configurable run paths, tags, and excluded tags.
  • Write Pester NUnit XML results under output/playwright.
  • Document a Node Playwright harness using package.json, playwright.config.ts, and browser test folders such as tests/smoke.
  • Configure Playwright to retain traces, screenshots, and videos on failures and emit a JUnit result file under output/playwright.
  • Define how npm ci and the required Playwright browser installation are bootstrapped locally and in CI.
  • Keep secrets and target URLs environment-driven; no credentials should be committed.
  • Add unit tests for configuration conversion, path resolution, filtering, and failure propagation.
  • Add WikiSource documentation for consumer setup, configuration, task reference, output files, and CI integration.

Suggested task surface

  • Import_Pester_For_Playwright
  • Invoke_Playwright_Pester_Tests_v5
  • Fail_Build_If_Playwright_Tests_Failed
  • Playwright_Tests_Stop_On_Fail
  • testUI

Acceptance criteria

  • A consumer can add the module through RequiredModules.psd1, import its Task.* alias through ModuleBuildTasks, and run ./build.ps1 -Tasks testUI.
  • Missing configured test paths fail with a clear actionable error.
  • Playwright and Pester result files are generated in deterministic locations below output/playwright.
  • Browser diagnostics are retained on failures and can be uploaded as CI artifacts.
  • A failing browser test fails the InvokeBuild workflow.
  • The harness works on supported PowerShell and GitHub-hosted runner environments.
  • Public/private helper functions follow this repository's source layout and test conventions.
  • Documentation describes the complete setup without depending on repository-specific application details.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, die bestehenden Pester-Task-Konventionen sowie die Layouts von source/Tasks, source/Public und source/Private zu überprüfen. Verfolge die Modul-Exporte über RequiredModules.psd1, Aliase von Task.* und AliasesToExport hinweg und untersuche anschließend build.yaml sowie die angeforderten Playwright-Dateien und Ausgabe-Pfade. Als abgeschlossen gilt die Aufgabe, wenn der testUI-Workflow, die Konfiguration und das Fehlerverhalten, die Diagnostik, die Unit-Tests, die CI-Einrichtung und die WikiSource-Dokumentation die aufgeführten Abnahmekriterien erfüllen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
playwright, powershell, typescript
Bereich
build-system, ci-cd, documentation, testing
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.