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 edu.sampleu.kim.api.reference; 017 018import org.junit.Test; 019import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils; 020import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase; 021import org.kuali.rice.testtools.selenium.WebDriverUtils; 022 023/** 024 * @author Kuali Rice Team (rice.collab@kuali.org) 025 */ 026public class AdminEmploymentStatusAft extends WebDriverLegacyITBase { 027 028 /** 029 * AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Employment%20Status&channelUrl=" + WebDriverUtils 030 * .getBaseUrlString() + "/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.kim.impl.identity.employment.EntityEmploymentStatusBo&docFormKey=88888888&returnLocation=" + 031 * AutomatedFunctionalTestUtils.PORTAL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK; 032 */ 033 public static final String BOOKMARK_URL = 034 AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Employment%20Status&channelUrl=" + WebDriverUtils 035 .getBaseUrlString() + "/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.kim.impl.identity.employment.EntityEmploymentStatusBo&docFormKey=88888888&returnLocation=" + 036 AutomatedFunctionalTestUtils.PORTAL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK; 037 038 @Override 039 protected String getBookmarkUrl() { 040 return BOOKMARK_URL; 041 } 042 043 @Override 044 protected void navigate() throws InterruptedException { 045 waitAndClickAdministration(); 046 waitAndClickByLinkText("Employment Status"); 047 } 048 049 private void testEmploymentStatus() throws Exception{ 050 selectFrameIframePortlet(); 051 waitAndTypeByName("code","A"); 052 waitAndClickByXpath("//input[@value='search']"); 053 String customSearchResult [] ={"A","Active","01","Yes"}; 054 assertTextPresent(customSearchResult); 055 waitAndClickByXpath("//input[@value='clearValues']"); 056 waitAndClickByXpath("//input[@value='search']"); 057 waitForTextPresent("items retrieved, displaying all items."); 058 } 059 060 @Test 061 public void testEmploymentStatusBookmark() throws Exception { 062 testEmploymentStatus(); 063 passed(); 064 } 065 066 @Test 067 public void testEmploymentStatusNav() throws Exception { 068 testEmploymentStatus(); 069 passed(); 070 } 071 072}