1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.samplu.krad.demo.travel.account.lookup;
17
18 import edu.samplu.common.Failable;
19 import edu.samplu.common.ITUtil;
20 import edu.samplu.common.WebDriverLegacyITBase;
21
22
23
24
25 public abstract class DemoTravelAccountLookUpAbstractSmokeTestBase extends WebDriverLegacyITBase {
26
27
28
29
30 public static final String BOOKMARK_URL = "/kr-krad/lookup?methodToCall=start&dataObjectClassName=org.kuali.rice.krad.demo.travel.account.TravelAccount&hideReturnLink=true&showMaintenanceLinks=true";
31
32
33
34
35 public static final String SEARCH = "Search";
36
37
38
39
40 public static final String CLEAR_VALUES = "Clear Values";
41
42 @Override
43 public String getTestUrl() {
44 return ITUtil.KRAD_PORTAL;
45 }
46
47 protected void navigation() throws Exception {
48 waitAndClickById("Demo-DemoLink", "");
49 waitAndClickByLinkText("Account Lookup");
50 }
51
52 protected void testTravelAccountLookUp() throws Exception {
53 waitAndTypeByName("lookupCriteria[number]","a1");
54 waitAndClickButtonByText(SEARCH);
55 Thread.sleep(3000);
56 assertElementPresentByXpath("//a[contains(text(), 'a1')]");
57 waitAndClickButtonByText(CLEAR_VALUES);
58 Thread.sleep(3000);
59 waitAndClickButtonByText(SEARCH);
60 Thread.sleep(3000);
61 assertElementPresentByXpath("//a[contains(text(), 'a1')]");
62 assertElementPresentByXpath("//a[contains(text(), 'a2')]");
63 }
64
65 public void testTravelAccountLookUpBookmark(Failable failable) throws Exception {
66 testTravelAccountLookUp();
67 passed();
68 }
69
70 public void testTravelAccountLookUpNav(Failable failable) throws Exception {
71 navigation();
72 testTravelAccountLookUp();
73 passed();
74 }
75 }