1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.labs.inquiries;
17
18 import org.junit.Test;
19
20
21
22
23 public class LabsInquiryCustomLinkAft extends LabsInquiryBase {
24
25
26
27
28 public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=KradInquirySample-PageR4C1";
29
30 @Override
31 protected String getBookmarkUrl() {
32 return BOOKMARK_URL;
33 }
34
35 @Override
36 protected void navigate() throws Exception {
37 navigateToInquiry("Inquiry Custom Link");
38 }
39
40 protected void testInquiryCustomLink() throws InterruptedException {
41 waitAndClickByLinkText("Link to Inquiry with a Custom Link");
42 assertElementPresentByXpath("//button[contains(text(), 'Export')]");
43
44
45 waitAndClickLinkContainingText("IAT (Click for Example)");
46 gotoLightBox();
47 String[][] lightBoxLabeledText = {{"Travel Account Number:", "a3"},
48 {"Travel Account Name:", "Travel Account 3"},
49 {"Code And Description:", "IAT - Income"},
50 {"Subsidized Percent:", "20"},
51
52 {"Fiscal Officer:", "frank"},
53 {"Fiscal Officer User ID:", "frank"},
54 {"Fiscal Officer Name:", "frank, frank"}};
55 assertLabeledTextPresent(lightBoxLabeledText);
56
57 String[][] dataTable = {{"SUB1", "Sub Account 1"},
58 {"SUB2", "Sub Account 2"},
59 {"SUB3", "Sub Account 3"}};
60 assertDataTableContains(dataTable);
61
62 clickCollapseAll();
63 assertLabeledTextNotPresent(lightBoxLabeledText);
64
65 clickExpandAll();
66 assertLabeledTextPresent(lightBoxLabeledText);
67
68 waitAndClickButtonByText("Close");
69 }
70
71 @Test
72 public void testInquiryCustomLinkBookmark() throws Exception {
73 testInquiryCustomLink();
74 passed();
75 }
76
77 @Test
78 public void testInquiryCustomLinkNav() throws Exception {
79 testInquiryCustomLink();
80 passed();
81 }
82 }