001 /**
002 * Copyright 2005-2011 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package edu.samplu.admin.test;
017
018 import edu.samplu.common.AdminMenuBlanketAppLegacyITBase;
019 import edu.samplu.common.ITUtil;
020
021 import static org.junit.Assert.assertEquals;
022
023 /**
024 * tests that user admin's blanket approve of the Parameter maintenance document results in a final document
025 * The component is chosen from a lookup screen
026 *
027 * @author Kuali Rice Team (rice.collab@kuali.org)
028 */
029
030 public class ConfigParameterBlanketLegacyAppIT extends AdminMenuBlanketAppLegacyITBase {
031 @Override
032 protected String getLinkLocator() {
033 return "Parameter";
034 }
035
036 @Override
037 public String blanketApprove() throws Exception {
038
039 String docId = waitForDocId();
040 waitAndTypeByXpath("//input[@id='document.documentHeader.documentDescription']", "Validation Test Parameter ");
041 assertBlanketApproveButtonsPresent();
042 assertEquals("", getTextByName("methodToCall.cancel"));
043 selectByXpath("//select[@id='document.newMaintainableObject.namespaceCode']", "KR-NS - Kuali Nervous System");
044
045 String componentLookUp = "//input[@name='methodToCall.performLookup.(!!org.kuali.rice.coreservice.impl.component.ComponentBo!!).(((code:document.newMaintainableObject.componentCode,namespaceCode:document.newMaintainableObject.namespaceCode,))).((`document.newMaintainableObject.componentCode:code,document.newMaintainableObject.namespaceCode:namespaceCode,`)).((<>)).(([])).((**)).((^^)).((&&)).((//)).((~~)).(::::;" + getBaseUrlString()+ "/kr/lookup.do;::::).anchor4']";
046 waitAndClickByXpath(componentLookUp);
047 waitAndClickByXpath("//input[@name='methodToCall.search' and @value='search']");
048 waitAndClickByLinkText("return value");
049
050 String parameterName = "Validation Test Parameter"+ITUtil.DTS;
051 waitAndTypeByXpath("//input[@id='document.newMaintainableObject.name']", parameterName);
052 waitAndTypeByXpath("//textarea[@id='document.newMaintainableObject.description']",
053 "Validation Test Parameter Description" + ITUtil.DTS);
054 selectByXpath("//select[@id='document.newMaintainableObject.parameterTypeCode']", "Document Validation");
055 waitAndClickByXpath("//input[@id='document.newMaintainableObject.evaluationOperatorCodeAllowed']");
056
057 waitForPageToLoad();
058 return docId;
059 }
060 }