edu.samplu.common
Class FreemarkerSTBase

java.lang.Object
  extended by edu.samplu.common.WebDriverLegacyITBase
      extended by edu.samplu.common.FreemarkerSTBase
All Implemented Interfaces:
Failable
Direct Known Subclasses:
NeustarJSTemplate, XMLIngesterAbstractSmokeTestBase

public abstract class FreemarkerSTBase
extends WebDriverLegacyITBase

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
FreemarkerUtil

Field Summary
protected  freemarker.template.Configuration cfg
           
protected  org.apache.log4j.Logger LOG
           
 
Fields inherited from class edu.samplu.common.WebDriverLegacyITBase
ADMINISTRATION_LINK_TEXT, AGENDA_LOOKUP_LINK_TEXT, ARIA_INVALID_XPATH, BLANKET_APPROVE_NAME, CANCEL_NAME, CANCEL2_XPATH, CLOSE_WINDOW_XPATH_TITLE, COLLECTIONS_LINK_TEXT, CONFIGURATION_VIEW_WINDOW_TITLE, CONFIGURATION_VIEW_XPATH, COPY_LINK_TEXT, CREATE_NEW_DOCUMENT_NOT_SUBMITTED_SUCCESSFULLY_MESSAGE_TEXT, CREATE_NEW_XPATH, DEFAULT_WAIT_SEC, DIV_LEFT_ERRMSG, DOC_CODE_XPATH, DOC_DESCRIPTION_XPATH, DOC_ID_XPATH, DOC_ID_XPATH_2, DOC_ID_XPATH_3, DOC_SEARCH_XPATH, DOC_SEARCH_XPATH_TITLE, DOC_STATUS_ENROUTE, DOC_STATUS_FINAL, DOC_STATUS_SAVED, DOC_STATUS_XPATH, DOC_STATUS_XPATH_2, DOC_SUBMIT_SUCCESS_MSG_XPATH, driver, EDIT_LINK_TEXT, FISCAL_OFFICER_INFO_MAINTENANCE_NEW_XPATH, IFRAMEPORTLET_NAME, jGrowlHeader, KITCHEN_SINK_XPATH, KRAD_XPATH, KUALI_COLLECTION_TOTALLING_WINDOW_XPATH, KUALI_COLLECTION_TOTALLING_XPATH, KUALI_UIF_COMPONENTS_WINDOW_XPATH, KUALI_VIEW_WINDOW_TITLE, LOGOUT_XPATH, MAIN_MENU_LINK_TEXT, passed, REGEX_ERROR, REGEX_VALID, REMOTE_LOGIN_UIF, REMOTE_PUBLIC_USER_PROPERTY, REMOTE_PUBLIC_USERPOOL_PROPERTY, REMOTE_PUBLIC_WAIT_SECONDS_PROPERTY, RETURN_VALUE_LINK_TEXT, RICH_MESSAGES_WINDOW_TITLE, SAVE_SUCCESSFUL_XPATH, SAVE_XPATH, SAVE_XPATH_2, SAVE_XPATH_3, SEARCH_XPATH, SEARCH_XPATH_2, SEARCH_XPATH_3, SUB_COLLECTION_UIF_DISCLOSURE_SPAN_UIF_HEADER_TEXT_SPAN_XPATH, SUBMIT_XPATH, testMethodName, testName, TIMEOUT_MESSAGE, TRAVEL_ACCOUNT_LOOKUP_LINK_TEXT, UIF_COMPONENTS_KITCHEN_SINK_LINK_TEXT, uiFramework, user, VALIDATION_FRAMEWORK_DEMO_XPATH, waitSeconds, XML_INGESTER_LINK_TEXT
 
Constructor Summary
FreemarkerSTBase()
           
 
Method Summary
 File ftlWrite(File output, freemarker.template.Template template, InputStream inputStream)
          Calls ftlWrite that also accepts a key, using the output getName as the key.
protected abstract  String getTemplateDir()
           
protected  Properties loadProperties(String fileLocation, String resourceLocation)
          TODO can we cut this down to one param? FreemarkerUtil.loadProperties(java.io.InputStream)
protected  void systemPropertiesOverride(Properties props, String key)
          FreemarkerUtil.systemPropertiesOverride(java.util.Properties, String)
 void testSetUp()
          Setup the WebDriver properties, test, and login.
protected static File writeTemplateToFile(File file, freemarker.template.Template template, Properties props)
          FreemarkerUtil.writeTemplateToFile(java.io.File, freemarker.template.Template, java.util.Properties)
 
