1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.demo.lookup.view;
17
18 import org.kuali.rice.krad.demo.ViewDemoAftBase;
19 import org.junit.Test;
20
21
22
23
24 public class DemoLookUpAdvancedLookUpFeaturesAft extends ViewDemoAftBase {
25
26
27
28
29 public static final String BOOKMARK_URL = "/kr-krad/lookup?methodToCall=start&viewId=LookupAdvancedFeaturesView";
30
31
32
33
34 private static final String TRAVEL_ACCOUNT_NAME="lookupCriteria[name]";
35
36
37
38
39 private static final String SEARCH_BUTTON_TEXT="Search";
40
41
42
43
44 private static final String CLEAR_VALUES_BUTTON_TEXT="Clear Values";
45
46
47
48
49 private static final String TYPE_CODE_NAME="lookupCriteria[accountTypeCode]";
50
51 @Override
52 public String getBookmarkUrl() {
53 return BOOKMARK_URL;
54 }
55
56 @Override
57 protected void navigate() throws Exception {
58 waitAndClickDemoLink();
59 waitAndClickByLinkText("Advanced lookup features");
60 }
61
62 protected void testLookUpAdvancedLookUpFeatures() throws InterruptedException {
63
64 waitAndTypeByName(TRAVEL_ACCOUNT_NAME,"Travel Account 9");
65 waitAndClickButtonByText(SEARCH_BUTTON_TEXT);
66 waitForTextPresent("Travel Account 9");
67 waitAndClickButtonByText(CLEAR_VALUES_BUTTON_TEXT);
68
69
70 waitAndClickByXpath("//input[@name='"+TYPE_CODE_NAME+"' and @value='CAT']");
71 waitAndClickButtonByText(SEARCH_BUTTON_TEXT);
72 waitForTextPresent("Travel Account 9");
73 waitAndClickButtonByText(CLEAR_VALUES_BUTTON_TEXT);
74 }
75
76 @Test
77 public void testLookUpAdvancedLookUpFeaturesBookmark() throws Exception {
78 testLookUpAdvancedLookUpFeatures();
79 passed();
80 }
81
82 @Test
83 public void testLookUpAdvancedLookUpFeaturesNav() throws Exception {
84 testLookUpAdvancedLookUpFeatures();
85 passed();
86 }
87 }