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 edu.samplu.common.Failable;
21  import edu.samplu.common.ITUtil;
22  
23  /**
24   * @author Kuali Rice Team (rice.collab@kuali.org)
25   */
26  public abstract class PersonAbstractSmokeTestBase extends AdminTmplMthdSTNavBase{
27  
28      /**
29       * ITUtil.PORTAL + "?channelTitle=Person&channelUrl=" 
30       * + ITUtil.getBaseUrlString() + ITUtil.KNS_LOOKUP_METHOD + "org.kuali.rice.kim.api.identity.Person&docFormKey=88888888&returnLocation=" +
31       * ITUtil.PORTAL_URL + ITUtil.HIDE_RETURN_LINK;
32       */
33      public static final String BOOKMARK_URL = ITUtil.PORTAL + "?channelTitle=Person&channelUrl=" 
34              + ITUtil.getBaseUrlString() + ITUtil.KNS_LOOKUP_METHOD +
35              "org.kuali.rice.kim.api.identity.Person&docFormKey=88888888&returnLocation=" +
36              ITUtil.PORTAL_URL + ITUtil.HIDE_RETURN_LINK ;
37  
38      private String docId;
39      private String personName;
40      
41      /**
42       * {@inheritDoc}
43       * Person
44       * @return
45       */
46      @Override
47      protected String getLinkLocator() {
48          return "Person";
49      }
50     
51      public void testPersonBookmark(Failable failable) throws Exception {
52          //Create New Person
53          selectFrame("iframeportlet");
54          waitAndCreateNew();
55          List<String> params;
56          params=testCreateNewPerson(docId, personName);
57          
58          //LookUp Person
59          selectTopFrame();
60          open(ITUtil.getBaseUrlString()+BOOKMARK_URL);
61          selectFrame("iframeportlet");
62          params=testLookUpPerson(params.get(0), params.get(1));
63  
64          //Verify Person
65          testVerifyPerson(params.get(0), params.get(1));
66          passed();
67      }
68  
69      public void testPersonNav(Failable failable) throws Exception {
70          //Create New Person
71          gotoCreateNew();
72          List<String> params;
73          params=testCreateNewPerson(docId, personName);
74          
75          //LookUp Person
76          selectTopFrame();
77          gotoMenuLinkLocator();
78          params=testLookUpPerson(params.get(0), params.get(1));
79  
80          //Verify Person
81          testVerifyPerson(params.get(0), params.get(1));
82          passed();
83      }
84  }