Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-14031

Redesign the AbstractPopupMenu page fragment to enable more complex ContextMenu interactions

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 4.5.4
    • Fix Version/s: 4.5.7
    • Component/s: page-fragments
    • Labels:
      None

      Description

      Currently the AbstractPopupMenu works in the following way:
      while a test case selects a context menu (CM) item, the CM is shown and then the desired item is selected by clicking on it, all in one method: https://github.com/richfaces/richfaces/blob/master/build/page-fragments/src/main/java/org/richfaces/fragment/contextMenu/AbstractPopupMenu.java#L79. The triggering of popup and selection of the item should be separated such allowing for complex operations on/navigation through CM, f.i., popping up a CM, navigating to some menu group and then clicking the submenu item, like (pseudo-code):

      WebElement subMenuActionElement = menuItem(contextMenu, subMenuAction);
      Actions actions = new Actions(driver);
      // select menu group and put the mouse over the first item
      actions.moveToElement(subMenuActionElement).moveByOffset(120, 0).perform();
      waitGui(driver);
      WebElement subMenuElement = contextMenu.findElement(By.id(subMenuActionElement.findElement(By.xpath("parent::*")).getAttribute("id") + "_menu"));
      WebElement actionElement = menuItem(subMenuElement, action);
      actions.moveToElement(actionElement).perform();
      waitGui(driver);
      // get the corresponding menu group items
      guardAjax(actionElement).click();
      

      Possible implementation proposition: add a boolean attribute to selectItem method which forces or skips a call to CM.show() (the test case designer would be responsible for correct sequence of actions: first show the CM, navigate to desired item, and finally select it)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jstefek Jiří Štefek
                Reporter:
                pjotrovsky Pëtr Andreev
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: