001 /** 002 * Copyright 2005-2013 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package edu.samplu.krad.demo.travel.account.maintenance; 017 018 import org.openqa.selenium.By; 019 import org.openqa.selenium.internal.selenesedriver.SwitchToFrame; 020 import org.testng.Assert; 021 022 import edu.samplu.common.Failable; 023 import edu.samplu.common.ITUtil; 024 import edu.samplu.common.WebDriverLegacyITBase; 025 026 /** 027 * @author Kuali Rice Team (rice.collab@kuali.org) 028 */ 029 public abstract class DemoTravelAccountMaintenanceEditAbstractSmokeTestBase extends WebDriverLegacyITBase { 030 031 /** 032 * /kr-krad/maintenance?methodToCall=maintenanceEdit&number=a14&dataObjectClassName=org.kuali.rice.krad.demo.travel.account.TravelAccount&hideReturnLink=true 033 */ 034 public static final String BOOKMARK_URL = "/kr-krad/maintenance?methodToCall=maintenanceEdit&number=a14&dataObjectClassName=org.kuali.rice.krad.demo.travel.account.TravelAccount&hideReturnLink=true"; 035 036 @Override 037 public String getTestUrl() { 038 return ITUtil.KRAD_PORTAL; 039 } 040 041 protected void navigation() throws Exception { 042 waitAndClickById("Demo-DemoLink", ""); 043 waitAndClickByLinkText("Account Maintenance (Edit)"); 044 } 045 046 protected void testTravelAccountMaintenanceEdit() throws Exception { 047 if(!isTextPresent("Stacktrace (only in dev mode)")) 048 { 049 //code goes here 050 } 051 else 052 { 053 fail("Development Exception (Error) on page. Test cannot be executed."); 054 } 055 } 056 057 public void testDemoTravelAccountMaintenanceEditBookmark(Failable failable) throws Exception { 058 testTravelAccountMaintenanceEdit(); 059 passed(); 060 } 061 062 public void testDemoTravelAccountMaintenanceEditNav(Failable failable) throws Exception { 063 navigation(); 064 testTravelAccountMaintenanceEdit(); 065 passed(); 066 } 067 }