Make AbstractBrowserlessExtension implement BrowserlessDsl

Open Beginner friendly
#123 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Quiet
Tech stack
java
Domain
testing

Research direction

Start with junit6/.../AbstractBrowserlessExtension.java and compare its duplicated DSL methods with the BrowserlessDsl contract, including the existing private getUI(). Update the extension so only currentUI() and runPendingSignalsTasks remain as DSL bodies, then run the BrowserlessExtension-based and per-class-lifecycle tests. Done means both test groups pass unchanged and the stated acceptance criteria are met.

Written by the indexing model from the issue text.

Description

enhancement

Part of #120. Blocked by #121.

AbstractBrowserlessExtension (the @RegisterExtension programmatic API) is a third, verbatim copy of the DSL (navigate ×4, find ×2, findInView, getCurrentView, roundTrip, fireShortcut). Its private getUI() already implements exactly the currentUI() contract (returns UI.getCurrent(), throws BrowserlessTestSetupException if null).

Proposal

Declare AbstractBrowserlessExtension implements BrowserlessDsl, expose getUI() as public UI currentUI(), and delete the duplicated DSL method bodies. (Keep runPendingSignalsTasks until #125.) Low risk — identical public signatures.

Acceptance criteria
  • The extension declares no DSL bodies beyond currentUI() (and, for now, runPendingSignalsTasks).
  • BrowserlessExtension-based and per-class-lifecycle tests pass unchanged.
Affected files

junit6/.../AbstractBrowserlessExtension.java.

Dominant language
Java
Stars
1
Forks
3
Avg merge
1d 20h
Merged PRs (30d)
51

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vaadin/browserless-test

All issues in vaadin/browserless-test

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.