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.AdminMenuBlanketAppITBase;
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 ConfigParameterBlanketAppIT extends AdminMenuBlanketAppITBase {
031 @Override
032 protected String getLinkLocator() {
033 return "link=Parameter";
034 }
035
036 @Override
037 public String blanketApprove() throws Exception {
038
039 String docId = waitForDocId();
040 waitAndType("//input[@id='document.documentHeader.documentDescription']", "Validation Test Parameter " + ITUtil.DTS_TWO);
041 assertEquals("", getText("methodToCall.cancel"));
042 select("//select[@id='document.newMaintainableObject.namespaceCode']", "label=KR-NS - Kuali Nervous System");
043
044 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']";
045 waitAndClick(componentLookUp);
046 waitAndClick("//input[@name='methodToCall.search' and @value='search']");
047 waitAndClick("link=return value");
048
049 String parameterName = "Validation Test Parameter "+ ITUtil.DTS_TWO;
050 waitAndType("//input[@id='document.newMaintainableObject.name']", parameterName);
051 waitAndType("//textarea[@id='document.newMaintainableObject.description']",
052 "Validation Test Parameter Description " + ITUtil.DTS_TWO);
053 select("//select[@id='document.newMaintainableObject.parameterTypeCode']", "label=Document Validation");
054 waitAndClick("//input[@id='document.newMaintainableObject.evaluationOperatorCodeAllowed']");
055
056 waitForPageToLoad();
057 return docId;
058 }
059 }