Uploaded image for project: 'Magnolia Test Framework'
  1. Magnolia Test Framework
  2. MGNLTEST-4

Page Object for chooser dialog

XMLWordPrintable

    • 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)

        Acceptance criteria

              mdivilek Milan Divilek
              cmeier Christoph Meier
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoR

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 0.5d
                    0.5d