Methods inherited from class edu.samplu.common.WebDriverLegacyITBase
agendaLookupAssertions, alertAccept, alertDismiss, assertAttributeClassRegexDoesntMatch, assertAttributeClassRegexMatches, assertBlanketApproveButtonsPresent, assertCancelConfirmation, assertDocFinal, assertDocumentStatusSaved, assertElementPresent, assertElementPresentByLinkText, assertElementPresentByName, assertElementPresentByName, assertElementPresentByXpath, assertElementPresentByXpath, assertFocusTypeBlurError, assertFocusTypeBlurError, assertFocusTypeBlurValid, assertFocusTypeBlurValid, assertFocusTypeBlurValidation, assertIsNotVisible, assertIsNotVisibleByXpath, assertIsVisible, assertIsVisibleByXpath, assertPopUpWindowUrl, assertTableLayout, assertTextNotPresent, assertTextNotPresent, assertTextPresent, assertTextPresent, assertTextPresent, back, blanketApproveTest, check, checkByName, checkByXpath, checkErrorMessageItem, checkForDocError, checkForIncidentReport, checkForIncidentReport, checkForIncidentReport, checkForIncidentReport, chromeDriverService, clearText, clearText, clearTextByName, clearTextByXpath, close, colapseExpandByXpath, configNameSpaceBlanketApprove, confirmAddLineControlsPresent, contextLookupAssertions, expandColapseByXpath, failableFail, findVisibleElements, fireEvent, fireEvent, fireMouseOverEvent, fireMouseOverEventByName, fireMouseOverEventByXpath, getAllWindowTitles, getAttribute, getAttributeByName, getAttributeByXpath, getBaseUrlString, getCssCount, getCssCount, getDocStatus, getElementByAttribute, getElementByAttributeValue, getElementByDataAttribute, getElementByDataAttributeValue, getSelectOptions, getSelectOptionsByName, getSelectOptionsByXpath, getSessionId, getTestUrl, getText, getText, getTextByClassName, getTextById, getTextByName, getTextByXpath, getTitle, getUiFramework, getUserName, gotoNestedFrame, hasDocError, hasDocError, howManyAreVisible, isElementPresent, isElementPresent, isElementPresentByDataAttributeValue, isElementPresentByLinkText, isElementPresentByName, isElementPresentByXpath, isKrad, isKradLogin, isTextPresent, isVisible, isVisible, isVisible, isVisibleById, isVisibleByXpath, jGrowl, jGrowlSticky, jiraAwareWaitAndClick, jiraAwareWaitAndClick, jiraAwareWaitFor, jiraAwareWaitFor, navigateInternal, open, passed, performParameterInquiry, select, selectByName, selectByXpath, selectFrame, selectFrameIframePortlet, selectOption, selectOptionByName, selectOptionByXpath, selectTopFrame, selectWindow, setUiFramework, startSession, switchToWindow, tearDown, testActionColumnPlacement, testAddBlankLine, testAddingBrownGroup, testAddingNamespace, testAddingNamespace, testAddLineAllDay, testAddLineWithAllDay, testAddLineWithSpecificTime, testAddViaLightbox, testAgendaEditRuleRefreshIT, testAttributeDefinitionLookUp, testCancelConfirmation, testCategoryLookUp, testCollectionTotalling, testColumnSequence, testConfigParamaterBlanketApprove, testConfigurationTestView, testCopyComponent, testCopyParameter, testCopyParameterType, testCreateDocType, testCreateNewAgenda, testCreateNewCancel, testCreateNewComponent, testCreateNewComponent, testCreateNewParameter, testCreateNewParameterType, testCreateNewPermission, testCreateNewPerson, testCreateNewRRDTravelRequestDestRouting, testCreateNewSearchReturnValueCancelConfirmation, testCreateSampleEDocLite, testDefaultTestsTableLayout, testDisplayOnlyExternalHelp2, testDisplayOnlyTooltipHelp, testDocTypeLookup, testEditComponent, testEditParameter, testEditParameterType, testEditPermission, testEditRouteRulesDelegation, testExternalHelp2, testFiscalOfficerInfoMaintenanceNew, testIdentityGroupBlanketApprove, testIdentityPermissionBlanketApprove, testIdentityPersonBlanketApprove, testIdentityResponsibilityBlanketApprove, testIdentityRoleBlanketApprove, testIfRowHasBeenAdded, testLocationCampusBlanketApprove, testLocationCountryBlanketApprove, testLocationCountyBlanketApprove, testLocationPostBlanketApprove, testLocationStateBlanketApprove, testLookUp, testLookUpComponent, testLookUpParameter, testLookUpParameterType, testLookUpPermission, testLookUpPerson, testMissingExternalHelp2, testMissingTooltipHelp, testPageHelp, testPeopleFlow, testReferenceCampusTypeBlanketApprove, testSearchEditCancel, testSequencerow, testServerErrorsIT, testServerInfoIT, testServerWarningsIT, testSubCollectionSize, testTermLookUp, testTermLookupAssertions, testTermSpecificationLookupAssertions, testTooltipHelp, testUifTooltip, testValidCharsConstraintIT, testVerifyAddDeleteFiscalOfficerLegacy, testVerifyAddDeleteNoteLegacy, testVerifyAdHocRecipientsLegacy, testVerifyButtonsLegacy, testVerifyConstraintText, testVerifyCopyComponent, testVerifyCopyParameterType, testVerifyDisclosures, testVerifyDocumentOverviewLegacy, testVerifyEditedComponent, testVerifyExpandCollapse, testVerifyFieldsLegacy, testVerifyHeaderFieldsLegacy, testVerifyLookupAddMultipleLinesLegacy, testVerifyModifiedParameter, testVerifyNotesAndAttachments, testVerifyPermission, testVerifyPerson, testVerifyQuickfinderIconsLegacy, testVerifyRouteLog, testVerifySave, testVerifySubsidizedPercentWatermarkLegacy, testViewHelp, testViewHelp2, testWorkFlowDocTypeBlanketApprove, testWorkFlowRouteRulesBlanketApp, testWorkFlowRouteRulesCreateNew, testWorkFlowRouteRulesEditRouteRules, uncheck, uncheckByName, uncheckByXpath, validateErrorImage, verifyRichMessagesValidationAdvancedFunctionality, verifyRichMessagesValidationBasicFunctionality, verifyRichMessagesValidationLettersNumbersValidation, verifyRichMessagesValidationLinkDeclarationsFunctionality, verifyRichMessagesValidationRadioAndCheckBoxGroupFunctionality, waitAndCancelConfirmation, waitAndClick, waitAndClick, waitAndClick, waitAndClick, waitAndClickAdministration, waitAndClickButtonByText, waitAndClickById, waitAndClickById, waitAndClickByLinkText, waitAndClickByLinkText, waitAndClickByLinkText, waitAndClickByLinkText, waitAndClickByName, waitAndClickByName, waitAndClickByXpath, waitAndClickByXpath, waitAndClickByXpath, waitAndClickCancel, waitAndClickCloseWindow, waitAndClickCopy, waitAndClickCreateNew, waitAndClickDocSearch, waitAndClickDocSearchTitle, waitAndClickEdit, waitAndClickKRAD, waitAndClickLogout, waitAndClickLogout, waitAndClickMainMenu, waitAndClickReturnValue, waitAndClickSave, waitAndClickSearch2, waitAndClickSearch3, waitAndClickSubmit, waitAndClickXMLIngester, waitAndCreateNew, waitAndType, waitAndType, waitAndType, waitAndTypeByName, waitAndTypeByXpath, waitAndTypeByXpath, waitAreAnyVisible, waitFor, waitFor, waitForDocId, waitForElementPresent, waitForElementPresent, waitForElementPresentByClassName, waitForElementPresentByClassName, waitForElementPresentById, waitForElementPresentByName, waitForElementPresentByXpath, waitForElementVisible, waitForPageToLoad, waitForTitleToEqualKualiPortalIndex, waitForTitleToEqualKualiPortalIndex, waitIsVisible, waitIsVisible, waitIsVisible, waitIsVisibleByXpath, waitIsVisibleByXpath, waitNotVisible, waitNotVisibleByXpath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.samplu.common.Failable
fail
 

