1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.demo.travel.application;
17
18 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
19 import org.junit.Test;
20
21
22
23
24 public class DemoTravelAccountInquiryWithCollectionsAft extends WebDriverLegacyITBase {
25
26
27
28
29 public static final String BOOKMARK_URL = "/kr-krad/inquiry?methodToCall=start&number=a14&dataObjectClassName=org.kuali.rice.krad.demo.travel.dataobject.TravelAccount&viewName=original";
30
31
32
33
34 public static final String SEARCH = "Search";
35
36
37
38
39 public static final String CLEAR_VALUES = "Clear Values";
40
41 @Override
42 public String getBookmarkUrl() {
43 return BOOKMARK_URL;
44 }
45
46 @Override
47 protected void navigate() throws Exception {
48 waitAndClickById("Demo-DemoLink", "");
49 waitAndClickByLinkText("Travel Account Inquiry with Collections");
50 }
51
52 protected void testTravelPerDiemLookUp() throws Exception {
53 String travelAccountInfo []={"Travel Account Number:","a14","Travel Account Name:","Travel Account 14",
54 "Account Type:","CAT - Clearing","Date Created:","Subsidized Percent:"," Fiscal Officer:","fran"," Fiscal Officer Name:","fran, fran"};
55 assertTextPresent(travelAccountInfo);
56 assertSubAccount("A","Sub Account A");
57 assertSubAccount("B","Sub Account B");
58 assertSubAccount("C","Sub Account C");
59 assertSubAccount("D","Sub Account D");
60 assertSubAccount("E","Sub Account E");
61 assertSubAccount("F","Sub Account F");
62 assertSubAccount("G","Sub Account G");
63 assertSubAccount("H","Sub Account H");
64 assertSubAccount("I","Sub Account Eye");
65 assertSubAccount("J","Sub Account J");
66 assertSubAccount("K","Sub Account K");
67 assertSubAccount("L","Sub Account L");
68 assertSubAccount("M","Sub Account M");
69 assertSubAccount("N","Sub Account N");
70 assertSubAccount("SUB123","Sub Account 123");
71 }
72
73 private void assertSubAccount(String subAccountNumber,String subAccountName) throws Exception
74 {
75 String subAccountInfo[]={"Travel Sub Account Number:",subAccountNumber,"Sub Account Name:",subAccountName};
76 assertTextPresent(subAccountInfo);
77 }
78
79 @Test
80 public void testTravelPerDiemLookUpBookmark() throws Exception {
81 testTravelPerDiemLookUp();
82 passed();
83 }
84
85 @Test
86 public void testTravelPerDiemLookUpNav() throws Exception {
87 testTravelPerDiemLookUp();
88 passed();
89 }
90 }