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 LabsInquiryAttributionDefinitionFormattingAft extends LabsInquiryBase {
24
25
26
27
28 public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=KradInquirySample-PageR2C1";
29
30 @Override
31 protected String getBookmarkUrl() {
32 return BOOKMARK_URL;
33 }
34
35 @Override
36 protected void navigate() throws Exception {
37 navigateToInquiry("Inquiry - AttributionDefinition Formatting");
38 }
39
40 protected void testInquiryAttributionDefinitionFormatting() throws InterruptedException {
41
42 waitAndClickByLinkText("Inquiry - AttributionDefinition Formatting");
43
44 String[][] formattedLabeledText = {{"Id:", "10000"},
45 {"Travel Authorization Document:", "10000"},
46 {"Travel Company Name:", "Discount Travel"},
47 {"Expense Type:", "ME"},
48 {"Expense Description:", "Family Related"},
49 {"Expense Date:", "/"},
50 {"Expense Amount:", "1,278.97"},
51 {"Reimbursable:", "true"},
52 {"Taxable:", "true"}};
53
54 assertLabeledTextPresent(formattedLabeledText);
55 clickCollapseAll();
56 assertLabeledTextNotPresent(formattedLabeledText);
57 clickExpandAll();
58 assertLabeledTextPresent(formattedLabeledText);
59
60 waitAndClickButtonByText("< Back");
61
62
63 waitAndClickByLinkText("Inquiry - AttributionDefinition Formatting (Partial Attribute Masking, Additional Display Attribute Name)");
64
65 String[][] maskedLabeledText = {{"Id:", "1"},
66 {"Document Number:", "??"},
67 {"Principal Id:", "fred"},
68
69
70 {"First and Last Name (additionalDisplayAttributeName example):", "Test *-* Traveler"},
71 {"Middle Name:", "A"},
72 {"Last Name:", "Traveler"},
73 {"Street Address Line1:", "123 Nowhere St."},
74
75 {"City Name:", "Davis"},
76 {"State", "CA"},
77 {"Zip:", "95616"},
78 {"Country:", "US"},
79
80 {"Gender:", "M"},
81 {"Phone Number:", "(xxx)xxx-xxxx"},
82 {"Traveler Type Code:", "EMP"},
83 {"Customer Number:", "CUST"},
84 {"Drivers License:", "*****45678"},
85 {"Drivers License Exp Date:", "/"},
86 {"Traveler Detail Active Indicator:", "true"},
87 {"Non Resident Alien:", "false"},
88 {"Liability Insurance:", "false"}};
89
90 assertLabeledTextPresent(maskedLabeledText);
91 clickCollapseAll();
92 assertLabeledTextNotPresent(maskedLabeledText);
93 clickExpandAll();
94 assertLabeledTextPresent(maskedLabeledText);
95 }
96
97 @Test
98 public void testInquiryAttributionDefinitionFormattingBookmark() throws Exception {
99 testInquiryAttributionDefinitionFormatting();
100 passed();
101 }
102
103 @Test
104 public void testInquiryAttributionDefinitionFormattingNav() throws Exception {
105 testInquiryAttributionDefinitionFormatting();
106 passed();
107 }
108 }