001/** 002 * Copyright 2005-2016 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 */ 016package org.kuali.rice.krad.demo.travel.application; 017 018import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase; 019import org.junit.Test; 020 021/** 022 * @author Kuali Rice Team (rice.collab@kuali.org) 023 */ 024public class DemoTravelAccountInquiryWithCollectionsAft extends WebDriverLegacyITBase { 025 026 /** 027 * /kr-krad/inquiry?methodToCall=start&number=a14&dataObjectClassName=org.kuali.rice.krad.demo.travel.dataobject.TravelAccount&viewName=original 028 */ 029 public static final String BOOKMARK_URL = "/kr-krad/inquiry?methodToCall=start&number=a14&dataObjectClassName=org.kuali.rice.krad.demo.travel.dataobject.TravelAccount&viewName=original"; 030 031 /** 032 * Search 033 */ 034 public static final String SEARCH = "Search"; 035 036 /** 037 * Clear Values 038 */ 039 public static final String CLEAR_VALUES = "Clear Values"; 040 041 @Override 042 public String getBookmarkUrl() { 043 return BOOKMARK_URL; 044 } 045 046 @Override 047 protected void navigate() throws Exception { 048 waitAndClickDemoLink(); 049 waitAndClickByLinkText("Travel Account Inquiry with Collections"); 050 } 051 052 protected void testTravelPerDiemLookUp() throws Exception { 053 String travelAccountInfo []={"Travel Account Number:","a14","Travel Account Name:","Travel Account 14", 054 "Account Type:","CAT - Clearing","Date Created:","Subsidized Percent:","Fiscal Officer:","fran", 055 "Fiscal Officer Name:","fran, fran"}; 056 assertTextPresent(travelAccountInfo); 057 assertSubAccount("A","Sub Account A"); 058 assertSubAccount("B","Sub Account B"); 059 assertSubAccount("C","Sub Account C"); 060 assertSubAccount("D","Sub Account D"); 061 assertSubAccount("E","Sub Account E"); 062 assertSubAccount("F","Sub Account F"); 063 assertSubAccount("G","Sub Account G"); 064 assertSubAccount("H","Sub Account H"); 065 assertSubAccount("I","Sub Account Eye"); 066 assertSubAccount("J","Sub Account J"); 067 assertSubAccount("K","Sub Account K"); 068 assertSubAccount("L","Sub Account L"); 069 assertSubAccount("M","Sub Account M"); 070 assertSubAccount("N","Sub Account N"); 071 assertSubAccount("SUB123","Sub Account 123"); 072 } 073 074 private void assertSubAccount(String subAccountNumber,String subAccountName) throws Exception 075 { 076 String subAccountInfo[]={"Travel Sub Account Number:",subAccountNumber,"Sub Account Name:",subAccountName}; 077 assertTextPresent(subAccountInfo); 078 } 079 080 @Test 081 public void testTravelPerDiemLookUpBookmark() throws Exception { 082 testTravelPerDiemLookUp(); 083 passed(); 084 } 085 086 @Test 087 public void testTravelPerDiemLookUpNav() throws Exception { 088 testTravelPerDiemLookUp(); 089 passed(); 090 } 091}