Add jpro-playwright module: Playwright test utilities + docs#122
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New
jpro-playwrightmodule 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; neverfill()).JProPlaywrightTest— base class: headless Chromium lifecycle,waitForRunning, and build-tool-agnostic server start/stop (gradleCommand/mavenCommand/any command).BrowserErrorCollector,PlaywrightTimeouts,ServerLogAssertions,JProServerUtils— ported fromjpro'sjpro-test-util, trimmed to Playwright + JUnit.jpro-playwright:example— minimal JPro test-app (mirrorCSSToDOM=true,jpro/html/defaultpage).ServerLogAssertionsTest(unit) +TextInputPlaywrightTest(real browser e2e).DOCUMENTATIONartifact, with a Gotchas/pitfalls section (thejpro-prefix,mirrorCSSToDOM,fill(), round-trip polling,defaultpage, …).Running
./gradlew :jpro-playwright:installPlaywrightonce, then./gradlew :jpro-playwright:test.🤖 Generated with Claude Code