MasterDetailLayoutLocator can't press Esc on the detail or click the backdrop

Open
#306 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@totally-not-ai is already working on this.

Since Oct 31, 2026.

  • #310 by @totally-not-ai — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
java
Domain
testing

Research direction

Start with the MasterDetailLayoutLocator and MasterDetailLayoutTester classes, which currently expose only getMaster(), getDetail(), getDetailPlaceholder() and isDetailPlaceholderVisible(). Read how the existing tester fires events and checks the detail mode, then look at the DetailEscapePressEvent and BackdropClickEvent usages in the issue. Done means pressEscapeOnDetail() and clickBackdrop() exist, fire client-originated events, and throw when the detail is not in overlay mode. Pull request #310 already targets this, so check it before starting.

Written by the indexing model from the issue text.

Description

Summary

When a MasterDetailLayout shows its detail on top of the master (the overlay mode on a narrow screen), the user can close it by pressing Esc or by clicking the backdrop. Applications listen for this with addDetailEscapePressListener(...) and addBackdropClickListener(...), for example to deselect the row or to ask about unsaved changes first.

MasterDetailLayoutLocator/MasterDetailLayoutTester can't simulate either. They only have getMaster(), getDetail(), getDetailPlaceholder() and isDetailPlaceholderVisible(). Tests have to fire the events themselves:

var layout = window.findMasterDetailLayout().component();
ComponentUtil.fireEvent(layout, new MasterDetailLayout.DetailEscapePressEvent(layout, true));
ComponentUtil.fireEvent(layout, new MasterDetailLayout.BackdropClickEvent(layout, true));

Expected

MasterDetailLayoutLocator gets methods like pressEscapeOnDetail() and clickBackdrop(). They fire the events as coming from the client, and refuse when the detail isn't shown in a mode where the user could do that.

Versions

Vaadin 25.3.4, browserless-test 25.3.2, Java 25.

Dominant language
Java
Stars
1
Forks
3
Avg merge
2d 22h
Merged PRs (30d)
13

Getting set up

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.