vaadin / testbench

Vaadin TestBench is a tool for automated user interface testing of Vaadin applications.
https://vaadin.com/testbench
Other
20 stars 22 forks source link

Add a helper for getting component context menu from the wrapper #1456

Open mcollovati opened 2 years ago

mcollovati commented 2 years ago

ComponentWrap class should have a method (e.g contextMenu() or openContextMenu()) to get the potential context menu assigned to the UI component. The method should return an Optional<ContextMenuWrap>. Document the fact that an empty optional means that the component does not have a Vaadin context menu, but it may have the native browser menu.

mcollovati commented 2 years ago

Consider introducing a specific interface for context menu handling, so that ComponentWrap will not be coupled to ContextMenuWrap

mcollovati commented 2 years ago

It seems not possible at the moment get the context menu starting from the component. There's an open issue on components repository for this https://github.com/vaadin/flow-components/issues/1520