com.atlassian.jira.webtest.selenium.ajaxuserpicker
Class AbstractTestAjaxUserPicker

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.atlassian.selenium.SeleniumTest
              extended by com.atlassian.jira.webtest.selenium.JiraSeleniumTest
                  extended by com.atlassian.jira.webtest.selenium.ajaxuserpicker.AbstractTestAjaxUserPicker
All Implemented Interfaces:
EnvironmentAware, com.atlassian.performance.junit.PerformanceTest, junit.framework.Test
Direct Known Subclasses:
TestIssueLevelSecurityUserPicker, TestIssueUserPicker, TestNotificationsUserPicker, TestPermissionsUserPicker

public abstract class AbstractTestAjaxUserPicker
extends JiraSeleniumTest


Nested Class Summary
 
Nested classes/interfaces inherited from class com.atlassian.jira.webtest.selenium.JiraSeleniumTest
JiraSeleniumTest.Check
 
Field Summary
protected static String ITEM_KEY
           
protected static String MULTI_CUSTOM_FIELD
           
protected static String MULTI_CUSTOM_FIELD_KEY
           
protected static String NOUSERPICKERUSER
           
protected static String READY_DROPDOWN_LOCATOR_TEMPLATE
           
 
Fields inherited from class com.atlassian.jira.webtest.selenium.JiraSeleniumTest
ADMIN_PASSWORD, ADMIN_USERNAME, backdoor, DROP_DOWN_WAIT, environmentData, HSP_1, logger, MKY_1, PAGE_LOAD_WAIT, PAGE_LOAD_WAIT_TIME, PRESENT_TO_VISIBLE_DELAY, VK_DOWN, VK_ESC, VK_UP
 
Fields inherited from class com.atlassian.selenium.SeleniumTest
assertThat, client, config, recorder
 
Constructor Summary
AbstractTestAjaxUserPicker()
           
 
Method Summary
protected  void assertUsersShown(String key, String[] shownUsers)
          Asserts tthat a set of users in the know set are present and that the other knows users ARE not present
protected  void commonNegativeACAsserts(String fieldId)
           
protected  void commonPostiveACAsserts(String fieldId)
           
protected  TimedCondition dropDownReadyCondition(String fieldId)
           
 String getCurrentSelectedACKey()
           
protected  boolean isVisibleACDropDown(String fieldId)
           
protected  void notPermittedACAsserts(String fieldId)
           
 void onSetUp()
           
protected  void restoreAjaxUserPickerData()
          Restore data specific to this test.
protected  void testNotPermittedSimpleUserPicker(String fieldId)
           
protected  void testSimpleUserPicker(String fieldId)
           
protected  void waitForACDropDown(String fieldId, int maxMillis)
          Waits until the AC drop down is made visible or until the timeout finishes.
protected  void waitForACDropDownNotAppear(String fieldId, int maxMillis)
           
 
Methods inherited from class com.atlassian.jira.webtest.selenium.JiraSeleniumTest
assertFalse, assertFalse, assertTrue, assertTrue, backgroundLogout, context, getAdministration, getBackdoor, getEnvironmentData, getNavigator, getSeleniumConfiguration, getUserPreferences, getWebUnitTest, getXsrfToken, globalPages, internalSetup, isBeforeJdk15, isKickAssEnabled, isUserAgentFirefox, log, onTearDown, restoreBlankInstance, restoreData, restoreData, restoreData, restoreDataWithPluginsReload, restoreDataWithReplacedTokens, restoreI18nData, restoreUnsetupJIRA, restoreViaBackdoor, restoreViaBackdoorAndGoToDashboard, runBare, runBareTestCase, selectMainWindow, setEnvironmentData, setSeleniumTestListener, suiteFor, timeouts, turnOffProfiling, turnOnProfiling, visibleByTimeoutWithDelay, waitFor, waitForContentUpdate, waitForRestore
 
Methods inherited from class com.atlassian.selenium.SeleniumTest
getRecorder, getSeleniumClient, setUp, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface junit.framework.Test
countTestCases, run
 

Field Detail

NOUSERPICKERUSER

protected static final String NOUSERPICKERUSER
See Also:
Constant Field Values

MULTI_CUSTOM_FIELD

protected static final String MULTI_CUSTOM_FIELD
See Also:
Constant Field Values

ITEM_KEY

protected static final String ITEM_KEY
See Also:
Constant Field Values

MULTI_CUSTOM_FIELD_KEY

protected static final String MULTI_CUSTOM_FIELD_KEY
See Also:
Constant Field Values

READY_DROPDOWN_LOCATOR_TEMPLATE

protected static final String READY_DROPDOWN_LOCATOR_TEMPLATE
See Also:
Constant Field Values
Constructor Detail

AbstractTestAjaxUserPicker

public AbstractTestAjaxUserPicker()
Method Detail

onSetUp

public void onSetUp()
Overrides:
onSetUp in class JiraSeleniumTest

restoreAjaxUserPickerData

protected void restoreAjaxUserPickerData()
Restore data specific to this test.


assertUsersShown

protected void assertUsersShown(String key,
                                String[] shownUsers)
Asserts tthat a set of users in the know set are present and that the other knows users ARE not present

Parameters:
key - the key prefix
shownUsers - the users to check for

waitForACDropDown

protected void waitForACDropDown(String fieldId,
                                 int maxMillis)
Waits until the AC drop down is made visible or until the timeout finishes. Does its work queitly.

Parameters:
fieldId - the JIRA form field name
maxMillis - the time to wait

waitForACDropDownNotAppear

protected void waitForACDropDownNotAppear(String fieldId,
                                          int maxMillis)

isVisibleACDropDown

protected boolean isVisibleACDropDown(String fieldId)
Parameters:
fieldId - - the JIRA field name
Returns:
true if the AC drop down is visible

dropDownReadyCondition

protected TimedCondition dropDownReadyCondition(String fieldId)

getCurrentSelectedACKey

public String getCurrentSelectedACKey()
Returns:
the LI of the currently selected AC item eg with 'yui-ac-highlight' or null

testNotPermittedSimpleUserPicker

protected void testNotPermittedSimpleUserPicker(String fieldId)

testSimpleUserPicker

protected void testSimpleUserPicker(String fieldId)

commonNegativeACAsserts

protected void commonNegativeACAsserts(String fieldId)

notPermittedACAsserts

protected void notPermittedACAsserts(String fieldId)

commonPostiveACAsserts

protected void commonPostiveACAsserts(String fieldId)


Copyright © 2002-2013 Atlassian. All Rights Reserved.