-
Task
-
Resolution: Fixed
-
High
-
None
-
-
Empty show more show less
-
Empty show more show less
-
UI FW 25, UI FW 26
-
8
Overview & context
Provide a page object for the chooser dialog. It should work for different types of items which can be choosen (pages, assets, ...)
Since the chooser dialog usually / per default (always?) wraps a grid, the API could be similar or "the same" as the API from the Grid P.O.,
when it comes to choose an item - e.g. selectRowByPath
Foreseen basic APIs for:
- selecting
- expanding
- choosing
API - minimal
New PO ChooserDialog
Note that we have other dialogs which we reference so far via form, e.g. expect.form("Add page").
For the chooser dialog, i propose to create a distinct PO Chooser or ChooserDialog - which can be accessed via pageObjects:
ChooserDialog chooser = expect.chooser("Select");
(Maybe) Exposing the grid
The ChooserDialog wraps a "grid" - I expect we can use info.magnolia.test.selenium.pageobjects.Grid within ChooserDialog.
The chooser dialog would then expose the Grid:
Grid grid = chooser.grid();
Selecting
Chooser dialog should expose for convenience methods originating in the grid for selection.
(We did some very similar stuff on info.magnolia.test.selenium.pageobjects.ContentApp).
ChooserDialog chooser.selectRowByPath(string){} ChooserDialog chooser.clickRow(string){} //maybe: boolean chooser.hasRow(string){}
Expanding
Calling #expand assumes that an "expandable node" is already selected.
ChooserDialog expand();
e.g.
chooser.selectRowByPath("ASIA").expand();
Choosing
To confirm the selection: chooser.select() which actually should hit the button "Select".
void select();
Example:
ChooserDialog chooser = expect("Select"); chooser.clickRow("Foobar") .select();
API - extended
Set active view
Basically to choose between the (available) views.
Not sure whether we need this. For the INT-/UI-test it could be sufficient to operate on the tree only.
(See info.magnolia.test.selenium.pageobjects.ContentApp#setActiveView.)
Miscellaneous
void close(); // could also be named cancel. To close the chooser.
Use cases
- move (various) items (in the browser subapp of various content apps)
- select (various) items (e.g. in page editor)
- is depended upon by
-
MGNLTEST-10 Form page object can handle multi-fields
- Closed
-
MGNLCE-273 Add missing ui-tests for adding related categories in Categories App
- Closed
- relates to
-
MGNLTEST-131 Align Form PO button lookup by icon vs. by text
- Selected
-
MGNLTEST-141 Add support for LinkField's ComboBox (without chooser) in PageObjects
- Selected