View Javadoc
1   /**
2    * Copyright 2005-2015 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 LabsInquiryParameterDecryptionAft extends LabsInquiryBase {
24  
25      /**
26       * /kr-krad/kradsampleapp?viewId=KradInquirySample-PageR5C3
27       */
28      public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=KradInquirySample-PageR5C3";
29      
30      /**
31       * MkNJjQMvX6PWHLJdDgVyJ9RA9durPueTKPQ5P+KdoKY=
32       */
33      private static final String TRAVEL_ACCOUNT_TYPE_CODE_ENCRYPTED="*********";
34      
35      /**
36       * bmkm0hqKp30=
37       */
38      private static final String TRAVEL_ACCOUNT_TYPE_CODE_ENCRYPTED_LIGHTBOX="*********";
39      
40      @Override
41      protected String getBookmarkUrl() {
42          return BOOKMARK_URL;
43      }
44  
45      @Override
46      protected void navigate() throws Exception {
47      	navigateToInquiry("Inquiry Parameter Decryption");
48      }
49  
50      protected void testInquiryParameterDecryption() throws InterruptedException {
51      	 waitAndClickByLinkText("Link to Inquiry with an encrypted parameter that will be decrypted");
52      	 waitAndClickByLinkText(TRAVEL_ACCOUNT_TYPE_CODE_ENCRYPTED);
53           gotoLightBox();
54      	 String[][] LabeledTextLightBox = {{"Travel Account Type Code:", TRAVEL_ACCOUNT_TYPE_CODE_ENCRYPTED_LIGHTBOX},
55          		 {"Account Type Name:","Clearing"},
56                   {"Account Type:", "CAT - Clearing"}
57                   };
58           assertLabeledTextPresent(LabeledTextLightBox);
59           clickCollapseAll();
60           assertLabeledTextNotPresent(LabeledTextLightBox);
61           clickExpandAll();
62           assertLabeledTextPresent(LabeledTextLightBox);
63           waitAndClickLightBoxClose();
64           selectTopFrame();
65           String[][] LabeledText = {{"Travel Account Type Code:", TRAVEL_ACCOUNT_TYPE_CODE_ENCRYPTED},
66          		 {"Account Type Name:","Clearing"},
67                   {"Account Type:", "CAT - Clearing"}
68                   };
69           assertLabeledTextPresent(LabeledText);
70           clickCollapseAll();
71           assertLabeledTextNotPresent(LabeledText);
72           clickExpandAll();
73           assertLabeledTextPresent(LabeledText);      
74      }
75  
76      @Test
77      public void testInquiryParameterDecryptionBookmark() throws Exception {
78      	testInquiryParameterDecryption();
79          passed();
80      }
81  
82      @Test
83      public void testInquiryParameterDecryptionNav() throws Exception {
84      	testInquiryParameterDecryption();
85          passed();
86      }
87  }