View Javadoc

1   /**
2    * Copyright 2005-2011 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  
17  package edu.samplu.admin.test;
18  
19  import static org.junit.Assert.assertEquals;
20  
21  import java.util.List;
22  
23  import org.junit.Test;
24  
25  import edu.samplu.common.ITUtil;
26  import edu.samplu.common.WebDriverLegacyITBase;
27  
28  /**
29   * @author Kuali Rice Team (rice.collab@kuali.org)
30   */
31  public class PermissionWDIT extends WebDriverLegacyITBase {
32  
33      String docId;
34      String permissionName;
35  
36      public static final String TEST_URL = ITUtil.PORTAL + "?channelTitle=Permission&channelUrl=" + ITUtil.getBaseUrlString() +
37              "/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.kim.impl.permission.UberPermissionBo&docFormKey=88888888&returnLocation=" +
38              ITUtil.PORTAL_URL + "&hideReturnLink=true";
39      
40      @Override
41      public String getTestUrl() {
42          return TEST_URL;
43      }
44      @Test
45      public void testPerson() throws Exception {
46          //Create New Permission
47          selectFrame("iframeportlet");
48          super.waitAndCreateNew();
49          List<String> params;
50          params=super.testCreateNewPermission(docId, permissionName);
51         
52          //LookUp Permission
53          selectTopFrame();
54          super.open(ITUtil.getBaseUrlString()+TEST_URL);
55          selectFrame("iframeportlet");
56          params=super.testLookUpPermission(params.get(0), params.get(1));
57  
58          //Edit Permission
59          params=super.testEditPermission(params.get(0), params.get(1));
60          
61          //Verify Permission
62          selectTopFrame();
63          super.open(ITUtil.getBaseUrlString()+TEST_URL);
64          selectFrame("iframeportlet");
65          params=testVerifyPermission(params.get(0), params.get(1));
66          
67      }
68  
69  }