001/** 002 * Copyright 2005-2015 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.krad.labs.inquiries; 017 018import org.junit.Test; 019 020/** 021 * @author Kuali Rice Team (rice.collab@kuali.org) 022 */ 023public class LabsInquiryParameterDecryptionAft extends LabsInquiryBase { 024 025 /** 026 * /kr-krad/kradsampleapp?viewId=KradInquirySample-PageR5C3 027 */ 028 public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=KradInquirySample-PageR5C3"; 029 030 /** 031 * MkNJjQMvX6PWHLJdDgVyJ9RA9durPueTKPQ5P+KdoKY= 032 */ 033 private static final String TRAVEL_ACCOUNT_TYPE_CODE_ENCRYPTED="*********"; 034 035 /** 036 * bmkm0hqKp30= 037 */ 038 private static final String TRAVEL_ACCOUNT_TYPE_CODE_ENCRYPTED_LIGHTBOX="*********"; 039 040 @Override 041 protected String getBookmarkUrl() { 042 return BOOKMARK_URL; 043 } 044 045 @Override 046 protected void navigate() throws Exception { 047 navigateToInquiry("Inquiry Parameter Decryption"); 048 } 049 050 protected void testInquiryParameterDecryption() throws InterruptedException { 051 waitAndClickByLinkText("Link to Inquiry with an encrypted parameter that will be decrypted"); 052 waitAndClickByLinkText(TRAVEL_ACCOUNT_TYPE_CODE_ENCRYPTED); 053 gotoLightBox(); 054 String[][] LabeledTextLightBox = {{"Travel Account Type Code:", TRAVEL_ACCOUNT_TYPE_CODE_ENCRYPTED_LIGHTBOX}, 055 {"Account Type Name:","Clearing"}, 056 {"Account Type:", "CAT - Clearing"} 057 }; 058 assertLabeledTextPresent(LabeledTextLightBox); 059 clickCollapseAll(); 060 assertLabeledTextNotPresent(LabeledTextLightBox); 061 clickExpandAll(); 062 assertLabeledTextPresent(LabeledTextLightBox); 063 waitAndClickLightBoxClose(); 064 selectTopFrame(); 065 String[][] LabeledText = {{"Travel Account Type Code:", TRAVEL_ACCOUNT_TYPE_CODE_ENCRYPTED}, 066 {"Account Type Name:","Clearing"}, 067 {"Account Type:", "CAT - Clearing"} 068 }; 069 assertLabeledTextPresent(LabeledText); 070 clickCollapseAll(); 071 assertLabeledTextNotPresent(LabeledText); 072 clickExpandAll(); 073 assertLabeledTextPresent(LabeledText); 074 } 075 076 @Test 077 public void testInquiryParameterDecryptionBookmark() throws Exception { 078 testInquiryParameterDecryption(); 079 passed(); 080 } 081 082 @Test 083 public void testInquiryParameterDecryptionNav() throws Exception { 084 testInquiryParameterDecryption(); 085 passed(); 086 } 087}