View Javadoc

1   /**
2    * Copyright 2005-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package edu.samplu.admin.test;
17  
18  import java.util.List;
19  
20  import org.junit.Test;
21  
22  import edu.samplu.common.ITUtil;
23  import edu.samplu.common.WebDriverLegacyITBase;
24  
25  /**
26   * tests the Parameter Type section in Rice.
27   * 
28   * @author Kuali Rice Team (rice.collab@kuali.org)
29   */
30  public class ParameterTypeWDIT extends WebDriverLegacyITBase {
31  
32      String docId;
33      String parameterType;
34      String parameterCode;
35  
36      /**
37       * ITUtil.PORTAL + "?channelTitle=Parameter%20Type&channelUrl=" + ITUtil.getBaseUrlString() +
38       "/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.coreservice.impl.parameter.ParameterTypeBo&docFormKey=88888888&returnLocation=" +
39       ITUtil.PORTAL_URL + "&hideReturnLink=true"
40       */
41      public static final String TEST_URL = ITUtil.PORTAL + "?channelTitle=Parameter%20Type&channelUrl=" + ITUtil.getBaseUrlString() +
42              "/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.coreservice.impl.parameter.ParameterTypeBo&docFormKey=88888888&returnLocation=" +
43              ITUtil.PORTAL_URL + "&hideReturnLink=true";
44     
45      @Override
46      public String getTestUrl() {
47          return TEST_URL;
48      }
49  
50      @Test
51      public void testParameterType() throws Exception {
52          
53          // Create New
54          selectFrame("iframeportlet");
55          super.waitAndCreateNew();
56          List<String> params;
57          params=super.testCreateNewParameterType(docId, parameterType,parameterCode);
58          
59          //Lookup
60          super.open(ITUtil.getBaseUrlString()+TEST_URL);
61          selectFrame("iframeportlet");
62          params=super.testLookUpParameterType(params.get(0), params.get(1),params.get(2));
63          
64          //edit
65          params=super.testEditParameterType(params.get(0), params.get(1),params.get(2));
66  
67          //Verify if its edited
68          super.open(ITUtil.getBaseUrlString()+TEST_URL);
69          selectFrame("iframeportlet");
70          params=super.testLookUpParameterType(params.get(0), params.get(1),params.get(2));
71  
72          //copy
73          params=super.testCopyParameterType(params.get(0), params.get(1),params.get(2));
74  
75          //Verify if its copied
76          super.open(ITUtil.getBaseUrlString()+TEST_URL);
77          selectFrame("iframeportlet");
78          super.testVerifyCopyParameterType(params.get(0), params.get(1),params.get(2));
79      }
80  }