View Javadoc

1   /**
2    * Copyright 2005-2011 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.samplu.common;
17  
18  /**
19   * @deprecated Use WebDriverITBase for new tests.
20   * @author Kuali Rice Team (rice.collab@kuali.org)
21   */
22  public abstract class AdminMenuLegacyITBase extends MenuLegacyITBase {
23  
24      public static final String CREATE_NEW_LOCATOR = "//img[contains(@alt,'create new')]";
25  //    public static final String CREATE_NEW_LOCATOR = "//a[contains(@href,'command=initiate')]"; // not with IE8
26  //    public static final String CREATE_NEW_LOCATOR = "//a[@title='Create a new record']"; // not with IE8
27      public static final String ADMIN_LOCATOR = "Administration";
28      public static final String LABEL_KUALI_KUALI_SYSTEMS = "KUALI - Kuali Systems";
29      public static final String LABEL_KUALI_DEFAULT = "KUALI : Default";
30  
31      @Override
32      protected String getCreateNewLinkLocator() {
33          return CREATE_NEW_LOCATOR;
34      }
35  
36      @Override
37      protected String getMenuLinkLocator() {
38          return ADMIN_LOCATOR;
39      }
40  
41      /**
42       * tests that a getLinkLocator maintenance document can be cancelled
43       */
44      public void testCreateNewCancel() throws Exception {
45          gotoCreateNew();
46          testCancelConfirmation();
47      }
48  
49      /**
50       * tests that a getLinkLocator maintenance document is created for an edit operation originating from a lookup screen
51       */
52      public void testEditCancel() throws Exception {
53          gotoMenuLinkLocator();
54          testSearchEditCancel();
55      }
56  }