View Javadoc
1   /**
2    * Copyright 2005-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.krad.labs.inquiries;
17  
18  import org.junit.Test;
19  
20  /**
21   * @author Kuali Rice Team (rice.collab@kuali.org)
22   */
23  public class LabsInquiryAttributionDefinitionFormattingAft extends LabsInquiryBase {
24  
25      /**
26       * /kr-krad/kradsampleapp?viewId=KradInquirySample-PageR2C1
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      	// Inquiry - AttributionDefinition Formatting
43      	waitAndClickByLinkText("Inquiry - AttributionDefinition Formatting");
44          
45      	// Lightbox
46          waitAndClickLinkContainingText("10000");
47          gotoLightBox();
48          String[][] lightBoxLabeledText = {{"Id:", "10000"},
49                                            {"Travel Authorization Document:", "10000"},
50                                            {"Travel Company Name:", "Discount Travel"},
51                                            {"Expense Type:", "ME"},
52                                            {"Expense Description:", "Family Related"}, 
53  //                                          {"Expense Date:", getDateTomorrow()},
54                                            {"Expense Amount:", "1,278.97"},
55                                            {"Reimbursable:", "true"},
56                                            {"Taxable:", "true"}};
57          assertLabeledTextPresent(lightBoxLabeledText);
58          clickCollapseAll();
59          assertLabeledTextNotPresent(lightBoxLabeledText);
60          clickExpandAll();
61          assertLabeledTextPresent(lightBoxLabeledText);
62          waitAndClickButtonByText(CLOSE);
63          selectTopFrame();
64          assertLabeledTextPresent(lightBoxLabeledText);
65          waitAndClickButtonByText("< Back");
66          
67          //Inquiry - AttributionDefinition Formatting (Partial Attribute Masking, Additional Display Attribute Name)
68          waitAndClickByLinkText("Inquiry - AttributionDefinition Formatting (Partial Attribute Masking, Additional Display Attribute Name)");
69          String[][] LabeledText = {{"Id:", "1"},
70                  {"Document Number:", "??"},
71                  {"Principal Id:", "fred"},
72                  {"Traveler Name:", ""},
73                  {"Traveler User ID:", ""},
74                  {"First and Last Name (additionalDisplayAttributeName example):", "Test *-* Traveler"},
75                  {"Middle Name:", "A"},
76                  {"Last Name:", "Traveler"},
77                  {"Street Address Line1:", "123 Nowhere St."},
78                  {"Street Address Line2:", ""},
79                  {"City Name:", "Davis"},
80                  {"State", "CA"},
81                  {"Zip:", "95616"},
82                  {"Country:", "US"},
83                  {"Email Address:", ""},
84                  {"Gender:", "M"},
85                  {"Phone Number:", "(xxx)xxx-xxxx"},
86                  {"Traveler Type Code:", "123"},
87                  {"Customer Number:", "CUST"},
88                  {"Drivers License:", "*****45678"},
89                  {"Drivers License Exp Date:", "11/08/2018"},
90                  {"Active:", "true"},
91                  {"Non Resident Alien:", "false"},
92                  {"Liability Insurance:", "false"},};
93          assertLabeledTextPresent(LabeledText);
94      }
95  
96      @Test
97      public void testInquiryAttributionDefinitionFormattingBookmark() throws Exception {
98      	testInquiryAttributionDefinitionFormatting();
99          passed();
100     }
101 
102     @Test
103     public void testInquiryAttributionDefinitionFormattingNav() throws Exception {
104     	testInquiryAttributionDefinitionFormatting();
105         passed();
106     }
107 }