Class GadgetContainer
java.lang.Object
com.atlassian.jira.pageobjects.gadgets.GadgetContainer
The container of gadgets on the dashboard page
- Since:
- v5.1
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.atlassian.pageobjects.elements.PageElementprotected com.atlassian.pageobjects.elements.PageElementprotected com.atlassian.pageobjects.elements.PageElementprotected com.atlassian.pageobjects.PageBinderprotected TimedQueryFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean<G extends it.com.atlassian.gadgets.pages.Gadget>
GEquivalent togetGadget(Class, String).it.com.atlassian.gadgets.pages.GadgetEquivalent togetGadget(String).<G extends it.com.atlassian.gadgets.pages.Gadget>
GgetByTitle(Class<G> gadgetClass, String gadgetTitle) Equivalent togetGadgetByTitle(Class, String).it.com.atlassian.gadgets.pages.GadgetgetByTitle(String gadgetTitle) Equivalent togetGadgetByTitle(String)}.it.com.atlassian.gadgets.pages.DashboardToolsMenu<G extends it.com.atlassian.gadgets.pages.Gadget>
Git.com.atlassian.gadgets.pages.Gadget<G extends it.com.atlassian.gadgets.pages.Gadget>
GgetGadgetByTitle(Class<G> gadgetClass, String gadgetTitle) Get gadget of given type by it's title as visible on the dashboard.it.com.atlassian.gadgets.pages.GadgetgetGadgetByTitle(String gadgetTitle) Get gadget by it's title as visible on the dashboard.Login gadget is always on the Dashboard if not logged in.protected com.atlassian.pageobjects.elements.PageElementprotected List<com.atlassian.pageobjects.elements.PageElement> booleanbooleanhasTabs()it.com.atlassian.gadgets.pages.AddGadgetDialogit.com.atlassian.gadgets.pages.DashboardToolsMenuswitchDashboard(String dashboardName) Switches dashboard using the side tabs.void
-
Field Details
-
pageBinder
@Inject protected com.atlassian.pageobjects.PageBinder pageBinder -
timedQueryFactory
-
addDialogLink
protected com.atlassian.pageobjects.elements.PageElement addDialogLink -
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
-
hasTabs
public boolean hasTabs() -
canAddGadget
public boolean canAddGadget() -
openAddGadgetDialog
public it.com.atlassian.gadgets.pages.AddGadgetDialog openAddGadgetDialog() -
getLoginGadget
Login gadget is always on the Dashboard if not logged in.- Returns:
- Login gadget
- Throws:
IllegalStateException- if an user is logged in
-
hasGadget
-
getGadget
-
getGadget
-
get
Equivalent togetGadget(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) Equivalent togetGadget(Class, String).- Parameters:
gadgetClass- expected gadget typegadgetId- gadget ID- Returns:
- gadget corresponding to the ID.
-
getGadgetByTitle
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 typegadgetTitle- title of the gadget- Returns:
- gadget of given type with given title
- Throws:
IllegalArgumentException- if gadget with given title does not exist
-
getByTitle
Equivalent togetGadgetByTitle(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) Equivalent togetGadgetByTitle(Class, String).- Parameters:
gadgetClass- expected gadget typegadgetTitle- 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
Switches dashboard using the side tabs. This will only work ifhasTabs()returnstrue.- 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()
-