Skip to content

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

Description

@mcollovati

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status
    🔖 Normal Priority (P2)
    Status
    🪵Product backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions