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 ParameterTypeAbstractSmokeTestBase extends AdminTmplMthdSTNavBase{
27  
28      /**
29       * ITUtil.PORTAL + "?channelTitle=Parameter%20Type&channelUrl=" 
30       * + ITUtil.getBaseUrlString() + ITUtil.KNS_LOOKUP_METHOD + "org.kuali.rice.coreservice.impl.parameter.ParameterTypeBo&docFormKey=88888888&returnLocation=" +
31       * ITUtil.PORTAL_URL + ITUtil.HIDE_RETURN_LINK;
32       */
33      public static final String BOOKMARK_URL = ITUtil.PORTAL + "?channelTitle=Parameter%20Type&channelUrl=" 
34              + ITUtil.getBaseUrlString() + ITUtil.KNS_LOOKUP_METHOD +
35              "org.kuali.rice.coreservice.impl.parameter.ParameterTypeBo&docFormKey=88888888&returnLocation=" +
36              ITUtil.PORTAL_URL + ITUtil.HIDE_RETURN_LINK ;
37  
38      private String docId;
39      private String parameterType;
40      private String parameterCode;
41      
42      /**
43       * {@inheritDoc}
44       * Parameter Type
45       * @return
46       */
47      @Override
48      protected String getLinkLocator() {
49          return "Parameter Type";
50      }
51     
52      public void testParameterTypeBookmark(Failable failable) throws Exception {
53       // Create New
54          selectFrame("iframeportlet");
55          waitAndCreateNew();
56          List<String> params;
57          params=testCreateNewParameterType(docId, parameterType,parameterCode);
58          
59          //Lookup
60          open(ITUtil.getBaseUrlString()+BOOKMARK_URL);
61          selectFrame("iframeportlet");
62          params=testLookUpParameterType(params.get(0), params.get(1),params.get(2));
63          
64          //edit
65          params=testEditParameterType(params.get(0), params.get(1),params.get(2));
66  
67          //Verify if its edited
68          open(ITUtil.getBaseUrlString()+BOOKMARK_URL);
69          selectFrame("iframeportlet");
70          params=testLookUpParameterType(params.get(0), params.get(1),params.get(2));
71  
72          //copy
73          params=testCopyParameterType(params.get(0), params.get(1),params.get(2));
74  
75          //Verify if its copied
76          open(ITUtil.getBaseUrlString()+BOOKMARK_URL);
77          selectFrame("iframeportlet");
78          testVerifyCopyParameterType(params.get(0), params.get(1),params.get(2));
79          passed();
80      }
81  
82      public void testParameterTypeNav(Failable failable) throws Exception {
83        //Create New
84          gotoCreateNew();
85          List<String> params;
86          params=testCreateNewParameterType(docId, parameterType,parameterCode);
87      
88          //Lookup
89          gotoMenuLinkLocator();
90          selectFrame("iframeportlet");
91          params=testLookUpParameterType(params.get(0), params.get(1),params.get(2));
92  
93          //edit
94          params=testEditParameterType(params.get(0), params.get(1),params.get(2));
95          
96          //Verify if its edited
97          gotoMenuLinkLocator();
98          params=testLookUpParameterType(params.get(0), params.get(1),params.get(2));
99  
100         //copy
101         params=testCopyParameterType(params.get(0), params.get(1),params.get(2));
102         
103         //Verify if its copied
104         gotoMenuLinkLocator();
105         testVerifyCopyParameterType(params.get(0), params.get(1),params.get(2));
106         passed();
107     }
108 }