Skip to content

fix(lab02): normalize Playwright validation paths - #6

Open
power246 wants to merge 1 commit into
code-philia:mainfrom
power246:fix/lab02-playwright-validation-path
Open

power246 wants to merge 1 commit into
code-philia:mainfrom
power246:fix/lab02-playwright-validation-path

Conversation

@power246

Copy link
Copy Markdown

Problem

Running the Lab02 GUI workflow on Windows exposed two Playwright test-discovery failures:

  1. Course validation reported Validation report did not contain checks for category: Structure and accessibility, while the underlying Playwright report contained no suites because no tests were collected.
  2. Generated train-suite verification exhausted three rewrite attempts with The train suite could not be verified, again because Playwright collected no executable tests.

Both runners passed absolute Windows paths as positional Playwright test filters. Playwright interprets positional test arguments as regular expressions, so Windows backslashes prevented the intended test files from matching.

Fix

  • Convert the course validation spec path to a project-relative path and normalize separators to / before passing it to Playwright.
  • Apply the same normalization to generated train test paths while retaining absolute paths for file operations and environment configuration.
  • Keep the behavior portable across Windows, macOS, and Linux.

Verification

  • TypeScript typecheck passed.
  • Playwright collected all 36 course validation tests.
  • The generated train suite was accepted without rewrite and passed 37/37 tests against the reference implementation.
  • A manual npm run demo:gui completed with outcome GREEN: the initial implementation moved from 14/37 to 37/37 train tests after two TDD repair rounds.

@power246
power246 force-pushed the fix/lab02-playwright-validation-path branch from c2079cf to 6a61db8 Compare September 13, 2026 03:33
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