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 static org.junit.Assert.assertEquals;
019
020 import edu.samplu.common.ITUtil;
021 import edu.samplu.common.WebDriverLegacyITBase;
022
023 import org.junit.Test;
024 import org.openqa.selenium.By;
025 import java.util.List;
026
027 /**
028 * tests the Parameter section in Rice.
029 *
030 * @author Kuali Rice Team (rice.collab@kuali.org)
031 */
032 public class ParameterWDIT extends WebDriverLegacyITBase {
033
034 String docId;
035 String parameterName;
036 public static final String TEST_URL = ITUtil.PORTAL + "?channelTitle=Parameter&channelUrl=" + ITUtil.getBaseUrlString() +
037 "/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.coreservice.impl.parameter.ParameterBo&docFormKey=88888888&returnLocation=" +
038 ITUtil.PORTAL_URL + "&hideReturnLink=true";
039
040 @Override
041 public String getTestUrl() {
042 return TEST_URL;
043 }
044 @Test
045 public void testParameter() throws Exception {
046
047 // Create New
048 selectFrame("iframeportlet");
049 super.waitAndCreateNew();
050 List<String> params;
051 params=super.testCreateNewParameter(docId, parameterName);
052
053 //Lookup
054 super.open(ITUtil.getBaseUrlString()+TEST_URL);
055 selectFrame("iframeportlet");
056 params=super.testLookUpParameter(params.get(0), params.get(1));
057
058 //edit
059 params=super.testEditParameter(params.get(0), params.get(1));
060
061 //Verify if its edited
062 super.open(ITUtil.getBaseUrlString()+TEST_URL);
063 selectFrame("iframeportlet");
064 params=super.testVerifyModifiedParameter(params.get(0), params.get(1));
065
066 //copy
067 params=super.testCopyParameter(params.get(0), params.get(1));
068
069 //Verify if its copied
070 super.open(ITUtil.getBaseUrlString()+TEST_URL);
071 selectFrame("iframeportlet");
072 super.testVerifyModifiedParameter(params.get(0), params.get(1));
073 }
074
075
076 }