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.krad.demo.travel.account.maintenance;
17  
18  import org.openqa.selenium.By;
19  import org.openqa.selenium.internal.selenesedriver.SwitchToFrame;
20  import org.testng.Assert;
21  
22  import edu.samplu.common.Failable;
23  import edu.samplu.common.ITUtil;
24  import edu.samplu.common.WebDriverLegacyITBase;
25  
26  /**
27   * @author Kuali Rice Team (rice.collab@kuali.org)
28   */
29  public abstract class DemoTravelAccountMaintenanceEditAbstractSmokeTestBase extends WebDriverLegacyITBase {
30  
31      /**
32       * /kr-krad/maintenance?methodToCall=maintenanceEdit&number=a14&dataObjectClassName=org.kuali.rice.krad.demo.travel.account.TravelAccount&hideReturnLink=true
33       */
34      public static final String BOOKMARK_URL = "/kr-krad/maintenance?methodToCall=maintenanceEdit&number=a14&dataObjectClassName=org.kuali.rice.krad.demo.travel.account.TravelAccount&hideReturnLink=true";
35    
36      @Override
37      public String getTestUrl() {
38          return ITUtil.KRAD_PORTAL;
39      }
40  
41      protected void navigation() throws Exception {
42          waitAndClickById("Demo-DemoLink", "");
43          waitAndClickByLinkText("Account Maintenance (Edit)");
44      }
45  
46      protected void testTravelAccountMaintenanceEdit() throws Exception {
47          if(!isTextPresent("Stacktrace (only in dev mode)"))
48          {
49              //code goes here
50          }
51          else
52          {
53              fail("Development Exception (Error) on page. Test cannot be executed.");
54          }
55      }
56  
57      public void testDemoTravelAccountMaintenanceEditBookmark(Failable failable) throws Exception {
58          testTravelAccountMaintenanceEdit();
59          passed();
60      }
61  
62      public void testDemoTravelAccountMaintenanceEditNav(Failable failable) throws Exception {
63          navigation();
64          testTravelAccountMaintenanceEdit();
65          passed();
66      }
67  }