vaadin / vaadin/browserless-test

Unify test(Class, Y) tester-resolution semantics across DSL implementations

Open
#124 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Part of #120. Blocked by #121.

test(Class<T> tester, Y component) behaves differently per entry point:

  • BaseBrowserlessTestTesterRegistry.instantiate(tester, component) — no resolution, instantiates exactly the requested tester.
  • BrowserlessUIContextinternalWrap(tester, component) — prefers a more specific registered tester (@Tests resolution).

So test(SomeTester.class, component) can return different types depending on the entry point.

Proposal

Decide the intended contract (likely the resolving internalWrap behavior, consistent with single-arg test(Y)), unify both, then move the method into BrowserlessDsl as a default.

Note: behavior decision + likely bug fix; needs a regression test (TesterResolutionTest).

Acceptance criteria
  • test(Class, Y) has one documented behavior across all implementations.
  • It is a default on BrowserlessDsl; per-class copies removed.
  • Resolution behavior covered by a test.
Affected files

shared/.../BrowserlessDsl.java, shared/.../BaseBrowserlessTest.java, shared/.../BrowserlessUIContext.java, junit6/.../TesterResolutionTest.java.

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.

Research direction

Start with shared/.../BrowserlessDsl.java, then compare test(Class, Y) in BaseBrowserlessTest.java and BrowserlessUIContext.java. Read junit6/.../TesterResolutionTest.java and add regression coverage for the chosen resolution behavior. Done means one documented behavior, a default method on BrowserlessDsl, and no per-class copies.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.