001 /* 002 * Copyright 2006-2012 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 */ 016 package edu.samplu.krad.travelview; 017 018 import edu.samplu.common.ITUtil; 019 import edu.samplu.common.KradMenuITBase; 020 import org.junit.Test; 021 022 /** 023 * @author Kuali Rice Team (rice.collab@kuali.org) 024 */ 025 public class MaintenanceDisclosuresIT extends KradMenuITBase{ 026 @Override 027 public String getTestUrl() { 028 return ITUtil.PORTAL; 029 } 030 031 @Override 032 protected String getLinkLocator() { 033 return "link=Travel Account Maintenance (New)"; 034 } 035 036 @Test 037 /** 038 * Verify disclosures are present and functional 039 */ 040 public void testVerifyDisclosures() throws Exception { 041 gotoMenuLinkLocator(); 042 assertElementPresent("//span[contains(.,'Document Overview')]"); 043 assertElementPresent("//span[contains(.,'Document Overview')]"); 044 assertElementPresent("//span[contains(.,'Account Information')]"); 045 assertElementPresent("//span[contains(.,'Fiscal Officer Accounts')]"); 046 assertElementPresent("//span[contains(.,'Notes and Attachments')]"); 047 assertElementPresent("//span[contains(.,'Ad Hoc Recipients')]"); 048 assertElementPresent("//span[contains(.,'Route Log')]"); 049 050 colapseExpand("//span[contains(.,'Document Overview')]//img", 051 "//label[contains(.,'Organization Document Number')]"); 052 colapseExpand("//span[contains(.,'Account Information')]//img", 053 "//label[contains(.,'Travel Account Type Code')]"); 054 colapseExpand("//span[contains(.,'Fiscal Officer Accounts')]//img", 055 "//a[contains(.,'Lookup/Add Multiple Lines')]"); 056 057 expandColapse("//span[contains(.,'Notes and Attachments')]//img", "//label[contains(.,'Note Text')]"); 058 expandColapse("//span[contains(.,'Ad Hoc Recipients')]", "//span[contains(.,'Ad Hoc Group Requests')]"); 059 060 // Handle frames 061 waitAndClick("//span[contains(.,'Route Log')]//img"); 062 selectFrame("routeLogIFrame"); 063 064 waitIsVisible("//img[@alt='refresh']"); 065 066 // relative=top iframeportlet might look weird but either alone results in something not found. 067 selectFrame("relative=top"); 068 selectFrame("iframeportlet"); 069 waitAndClick("//span[contains(.,'Route Log')]//img"); 070 selectFrame("routeLogIFrame"); 071 072 waitNotVisible("//img[@alt='refresh']"); 073 } 074 }