View Javadoc
1   /**
2    * Copyright 2005-2014 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 edu.sampleu.admin;
17  
18  import org.junit.Test;
19  import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
20  import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
21  import org.kuali.rice.testtools.selenium.WebDriverUtils;
22  
23  /**
24   * @author Kuali Rice Team (rice.collab@kuali.org)
25   */
26  public class ConfigPessimisticLockAft extends WebDriverLegacyITBase {
27  
28      /**
29       * AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=Pessimistic%20Lock&channelUrl="+ WebDriverUtils
30       * .getBaseUrlString()+"/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.krad.document.authorization.PessimisticLock&returnLocation="+
31       *  AutomatedFunctionalTestUtils.PORTAL_URL+ AutomatedFunctionalTestUtils.HIDE_RETURN_LINK+"&docFormKey=88888888";
32       */    
33      public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=Pessimistic%20Lock&channelUrl="+ WebDriverUtils
34              .getBaseUrlString()+"/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.krad.document.authorization.PessimisticLock&returnLocation="+
35              AutomatedFunctionalTestUtils.PORTAL_URL+ AutomatedFunctionalTestUtils.HIDE_RETURN_LINK+"&docFormKey=88888888";
36     
37      @Override
38      public String getBookmarkUrl() {
39          return BOOKMARK_URL;
40      }
41  
42      @Override
43      protected void navigate() throws Exception {
44          waitAndClickAdministration();
45          waitAndClickByLinkText("Pessimistic Lock");
46      }
47  
48      @Test
49      public void testPessimisticLockBookmark() throws Exception {
50          testPessimisticLock();
51          passed();
52      }
53  
54      @Test
55      public void testPessimisticLockNav() throws Exception {
56          testPessimisticLock();
57          passed();
58      }
59      
60      protected void testPessimisticLock() throws InterruptedException {
61          selectFrameIframePortlet();
62          waitAndClickByXpath("//input[@name='methodToCall.search' and @alt='search']");
63          waitForTextPresent("No values match this search.");
64      }
65  }