com.atlassian.jira.webtest.selenium.framework.components
Class MultiSelectSuggestions<T extends com.atlassian.jira.webtest.selenium.framework.components.MultiSelect>

java.lang.Object
  extended by com.atlassian.jira.webtest.selenium.framework.core.AbstractSeleniumPageObject
      extended by com.atlassian.jira.webtest.selenium.framework.components.MultiSelectSuggestions<T>
All Implemented Interfaces:
PageObject
Direct Known Subclasses:
IssuePicker.IssuePickerSuggestions

public class MultiSelectSuggestions<T extends com.atlassian.jira.webtest.selenium.framework.components.MultiSelect>
extends AbstractSeleniumPageObject
implements PageObject

Suggestions component of the AUI MultiSelect.

Since:
v4.2

Field Summary
 
Fields inherited from class com.atlassian.jira.webtest.selenium.framework.core.AbstractSeleniumPageObject
assertThat, client, context
 
Method Summary
 void assertClosed()
          Assert that this suggestions drop-down is closed.
 void assertClosed(int timeout)
          Assert that this suggestions drop-down is closed by a specific timeout.
 void assertContains(String suggestion, String... moreSuggestions)
          Assert that this suggestions contain given suggestion in any place, that is in any group, or as a first-level suggestion (not contained in any group).
 void assertContains(String group, String suggestion)
           
 void assertContainsGroup(String group)
           
 void assertDisplayedIssueCountEquals(String suggestionGroup, int expected)
           
 void assertDoesNotContain(String suggestion, String... moreSuggestions)
          Assert that this suggestions component does not contain given suggestion at all - that is suggestion in any group, or a first-level suggestion (not contained in any group).
 void assertDoesNotContain(String group, String suggestion)
          Assert that this suggestions component does not contain given suggestion in given group.
 void assertNoMatches()
          Asserts for a special case, where a 'No Matches' string is displayed without a group.
 void assertOpen()
          Assert that this suggestions drop-down is open.
 void assertOpen(int timeout)
          Assert that this suggestions drop-down is open by a specific timeout..
 void assertReady(long timeout)
          Assert that this object is loaded and ready to be exercised by Selenium.
 void assertSelected(String group, String suggestion)
          Assert that given suggestion in given group is selected.
 void assertTotalIssueCountEquals(String suggestionGroup, int expected)
           
 T closeByEscape()
           
 boolean containsGroup(String groupName)
           
 int displayedIssueCount(String suggestionGroup)
           
 MultiSelectSuggestions<T> down()
           
 String groupHeaderDescriptionLocator(String group)
           
 String groupHeaderDescriptionText(String suggestionGroup)
           
 String groupHeaderLocator(String group)
          Locator of the group header of given suggestion group.
 boolean isOpen()
          Checks that this suggestions drop-down is open.
 String locator()
           
 String locatorWithin(String jQueryLocator)
           
 String noMatchesLocator()
          Locator for 'No Matches' case in suggestions drop-down.
 String selectedSuggestionLocator(String group, String suggestionValue)
          Locator for a currently selected suggestion in a particular group.
 String suggestionGroupLocator(String group)
           
 String suggestionInGroupLocator(String group, String suggestionValue)
          Locator for suggestion in a particular group.
 String suggestionLocator(String suggestionValue)
          Locator for suggestion in any group, or without a group.
 int totalIssueCount(String suggestionGroup)
           
 MultiSelectSuggestions<T> up()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

locator

public String locator()

locatorWithin

public String locatorWithin(String jQueryLocator)

suggestionGroupLocator

public String suggestionGroupLocator(String group)

suggestionInGroupLocator

public String suggestionInGroupLocator(String group,
                                       String suggestionValue)
Locator for suggestion in a particular group.

Parameters:
group - suggestion group, in which the suggestion should appear
suggestionValue - suggestion text
Returns:
locator for given suggestion and group

suggestionLocator

public String suggestionLocator(String suggestionValue)
Locator for suggestion in any group, or without a group.

Parameters:
suggestionValue - suggestion text
Returns:
locator for given suggestion

noMatchesLocator

public String noMatchesLocator()
Locator for 'No Matches' case in suggestions drop-down.

Returns:
locator for given suggestion

selectedSuggestionLocator

public String selectedSuggestionLocator(String group,
                                        String suggestionValue)
Locator for a currently selected suggestion in a particular group.

Parameters:
group - suggestion group, in which the selected suggestion should appear
suggestionValue - selected suggestion text
Returns:
locator for selected suggestion with given parameters

groupHeaderLocator

public String groupHeaderLocator(String group)
Locator of the group header of given suggestion group.

Parameters:
group - suggestion group to find
Returns:
locator of the given suggestion group header

groupHeaderDescriptionLocator

public String groupHeaderDescriptionLocator(String group)

groupHeaderDescriptionText

public String groupHeaderDescriptionText(String suggestionGroup)

displayedIssueCount

public int displayedIssueCount(String suggestionGroup)

totalIssueCount

public int totalIssueCount(String suggestionGroup)

isOpen

public boolean isOpen()
Checks that this suggestions drop-down is open.

Returns:
true, if this drop down is open, false otherwise

containsGroup

public boolean containsGroup(String groupName)

up

public MultiSelectSuggestions<T> up()

down

public MultiSelectSuggestions<T> down()

closeByEscape

public T closeByEscape()

assertReady

public void assertReady(long timeout)
Assert that this object is loaded and ready to be exercised by Selenium.

Specified by:
assertReady in interface PageObject
Parameters:
timeout - timeout to wait

assertOpen

public void assertOpen()
Assert that this suggestions drop-down is open.


assertOpen

public void assertOpen(int timeout)
Assert that this suggestions drop-down is open by a specific timeout..

Parameters:
timeout - timeout to wait

assertClosed

public void assertClosed()
Assert that this suggestions drop-down is closed.


assertClosed

public void assertClosed(int timeout)
Assert that this suggestions drop-down is closed by a specific timeout.

Parameters:
timeout - timeout to wait

assertContainsGroup

public void assertContainsGroup(String group)

assertContains

public void assertContains(String group,
                           String suggestion)

assertContains

public void assertContains(String suggestion,
                           String... moreSuggestions)
Assert that this suggestions contain given suggestion in any place, that is in any group, or as a first-level suggestion (not contained in any group).

Parameters:
suggestion - suggestion value to check
moreSuggestions - optional suggestions to check

assertNoMatches

public void assertNoMatches()
Asserts for a special case, where a 'No Matches' string is displayed without a group.


assertSelected

public void assertSelected(String group,
                           String suggestion)
Assert that given suggestion in given group is selected.

Parameters:
group - group
suggestion - suggestion text value

assertDoesNotContain

public void assertDoesNotContain(String group,
                                 String suggestion)
Assert that this suggestions component does not contain given suggestion in given group.

Parameters:
group - group to check
suggestion - suggestion value to check

assertDoesNotContain

public void assertDoesNotContain(String suggestion,
                                 String... moreSuggestions)
Assert that this suggestions component does not contain given suggestion at all - that is suggestion in any group, or a first-level suggestion (not contained in any group).

Parameters:
suggestion - suggestion value to check
moreSuggestions - optional suggestions to check

assertDisplayedIssueCountEquals

public void assertDisplayedIssueCountEquals(String suggestionGroup,
                                            int expected)

assertTotalIssueCountEquals

public void assertTotalIssueCountEquals(String suggestionGroup,
                                        int expected)


Copyright © 2002-2012 Atlassian. All Rights Reserved.