001 /** 002 * Copyright 2005-2014 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.sampleu.admin; 017 018 import org.junit.Test; 019 import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils; 020 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase; 021 import org.kuali.rice.testtools.selenium.WebDriverUtils; 022 023 /** 024 * @author Kuali Rice Team (rice.collab@kuali.org) 025 */ 026 public class ConfigPessimisticLockAft extends WebDriverLegacyITBase { 027 028 /** 029 * AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=Pessimistic%20Lock&channelUrl="+ WebDriverUtils 030 * .getBaseUrlString()+"/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.krad.document.authorization.PessimisticLock&returnLocation="+ 031 * AutomatedFunctionalTestUtils.PORTAL_URL+ AutomatedFunctionalTestUtils.HIDE_RETURN_LINK+"&docFormKey=88888888"; 032 */ 033 public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=Pessimistic%20Lock&channelUrl="+ WebDriverUtils 034 .getBaseUrlString()+"/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.krad.document.authorization.PessimisticLock&returnLocation="+ 035 AutomatedFunctionalTestUtils.PORTAL_URL+ AutomatedFunctionalTestUtils.HIDE_RETURN_LINK+"&docFormKey=88888888"; 036 037 @Override 038 public String getBookmarkUrl() { 039 return BOOKMARK_URL; 040 } 041 042 @Override 043 protected void navigate() throws Exception { 044 waitAndClickAdministration(); 045 waitAndClickByLinkText("Pessimistic Lock"); 046 } 047 048 @Test 049 public void testPessimisticLockBookmark() throws Exception { 050 testPessimisticLock(); 051 passed(); 052 } 053 054 @Test 055 public void testPessimisticLockNav() throws Exception { 056 testPessimisticLock(); 057 passed(); 058 } 059 060 protected void testPessimisticLock() throws InterruptedException { 061 selectFrameIframePortlet(); 062 waitAndClickByXpath("//input[@name='methodToCall.search' and @alt='search']"); 063 waitForTextPresent("No values match this search."); 064 } 065 }