/** @author Kuali Rice Team ([email protected]) */ public class RuleAttributeAft extends WebDriverLegacyITBase { /** * AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=Rule%20Attribute&channelUrl="+ * WebDriverUtils .getBaseUrlString()+" * /kr/lookup.do?businessObjectClassName=org.kuali.rice.kew.rule.bo.RuleAttribute&docFormKey=88888888&returnLocation=" * + AutomatedFunctionalTestUtils.PORTAL_URL+ AutomatedFunctionalTestUtils.HIDE_RETURN_LINK; */ public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Rule%20Attribute&channelUrl=" + WebDriverUtils.getBaseUrlString() + "/kr/lookup.do?businessObjectClassName=org.kuali.rice.kew.rule.bo.RuleAttribute&docFormKey=88888888&returnLocation=" + AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK; @Override protected String getBookmarkUrl() { return BOOKMARK_URL; } @Override protected void navigate() throws InterruptedException { waitAndClickAdministration(); waitAndClickByLinkText("Rule Attribute"); } protected void testRuleAttribute() throws Exception { selectFrameIframePortlet(); waitAndClickSearch(); Thread.sleep(2000); assertTextPresent("1000"); assertTextPresent("RuleRoutingAttribute"); selectByName("type", "Rule Xml Attribute"); waitAndClickSearch(); Thread.sleep(2000); assertTextPresent("1100"); assertTextPresent("EDL.Campus.Example"); assertTextPresent("RuleXmlAttribute"); if (isTextPresent("1000")) { jiraAwareFail("Select Filter not working !"); } } @Test public void testRuleAttributeBookmark() throws Exception { testRuleAttribute(); passed(); } @Test public void testRuleAttributeNav() throws Exception { testRuleAttribute(); passed(); } }
/** @author Kuali Rice Team ([email protected]) */ public abstract class LocationCountryAftBase extends AdminTmplMthdAftNavBase { /** * ITUtil.PORTAL + "?channelTitle=Country&channelUrl=" + WebDriverUtils.getBaseUrlString() + * ITUtil.KNS_LOOKUP_METHOD + * "org.kuali.rice.location.impl.country.CountryBo&docFormKey=88888888&returnLocation=" + * ITUtil.PORTAL_URL + ITUtil.HIDE_RETURN_LINK; */ public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Country&channelUrl=" + WebDriverUtils.getBaseUrlString() + AutomatedFunctionalTestUtils.KNS_LOOKUP_METHOD + "org.kuali.rice.location.impl.country.CountryBo&docFormKey=88888888&returnLocation=" + AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK; @Override protected String getBookmarkUrl() { return BOOKMARK_URL; } /** * {@inheritDoc} Country * * @return */ @Override protected String getLinkLocator() { return "Country"; } @Override protected void createNewEnterDetails() throws InterruptedException { waitAndTypeByName("document.documentHeader.documentDescription", getDescriptionUnique()); jiraAwareTypeByName( "document.newMaintainableObject.code", RandomStringUtils.randomAlphabetic(2)); jiraAwareTypeByName("document.newMaintainableObject.name", "name" + uniqueString); } public void testLocationCountryBookmark(JiraAwareFailable failable) throws Exception { testSearchEditCancel(); driver.navigate().to(WebDriverUtils.getBaseUrlString() + BOOKMARK_URL); testCreateNewCancel(); passed(); } public void testLocationCountryNav(JiraAwareFailable failable) throws Exception { testEditCancel(); navigate(); testCreateNewCancelNav(); passed(); } }
/** @author Kuali Rice Team ([email protected]) */ public abstract class ConfigComponentLookUpAndEditAftBase extends AdminTmplMthdAftNavBase { /** * ITUtil.PORTAL+"?channelTitle=Component&channelUrl="+WebDriverUtils.getBaseUrlString()+ * "/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.coreservice.impl.component.ComponentBo&docFormKey=88888888&returnLocation="+ * +ITUtil.PORTAL_URL+ ITUtil.HIDE_RETURN_LINK; */ public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Component&channelUrl=" + WebDriverUtils.getBaseUrlString() + "/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.coreservice.impl.component.ComponentBo&docFormKey=88888888&returnLocation=" + AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK; @Override protected String getBookmarkUrl() { return BOOKMARK_URL; } /** * {@inheritDoc} Component * * @return */ @Override protected String getLinkLocator() { return "Component"; } public void testConfigComponentLookUpAndEditBookmark(JiraAwareFailable failable) throws Exception { testConfigComponentLookUpAndEdit(); passed(); } public void testConfigComponentLookUpAndEditNav(JiraAwareFailable failable) throws Exception { testConfigComponentLookUpAndEdit(); passed(); } public void testConfigComponentLookUpAndEdit() throws Exception { selectFrameIframePortlet(); waitAndClickSearchSecond(); waitAndClickByLinkText("edit"); waitAndTypeByName( "document.documentHeader.documentDescription", "Test description of Component"); waitAndClickByName("methodToCall.route"); checkForDocError(); waitAndClickByName("methodToCall.close"); // waitAndClickByName("methodToCall.processAnswer.button1"); } }
protected void travelAccountCreateDocument(String principalName) throws Exception { waitAndTypeByName(DESCRIPTION_FIELD, "Travel Company Super User Test"); String randomCode = RandomStringUtils.randomAlphabetic(9).toUpperCase(); waitAndTypeByName(COMPANY_NAME_FIELD, "Company Name " + randomCode); waitAndClickByLinkText("Ad Hoc Recipients"); waitAndTypeByName( "newCollectionLines['document.adHocRoutePersons'].actionRequested", "Complete"); waitAndTypeByName("newCollectionLines['document.adHocRoutePersons'].id", principalName); jGrowl("Click Add button"); waitAndClickById("Uif-AdHocPersonCollection_add"); waitForElementPresentByXpath( "//div[@data-parent=\"Uif-AdHocPersonCollection\"]/div/span[contains(text(), principalName]"); waitAndClickByLinkText("Ad Hoc Recipients"); waitAndClickSubmitByText(); waitAndClickConfirmSubmitOk(); waitForProgress("Loading...", WebDriverUtils.configuredImplicityWait() * 4); waitForTextPresent( "Document was successfully submitted.", WebDriverUtils.configuredImplicityWait() * 2); }
/** @author Kuali Rice Team ([email protected]) */ public abstract class ConfigParameterTypeLookUpAndInquireAftBase extends AdminTmplMthdAftNavBase { /** * ITUtil.PORTAL+"?channelTitle=Parameter&channelUrl="+WebDriverUtils.getBaseUrlString()+ * "/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.coreservice.impl.parameter.ParameterBo&docFormKey=88888888&returnLocation=" * +ITUtil.PORTAL_URL+ ITUtil.HIDE_RETURN_LINK; */ public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Parameter%20Type&channelUrl=" + WebDriverUtils.getBaseUrlString() + "/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.coreservice.impl.parameter.ParameterTypeBo&docFormKey=88888888&returnLocation=" + AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK; @Override protected String getBookmarkUrl() { return BOOKMARK_URL; } /** * {@inheritDoc} Parameter * * @return */ @Override protected String getLinkLocator() { return "Parameter Type"; } public void testConfigParameterTypeLookUpAndInquireBookmark(JiraAwareFailable failable) throws Exception { testConfigParameterTypeLookUpAndInquire(); passed(); } public void testConfigParameterTypeLookUpAndInquireNav(JiraAwareFailable failable) throws Exception { testConfigParameterTypeLookUpAndInquire(); passed(); } public void testConfigParameterTypeLookUpAndInquire() throws Exception { selectFrameIframePortlet(); waitAndClickSearchSecond(); waitAndClickByLinkText("Authorization"); switchToWindow("Kuali :: Inquiry"); selectFrameIframePortlet(); waitAndClick("input.globalbuttons"); } }
/** @author Kuali Rice Team ([email protected]) */ public class WorkFlowRouteRulesDelegationAftBase extends MainTmplMthdSTNavBase { /** * ITUtil.PORTAL + "?channelTitle=Routing%20Rules%20Delegation&channelUrl=" + * WebDriverUtils.getBaseUrlString() + * "/kr/lookup.do?businessObjectClassName=org.kuali.rice.kew.rule.RuleDelegationBo&docFormKey=88888888&returnLocation=" * + ITUtil.PORTAL_URL + ITUtil.HIDE_RETURN_LINK + "&showMaintenanceLinks=true"; */ public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Routing%20Rules%20Delegation&channelUrl=" + WebDriverUtils.getBaseUrlString() + "/kr/lookup.do?businessObjectClassName=org.kuali.rice.kew.rule.RuleDelegationBo&docFormKey=88888888&returnLocation=" + AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK + "&showMaintenanceLinks=true"; @Override protected String getBookmarkUrl() { return BOOKMARK_URL; } /** * {@inheritDoc} Routing Rules Delegation * * @return */ @Override protected String getLinkLocator() { return "Routing Rules Delegation"; } public void testWorkFlowRouteRulesDelegationBookmark(JiraAwareFailable failable) throws Exception { testCreateNewRRDTravelRequestDestRouting(); passed(); } public void testWorkFlowRouteRulesDelegationNav(JiraAwareFailable failable) throws Exception { testCreateNewRRDTravelRequestDestRouting(); passed(); } }
protected void testDemoTravelCompanyCompletionRequestForAdmin() throws Exception { String documentNumber = waitForDocIdKrad(); travelAccountCreateDocument(ADMIN_PRINCIPAL_NAME); openTravelCompanyDoc(documentNumber, ADMIN_PRINCIPAL_NAME); // Make sure the document can be edited waitAndTypeByName(COMPANY_NAME_FIELD, " Extra"); // Admin is a super user but the approve and disapprove buttons will not // be shown since the completion request was for Admin Thread.sleep(3000); waitAndClickByLinkText(SUPER_USER_ACTIONS); verifyButtons(); waitAndClickButtonByText(COMPLETE); waitForProgress("Loading...", WebDriverUtils.configuredImplicityWait() * 8); ReloadAndCheckDocStatus(FINAL); }
/** @author Kuali Rice Team ([email protected]) */ public abstract class MaintenanceConstraintTextAftBase extends KradTmplMthdSTNavBase { /** * ITUtil.PORTAL + "?channelTitle=Travel%20Account%20Maintenance%20(New)&channelUrl=" + * WebDriverUtils.getBaseUrlString() + * "/kr-krad/maintenance?methodToCall=start&dataObjectClassName=edu.sampleu.travel.bo.TravelAccount&viewName=ks_maintenance&returnLocation=" * + ITUtil.PORTAL_URL + ITUtil.HIDE_RETURN_LINK */ public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Travel%20Account%20Maintenance%20(New)&channelUrl=" + WebDriverUtils.getBaseUrlString() + "/kr-krad/maintenance?methodToCall=start&dataObjectClassName=edu.sampleu.travel.bo.TravelAccount&viewName=ks_maintenance&returnLocation=" + AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK; @Override protected String getBookmarkUrl() { return BOOKMARK_URL; } /** * {@inheritDoc} Travel Account Maintenance (New) * * @return */ @Override protected String getLinkLocator() { return "Travel Account Maintenance (New)"; } public void testMaintenanceConstraintTextBookmark(JiraAwareFailable failable) throws Exception { testVerifyConstraintText(); passed(); } public void testMaintenanceConstraintTextNav(JiraAwareFailable failable) throws Exception { testVerifyConstraintText(); passed(); } }
protected void testDemoTravelCompanyCompletionRequestForUser1() throws Exception { String documentNumber = waitForDocIdKrad(); travelAccountCreateDocument(USER1_PRINCIPAL_NAME); // Admin is a super user so the approve and disapprove buttons should be shown to Admin but not // to user1 waitAndClickByLinkText(SUPER_USER_ACTIONS); waitForTextPresent(APPROVE); waitForTextPresent(DISAPPROVE); openTravelCompanyDoc(documentNumber, USER1_PRINCIPAL_NAME); // Make sure the document can be edited waitAndTypeByName(COMPANY_NAME_FIELD, " Extra"); assertTextNotPresent(SUPER_USER_ACTIONS); verifyButtons(); waitAndClickButtonByText(COMPLETE); waitForProgress("Loading...", WebDriverUtils.configuredImplicityWait() * 8); ReloadAndCheckDocStatus(FINAL); }
public void testLocationCountryBookmark(JiraAwareFailable failable) throws Exception { testSearchEditCancel(); driver.navigate().to(WebDriverUtils.getBaseUrlString() + BOOKMARK_URL); testCreateNewCancel(); passed(); }