Field Detail

LOG

protected final org.apache.log4j.Logger LOG

cfg

protected freemarker.template.Configuration cfg
Constructor Detail

FreemarkerSTBase

public FreemarkerSTBase()
Method Detail

getTemplateDir

protected abstract String getTemplateDir()

testSetUp

public void testSetUp()
Description copied from class: WebDriverLegacyITBase
Setup the WebDriver properties, test, and login. Named testSetUp so it runs after TestNG's startSession(Method) WebDriverUtil.determineUser(String) WebDriverUtil.setUp(String, String, String, String)

Overrides:
testSetUp in class WebDriverLegacyITBase

ftlWrite

public File ftlWrite(File output,
                     freemarker.template.Template template,
                     InputStream inputStream)
              throws IOException,
                     freemarker.template.TemplateException
Calls ftlWrite that also accepts a key, using the output getName as the key. FreemarkerUtil.ftlWrite(java.io.File, freemarker.template.Template, java.io.InputStream)

Parameters:
output -
template -
Returns:
Throws:
IOException
freemarker.template.TemplateException

loadProperties

protected Properties loadProperties(String fileLocation,
                                    String resourceLocation)
                             throws IOException
TODO can we cut this down to one param? FreemarkerUtil.loadProperties(java.io.InputStream)

Parameters:
fileLocation - null means use resourceLocation
resourceLocation -
Returns:
Throws:
IOException

systemPropertiesOverride

protected void systemPropertiesOverride(Properties props,
                                        String key)
FreemarkerUtil.systemPropertiesOverride(java.util.Properties, String)

Parameters:
props -
key -

writeTemplateToFile

protected static File writeTemplateToFile(File file,
                                          freemarker.template.Template template,
                                          Properties props)
                                   throws IOException,
                                          freemarker.template.TemplateException
FreemarkerUtil.writeTemplateToFile(java.io.File, freemarker.template.Template, java.util.Properties)

Parameters:
file -
template -
props -
Returns:
Throws:
IOException
freemarker.template.TemplateException


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.