Skip to content

Add jpro-playwright module: Playwright test utilities + docs#122

Merged
FlorianKirmaier merged 8 commits into
mainfrom
feature/jpro-playwright-module
Jun 15, 2026
Merged

Add jpro-playwright module: Playwright test utilities + docs#122
FlorianKirmaier merged 8 commits into
mainfrom
feature/jpro-playwright-module

Conversation

@FlorianKirmaier

Copy link
Copy Markdown
Contributor

New jpro-playwright module with reusable utilities and documentation for writing Playwright end-to-end tests against JPro/JavaFX apps, surfaced via ai-docs.

What's included

  • JProInput — keyboard/input helper encoding the JPro-specific rules (focus → settle → keyboard().type() → poll; never fill()).
  • JProPlaywrightTest — base class: headless Chromium lifecycle, waitForRunning, and build-tool-agnostic server start/stop (gradleCommand/mavenCommand/any command).
  • BrowserErrorCollector, PlaywrightTimeouts, ServerLogAssertions, JProServerUtils — ported from jpro's jpro-test-util, trimmed to Playwright + JUnit.
  • jpro-playwright:example — minimal JPro test-app (mirrorCSSToDOM=true, jpro/html/defaultpage).
  • Tests run as part of the build: ServerLogAssertionsTest (unit) + TextInputPlaywrightTest (real browser e2e).
  • README → published as the DOCUMENTATION artifact, with a Gotchas/pitfalls section (the jpro- prefix, mirrorCSSToDOM, fill(), round-trip polling, defaultpage, …).

Running

./gradlew :jpro-playwright:installPlaywright once, then ./gradlew :jpro-playwright:test.

🤖 Generated with Claude Code

sandec-bot and others added 8 commits June 15, 2026 17:59
New published module with helpers for Playwright end-to-end tests against
JPro apps (JProInput keyboard helper, base test class, browser/server error
collectors), a test-app, real tests, and a README documenting the gotchas.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace this repo's internal :jpro-playwright task commands in the published
DOCUMENTATION with a generic browser-install snippet; keep the module-specific
run commands in build.gradle for contributors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Remove untested helpers (JProServerUtils, mavenCommand, JProInput overloads,
  BrowserErrorCollector.ignoreMatching); every remaining public method is now
  exercised by a test (added Backspace and screenshot tests).
- Document the verified behavior instead of guessed internals: fill() throws
  because a JPro node is not a DOM input (not a silent DOM-value set).
- Make the README compact and precise.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CI runs the standard build with no separate browser-install step, so the
Playwright tests failed with a missing chrome-headless-shell. Wire
test -> installPlaywright (--with-deps for Linux system libs).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Correct {@link} signatures broken by the earlier server-API change (the CI
  javadoc task failed on them).
- Add a /jserror route that emits a console.error and a BrowserErrorPlaywrightTest
  that asserts BrowserErrorCollector captures it. JPro mirrors console errors into
  the server log, so that class stops the server without asserting a clean log.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@FlorianKirmaier FlorianKirmaier merged commit b88f6f5 into main Jun 15, 2026
2 checks passed
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.

2 participants