Class DashboardView

  • All Implemented Interfaces:
    CapybaraPortingLayer

    public class DashboardView
    extends View
    PageObject of DashboardView Configuration Page.
    Author:
    Kohsuke Kawaguchi, Rene Zarwel
    • Constructor Detail

      • DashboardView

        public DashboardView​(com.google.inject.Injector injector,
                             URL url)
        Constructs a new DashboardView.
        Parameters:
        injector - Injector to use.
        url - URL of view.
    • Method Detail

      • addTopPortlet

        public <T extends AbstractDashboardViewPortlet> T addTopPortlet​(Class<T> portletClass)
        Adds a new top portlet.
        Type Parameters:
        T - The type constraint for portlets.
        Parameters:
        portletClass - The class of the portlet.
        Returns:
        The new portlet.
      • addLeftPortlet

        public <T extends AbstractDashboardViewPortlet> T addLeftPortlet​(Class<T> portletClass)
        Adds a new left portlet.
        Type Parameters:
        T - The type constraint for portlets.
        Parameters:
        portletClass - The class of the portlet.
        Returns:
        The new portlet.
      • addRightPortlet

        public <T extends AbstractDashboardViewPortlet> T addRightPortlet​(Class<T> portletClass)
        Adds a new right portlet.
        Type Parameters:
        T - The type constraint for portlets.
        Parameters:
        portletClass - The class of the portlet.
        Returns:
        The new portlet.
      • addBottomPortlet

        public <T extends AbstractDashboardViewPortlet> T addBottomPortlet​(Class<T> portletClass)
        Adds a new bottom portlet.
        Type Parameters:
        T - The type constraint for portlets.
        Parameters:
        portletClass - The class of the portlet.
        Returns:
        The new portlet.
      • getTopPortlet

        public <T extends AbstractDashboardViewPortlet> T getTopPortlet​(Class<T> portletClass)
        Gets a portlet from the bottom of a specific class.
        Type Parameters:
        T - A Portlet of type AbstractDashboardViewPortlet.
        Parameters:
        portletClass - Class of portlet to get.
        Returns:
        the bottom portlet to the corresponding type
      • getLeftPortlet

        public <T extends AbstractDashboardViewPortlet> T getLeftPortlet​(Class<T> portletClass)
        Gets a portlet from the bottom of a specific class.
        Type Parameters:
        T - A Portlet of type AbstractDashboardViewPortlet.
        Parameters:
        portletClass - Class of portlet to get.
        Returns:
        the bottom portlet to the corresponding type
      • getRightPortlet

        public <T extends AbstractDashboardViewPortlet> T getRightPortlet​(Class<T> portletClass)
        Gets a portlet from the bottom of a specific class.
        Type Parameters:
        T - A Portlet of type AbstractDashboardViewPortlet.
        Parameters:
        portletClass - Class of portlet to get.
        Returns:
        the bottom portlet to the corresponding type
      • getBottomPortlet

        public <T extends AbstractDashboardViewPortlet> T getBottomPortlet​(Class<T> portletClass)
        Gets a portlet from the bottom of a specific class.
        Type Parameters:
        T - A Portlet of type AbstractDashboardViewPortlet.
        Parameters:
        portletClass - Class of portlet to get.
        Returns:
        the bottom portlet to the corresponding type
      • getPanel

        public org.openqa.selenium.WebElement getPanel()
        Gets the main panel of this dashboard containing all portlets.
        Returns:
        main panel of this dashboard.
      • getPortletInTopTable

        @CheckForNull
        public org.openqa.selenium.WebElement getPortletInTopTable​(String name)
        Gets the web element of a portlet in the top area of this dashboard view.
        Parameters:
        name - name of portlet.
        Returns:
        web element of the portlet or null if not available.
      • getPortletInLeftTable

        @CheckForNull
        public org.openqa.selenium.WebElement getPortletInLeftTable​(String name)
        Gets the web element of a portlet in the left area of this dashboard view. If there are no portlets in the left area but in the right area, this method searches in the right area.
        Parameters:
        name - name of portlet.
        Returns:
        web element of the portlet or null if not available.
      • getPortletInRightTable

        @CheckForNull
        public org.openqa.selenium.WebElement getPortletInRightTable​(String name)
        Gets the web element of a portlet in the top area of this dashboard view. If there are no portlets in the right area but in the left area, this method searches in the left area.
        Parameters:
        name - name of portlet.
        Returns:
        web element of the portlet or null if not available.
      • getPortletInBottomTable

        @CheckForNull
        public org.openqa.selenium.WebElement getPortletInBottomTable​(String name)
        Gets the web element of a portlet in the bottom area of this dashboard view.
        Parameters:
        name - name of portlet.
        Returns:
        web element of the portlet or null if not available.