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.travel.test;
17  
18  import edu.samplu.common.Failable;
19  import edu.samplu.common.ITUtil;
20  import edu.samplu.common.WebDriverLegacyITBase;
21  
22  /**
23   * Tests the Component section in Rice.
24   *
25   * @author Kuali Rice Team (rice.collab@kuali.org)
26   */
27  public abstract class FiscalOfficerInfoMaintenanceAbstractSmokeTestBase extends WebDriverLegacyITBase {
28  
29      /**
30       * ITUtil.PORTAL
31       * + "?channelTitle=FiscalOfficerInfo%20Maintenance%20(New)&channelUrl="
32       * + ITUtil.getBaseUrlString()
33       * + "/kr-krad/maintenance?methodToCall=start&dataObjectClassName=edu.sampleu.travel.dto.FiscalOfficerInfo&returnLocation="
34       * + ITUtil.PORTAL_URL + ITUtil.HIDE_RETURN_LINK
35       */
36      public static final String BOOKMARK_URL = ITUtil.PORTAL
37              + "?channelTitle=FiscalOfficerInfo%20Maintenance%20(New)&channelUrl="
38              + ITUtil.getBaseUrlString()
39              + "/kr-krad/maintenance?methodToCall=start&dataObjectClassName=edu.sampleu.travel.dto.FiscalOfficerInfo&returnLocation="
40              + ITUtil.PORTAL_URL + ITUtil.HIDE_RETURN_LINK;
41  
42      protected void bookmark() {
43          open(ITUtil.getBaseUrlString() + BOOKMARK_URL);
44      }
45  
46      /**
47       * Nav tests start at {@link edu.samplu.common.ITUtil#PORTAL}.
48       * Bookmark Tests should override and return {@link edu.samplu.travel.krad.test.CollectionTotallingAbstractSmokeTestBase#BOOKMARK_URL}
49       * {@inheritDoc}
50       * @return
51       */
52      @Override
53      public String getTestUrl() {
54          return ITUtil.PORTAL;
55      }
56  
57      protected void navigation() throws InterruptedException {
58          waitAndClickKRAD();
59          waitAndClickByXpath(FISCAL_OFFICER_INFO_MAINTENANCE_NEW_XPATH);
60      }
61  
62      protected void testFiscalOfficerInfoMaintenanceNav(Failable failable) throws Exception {
63          navigation();
64          testFiscalOfficerInfoMaintenanceNew(); 
65          passed();
66      }
67  
68      protected void testFiscalOfficerInfoMaintenanceBookmark(Failable failable) throws Exception {
69          testFiscalOfficerInfoMaintenanceNew();
70          passed();
71      }    
72  }