org.kuali.hr.time.workflow
Class TimesheetWebTestBase

java.lang.Object
  extended by org.kuali.rice.test.BaseRiceTestCase
      extended by org.kuali.rice.test.RiceTestCase
          extended by org.kuali.rice.test.RiceInternalSuiteDataTestCase
              extended by org.kuali.hr.KPMEWebTestCase
                  extended by org.kuali.hr.time.workflow.TimesheetWebTestBase
All Implemented Interfaces:
org.kuali.rice.test.MethodAware
Direct Known Subclasses:
DailyOvertimeWebIntegrationTest, DOTIntegrationConfluenceTests, RoleTimesheetWebIntegrationTest, TimesheetIntegrationTest, TimesheetWorkflowIntegrationTest

public class TimesheetWebTestBase
extends KPMEWebTestCase


Nested Class Summary
 
Nested classes/interfaces inherited from class org.kuali.hr.KPMEWebTestCase
KPMEWebTestCase.ClearCacheLifecycle
 
Field Summary
static String BASE_DETAIL_URL
           
static org.joda.time.DateTime JAN_AS_OF_DATE
           
static String USER_PRINCIPAL_ID
           
 
Fields inherited from class org.kuali.rice.test.RiceTestCase
DEFAULT_TEST_HARNESS_SPRING_BEANS, failedSuiteTestName, perTestLifeCycles, SUITE_LIFE_CYCLES_FAILED, SUITE_LIFE_CYCLES_RAN, suiteLifeCycles
 
Fields inherited from class org.kuali.rice.test.BaseRiceTestCase
log, method
 
Constructor Summary
TimesheetWebTestBase()
           
 
Method Summary
static boolean checkJSONValues(org.json.simple.JSONObject json, List<Map<String,Object>> thdList, Map<String,Object> checkValues)
          Examines the JSON structure that is written to each output TimeDetails page.
static boolean checkJSONValues(String json, List<Map<String,Object>> thdList, Map<String,Object> checkValues)
           
static String getTargetedTimesheetDocumentUrl(String tdocId, String targetUser)
           
static String getTimesheetDocumentUrl(String tdocId)
           
static com.gargoylesoftware.htmlunit.html.HtmlPage loginAndGetTimeDetailsHtmlPage(com.gargoylesoftware.htmlunit.WebClient webClient, String principalId, String tdocId, boolean assertValid)
          Uses an ID hack to manipulate the current Test user Login.
 void setUp()
           
 void tearDown()
           
 
Methods inherited from class org.kuali.hr.KPMEWebTestCase
getBaseURL, getContext, getModuleName, getPerTestLifecycles, getPort, getSuiteLifecycles, getTempDir, getWebClient, setWebClient
 
Methods inherited from class org.kuali.rice.test.RiceInternalSuiteDataTestCase
getKIMDataLoadOrderFile, getKIMSqlFileBaseLocation, getKRADDefaultSuiteTestData, loadSuiteTestData
 
Methods inherited from class org.kuali.rice.test.RiceTestCase
configureLogging, dumpMemory, getBaseDir, getConfigLocations, getFullTestName, getLoadApplicationLifecycle, getModuleTestConfigLocation, getRiceMasterDefaultConfigFile, getTestHarnessConfig, getTestHarnessSpringBeansLocation, getTestHarnessSpringResourceLoader, getUserDir, loadPerTestData, logAfterRun, logBeforeRun, report, setBaseDirSystemProperty, setClearTables, setModuleName, setUpInternal, startLifecycles, startSuiteDataLoaderLifecycles, stopLifecycles
 
Methods inherited from class org.kuali.rice.test.BaseRiceTestCase
getName, getPerTestDataLoaderLifecycle, resetLogLevels, setLogLevel, setName, setTestMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAN_AS_OF_DATE

public static final org.joda.time.DateTime JAN_AS_OF_DATE

USER_PRINCIPAL_ID

public static final String USER_PRINCIPAL_ID
See Also:
Constant Field Values

BASE_DETAIL_URL

public static String BASE_DETAIL_URL
Constructor Detail

TimesheetWebTestBase

public TimesheetWebTestBase()
Method Detail

setUp

public void setUp()
           throws Exception
Overrides:
setUp in class KPMEWebTestCase
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Overrides:
tearDown in class KPMEWebTestCase
Throws:
Exception

getTimesheetDocumentUrl

public static String getTimesheetDocumentUrl(String tdocId)

getTargetedTimesheetDocumentUrl

public static String getTargetedTimesheetDocumentUrl(String tdocId,
                                                     String targetUser)

loginAndGetTimeDetailsHtmlPage

public static com.gargoylesoftware.htmlunit.html.HtmlPage loginAndGetTimeDetailsHtmlPage(com.gargoylesoftware.htmlunit.WebClient webClient,
                                                                                         String principalId,
                                                                                         String tdocId,
                                                                                         boolean assertValid)
                                                                                  throws Exception
Uses an ID hack to manipulate the current Test user Login.

Throws:
Exception

checkJSONValues

public static boolean checkJSONValues(org.json.simple.JSONObject json,
                                      List<Map<String,Object>> thdList,
                                      Map<String,Object> checkValues)
Examines the JSON structure that is written to each output TimeDetails page.

Parameters:
json - The JSON Object to examine
thdList - The (optional) list of Time Hour Details values
checkValues - The list of values to check for in the JSON object
Returns:
true if the JSON object contains the required values, false otherwise.

checkJSONValues

public static boolean checkJSONValues(String json,
                                      List<Map<String,Object>> thdList,
                                      Map<String,Object> checkValues)


Copyright © 2004-2014 The Kuali Foundation. All Rights Reserved.