public class

GadgetContainer

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

Class Overview

The container of gadgets on the dashboard page

See Also

Summary

Fields
protected PageElement addDialogLink
protected PageElement dashboard
protected PageBinder pageBinder
Public Constructors
GadgetContainer()
Public Methods
boolean canAddGadget()
Gadget get(String gadgetId)
Equivalent to getGadget(String).
<G extends Gadget> G get(Class<G> gadgetClass, String gadgetId)
<G extends Gadget> G getByTitle(Class<G> gadgetClass, String gadgetTitle)
Gadget getByTitle(String gadgetTitle)
Equivalent to getGadgetByTitle(String)}.
DashboardToolsMenu getDashboardTools()
<G extends Gadget> G getGadget(Class<G> gadgetClass, String gadgetId)
Gadget getGadget(String gadgetId)
<G extends Gadget> G getGadgetByTitle(Class<G> gadgetClass, String gadgetTitle)
Get gadget of given type by it's title as visible on the dashboard.
Gadget getGadgetByTitle(String gadgetTitle)
Get gadget by it's title as visible on the dashboard.
LoginGadget getLoginGadget()
Login gadget is always on the Dashboard if not logged in.
boolean hasGaddget(String gadgetId)
boolean hasTabs()
AddGadgetDialog openAddGadgetDialog()
DashboardToolsMenu openDashboardTools()
DashboardPage switchDashboard(String dashboardName)
Switches dashboard using the side tabs.
Protected Methods
PageElement getTabContainer()
List<PageElement> getTabContainers()
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected PageElement addDialogLink

protected PageElement dashboard

protected PageBinder pageBinder

Public Constructors

public GadgetContainer ()

Public Methods

public boolean canAddGadget ()

public Gadget get (String gadgetId)

Equivalent to getGadget(String).

Parameters
gadgetId gadget ID
Returns
  • gadget corresponding to the ID.

public G get (Class<G> gadgetClass, String gadgetId)

Parameters
gadgetClass expected gadget type
gadgetId gadget ID
Returns
  • gadget corresponding to the ID.

public G getByTitle (Class<G> gadgetClass, String gadgetTitle)

Parameters
gadgetClass expected gadget type
gadgetTitle gadget title
Returns
  • gadget with given title.

public 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

public DashboardToolsMenu getDashboardTools ()

public G getGadget (Class<G> gadgetClass, String gadgetId)

public Gadget getGadget (String gadgetId)

public 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

public 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

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

public boolean hasGaddget (String gadgetId)

public boolean hasTabs ()

public AddGadgetDialog openAddGadgetDialog ()

public DashboardToolsMenu openDashboardTools ()

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

Protected Methods

protected PageElement getTabContainer ()

protected List<PageElement> getTabContainers ()