com.atlassian.jira.webtest.framework.impl.selenium.page.dashboard
Class SeleniumDashboardToolsMenu

java.lang.Object
  extended by com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware
      extended by com.atlassian.jira.webtest.framework.impl.selenium.core.AbstractSeleniumPageObject
          extended by com.atlassian.jira.webtest.framework.impl.selenium.core.AbstractLocatorBasedPageObject
              extended by com.atlassian.jira.webtest.framework.impl.selenium.core.component.AbstractSeleniumComponent<Dashboard>
                  extended by com.atlassian.jira.webtest.framework.impl.selenium.page.dashboard.SeleniumDashboardToolsMenu
All Implemented Interfaces:
AjsDropdown<Dashboard>, Component<Dashboard>, Localizable, Openable<AjsDropdown<Dashboard>>, PageObject, DashboardToolsMenu

public class SeleniumDashboardToolsMenu
extends AbstractSeleniumComponent<Dashboard>
implements DashboardToolsMenu

Selenium implementation of DashboardToolsMenu.

Since:
v4.3

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.webtest.framework.page.dashboard.DashboardToolsMenu
DashboardToolsMenu.CloseMode, DashboardToolsMenu.ToolItems
 
Nested classes/interfaces inherited from interface com.atlassian.jira.webtest.framework.component.AjsDropdown
AjsDropdown.Item<R extends PageObject>, AjsDropdown.Section<Q extends PageObject>
 
Field Summary
 
Fields inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware
assertThat, client, context, timeouts
 
Constructor Summary
SeleniumDashboardToolsMenu(Dashboard parent, SeleniumContext ctx)
           
 
Method Summary
 TimedQuery<List<AjsDropdown.Section<Dashboard>>> allSections()
          Get all sections of this drop-down.
 DashboardToolsMenu.CloseMode close()
          Extended close mechanism.
protected  SeleniumLocator detector()
          Main locator of this page object.
 TimedCondition hasItem(String itemText)
          Check if this drop-down has item with given itemText.
 TimedCondition hasSection(String id)
          Check if this drop-down has section with given id.
 TimedCondition isClosed()
          A timed condition that queries, whether this component is currently closed.
 TimedCondition isOpen()
          Checks if this component is open.
 TimedCondition isOpenable()
           Represents a question: is this component capable of being opened in the current test context?
 TimedQuery<AjsDropdown.Item<Dashboard>> item(String text)
          Find first position matching test
 TimedQuery<Integer> itemCount()
          Number of items in this drop-down
 Locator locator()
          Locator unambiguously locating this page object.
 AjsDropdown<Dashboard> open()
           Open this component and return this instance.
 TimedQuery<AjsDropdown.Section<Dashboard>> section(String id)
          Find section with given id.
 TimedQuery<AjsDropdown.Item<Dashboard>> selectedItem()
          Get currently selected position of in the list.
 DashboardItemImpl toolItem(DashboardToolsMenu.ToolItems item)
          Find item of the tools menu.
 
Methods inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.component.AbstractSeleniumComponent
parent
 
Methods inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.AbstractLocatorBasedPageObject
isReady
 
Methods inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.AbstractSeleniumPageObject
body, conditions, css, forClass, id, jQuery, locatorFor, name, queries, waitFor, xpath
 
Methods inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware
context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.webtest.framework.core.component.Component
parent
 
Methods inherited from interface com.atlassian.jira.webtest.framework.core.PageObject
context, isReady
 

Constructor Detail

SeleniumDashboardToolsMenu

public SeleniumDashboardToolsMenu(Dashboard parent,
                                  SeleniumContext ctx)
Method Detail

detector

protected SeleniumLocator detector()
Description copied from class: AbstractLocatorBasedPageObject
Main locator of this page object. Its presence means that this object is ready to be manipulated in the test.

Specified by:
detector in class AbstractLocatorBasedPageObject
Returns:
main locator of this page object

locator

public Locator locator()
Description copied from interface: Localizable
Locator unambiguously locating this page object.

Specified by:
locator in interface Localizable
Returns:
locator

isOpen

public TimedCondition isOpen()
Description copied from interface: Openable
Checks if this component is open.

Specified by:
isOpen in interface Openable<AjsDropdown<Dashboard>>
Returns:
timed condition representing a query if this component is open
See Also:
TimedCondition

isClosed

