Class GadgetContainer

java.lang.Object
com.atlassian.jira.pageobjects.gadgets.GadgetContainer

public class GadgetContainer extends Object
The container of gadgets on the dashboard page
Since:
v5.1
See Also:
  • Field Details

    • pageBinder

      @Inject protected com.atlassian.pageobjects.PageBinder pageBinder
    • timedQueryFactory

      @Inject protected TimedQueryFactory timedQueryFactory
    • dashboard

      protected com.atlassian.pageobjects.elements.PageElement dashboard
    • auiBlanket

      protected com.atlassian.pageobjects.elements.PageElement auiBlanket
  • Constructor Details

    • GadgetContainer

      public GadgetContainer(int dashboardId)
  • Method Details

    • getTabContainer

      protected com.atlassian.pageobjects.elements.PageElement getTabContainer()
    • getTabContainers

      protected List<com.atlassian.pageobjects.elements.PageElement> getTabContainers()
    • hasTabs

      public boolean hasTabs()
    • canAddGadget

      public boolean canAddGadget()
    • openAddGadgetDialog

      public it.com.atlassian.gadgets.pages.AddGadgetDialog openAddGadgetDialog()
    • getLoginGadget

      public LoginGadget getLoginGadget()
      Login gadget is always on the Dashboard if not logged in.
      Returns:
      Login gadget
      Throws:
      IllegalStateException - if an user is logged in
    • hasGadget

      public boolean hasGadget(String gadgetId)
    • getGadget

      public it.com.atlassian.gadgets.pages.Gadget getGadget(String gadgetId)
    • getGadget

      public <G extends it.com.atlassian.gadgets.pages.Gadget> G getGadget(Class<G> gadgetClass, String gadgetId)
    • get

      public it.com.atlassian.gadgets.pages.Gadget get(String gadgetId)
      Equivalent to getGadget(String).
      Parameters:
      gadgetId - gadget ID
      Returns:
      gadget corresponding to the ID.
    • get

      public <G extends it.com.atlassian.gadgets.pages.Gadget> G get(Class<G> gadgetClass, String gadgetId)
      Parameters:
      gadgetClass - expected gadget type
      gadgetId - gadget ID
      Returns:
      gadget corresponding to the ID.
    • getGadgetByTitle

      public it.com.atlassian.gadgets.pages.Gadget getGadgetByTitle(String gadgetTitle)
      Get gadget by it's title as visible on the dashboard.
      Parameters:
      gadgetTitle - title of the gadget
      Returns:
      gadget
      Throws:
      IllegalArgumentException - if gadget with given title does not exist
    • getGadgetByTitle

      public <G extends it.com.atlassian.gadgets.pages.Gadget> G getGadgetByTitle(Class<G> gadgetClass, String gadgetTitle)
      Get gadget of given type by it's title as visible on the dashboard.
      Parameters:
      gadgetClass - expected gadget type
      gadgetTitle - title of the gadget
      Returns:
      gadget of given type with given title
      Throws:
      IllegalArgumentException - if gadget with given title does not exist
    • getByTitle

      public it.com.atlassian.gadgets.pages.Gadget getByTitle(String gadgetTitle)
      Equivalent to getGadgetByTitle(String)}.
      Parameters:
      gadgetTitle - title of the gadget
      Returns:
      gadget with given title.
      Throws:
      IllegalArgumentException - if gadget with given title does not exist
    • getByTitle

      public <G extends it.com.atlassian.gadgets.pages.Gadget> G getByTitle(Class<G> gadgetClass, String gadgetTitle)
      Parameters:
      gadgetClass - expected gadget type
      gadgetTitle - gadget title
      Returns:
      gadget with given title.
    • getDashboardTools

      public it.com.atlassian.gadgets.pages.DashboardToolsMenu getDashboardTools()
    • openDashboardTools

      public it.com.atlassian.gadgets.pages.DashboardToolsMenu openDashboardTools()
    • switchDashboard

      public DashboardPage switchDashboard(String dashboardName)
      Switches dashboard using the side tabs. This will only work if hasTabs() returns true.
      Parameters:
      dashboardName - name of the dashboard to switch to
      Returns:
      this dashboard page instance
      Throws:
      IllegalStateException - if there is no tabs (e.g. user not logged in or there is only one dashboard configured for the user), or there is no dashboard with given name
    • waitForAuiBlanketToVanish

      public void waitForAuiBlanketToVanish()