public TimedCondition isClosed()
Description copied from interface: Openable
A timed condition that queries, whether this component is currently closed.

Specified by:
isClosed in interface Openable<AjsDropdown<Dashboard>>
Returns:
timed condition: is this component closed?
See Also:
TimedCondition

isOpenable

public TimedCondition isOpenable()
Description copied from interface: Openable

Represents a question: is this component capable of being opened in the current test context?

If the returned condition evaluates to true, this component may be safely opened by means of Openable.open().

NOTE: if Openable.isOpen() evaluates to true, this condition will automatically evaluate to false, as it is not possible to open a component that is already open.

Specified by:
isOpenable in interface Openable<AjsDropdown<Dashboard>>
Returns:
timed condition: is this component openable in the current context?

open

public AjsDropdown<Dashboard> open()
Description copied from interface: Openable

Open this component and return this instance.

A pre-condition for this action is that the Openable.isClosed() and Openable.isOpenable() condition is met.

NOTE: this method, like most action methods in the framework, does not verify its results (as opposed to pre-conditions), as in some cases it might be legitimate to attempt to open a component given the test context state deliberately set up to make this attempt fail and then verify that the failure did happen. Thus, invoking clients are responsible for validation results of this action, which may be done by calling Openable.isOpen().

Specified by:
open in interface Openable<AjsDropdown<Dashboard>>
Returns:
timed query for this component's instance

close

public DashboardToolsMenu.CloseMode close()
Description copied from interface: DashboardToolsMenu
Extended close mechanism.

Specified by:
close in interface AjsDropdown<Dashboard>
Specified by:
close in interface DashboardToolsMenu
Returns:
close mode of this tools menu
See Also:
AjsDropdown.close(), AjsDropdown.CloseMode

hasItem

public TimedCondition hasItem(String itemText)
Description copied from interface: AjsDropdown
Check if this drop-down has item with given itemText.

Specified by:
hasItem in interface AjsDropdown<Dashboard>
Parameters:
itemText - text of the position to find
Returns:
condition querying whether a position with given text exists in this drop-down

toolItem

public DashboardItemImpl toolItem(DashboardToolsMenu.ToolItems item)
Description copied from interface: DashboardToolsMenu
Find item of the tools menu.

Specified by:
toolItem in interface DashboardToolsMenu
Parameters:
item - item representation
Returns:
item instance

hasSection

public TimedCondition hasSection(String id)
Description copied from interface: AjsDropdown
Check if this drop-down has section with given id.

Specified by:
hasSection in interface AjsDropdown<Dashboard>
Parameters:
id - unique pag ID of the section to find
Returns:
condition querying whether a section with given ID exists in this drop-down

itemCount

public TimedQuery<Integer> itemCount()
Description copied from interface: AjsDropdown
Number of items in this drop-down

Specified by:
itemCount in interface AjsDropdown<Dashboard>
Returns:
total number of items

section

public TimedQuery<AjsDropdown.Section<Dashboard>> section(String id)
Description copied from interface: AjsDropdown
Find section with given id. Id of the section must be known by the client. Some sections do not have headings, so retrieving sections by their id is impractical.

Specified by:
section in interface AjsDropdown<Dashboard>
Parameters:
id - unique page ID of the section
Returns:
section with given ID, or null, if such section does not exist within this drop-down
See Also:
AjsDropdown.hasItem(String)

allSections

public TimedQuery<List<AjsDropdown.Section<Dashboard>>> allSections()
Description copied from interface: AjsDropdown
Get all sections of this drop-down.

Specified by:
allSections in interface AjsDropdown<Dashboard>
Returns:
list of all sections

item

public TimedQuery<AjsDropdown.Item<Dashboard>> item(String text)
Description copied from interface: AjsDropdown
Find first position matching test

Specified by:
item in interface AjsDropdown<Dashboard>
Parameters:
text - text of the position to find
Returns:
position matching text, or null, if position with given text does not exist in this drop-down
See Also:
AjsDropdown.hasItem(String)

selectedItem

public TimedQuery<AjsDropdown.Item<Dashboard>> selectedItem()
Description copied from interface: AjsDropdown
Get currently selected position of in the list.

Specified by:
selectedItem in interface AjsDropdown<Dashboard>
Returns:
timed query for selected position


Copyright © 2002-2013 Atlassian. All Rights Reserved.