View Javadoc

1   /*
2    * Copyright 2005-2013 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.krad.configview;
17  
18  import edu.samplu.common.Failable;
19  import edu.samplu.common.ITUtil;
20  import edu.samplu.common.WebDriverLegacyITBase;
21  
22  /**
23   * @author Kuali Rice Team (rice.collab@kuali.org)
24   */
25  public abstract class CollectionsAbstractSmokeTestBase extends WebDriverLegacyITBase {
26  
27      /**
28       * /kr-krad/uicomponents?viewId=ConfigurationTestView-Collections&methodToCall=start
29       */
30      public static final String BOOKMARK_URL = "/kr-krad/uicomponents?viewId=ConfigurationTestView-Collections&methodToCall=start";
31  
32      /**
33       * (//a[contains(text(),'Collections Configuration Test View')])[2]
34       */
35      public static final String TEXT_COLLECTIONS_CONFIGURATION_TEST_VIEW_XPATH =
36              "(//a[contains(text(),'Collections Configuration Test View')])[2]";
37  
38      /**
39       * Kuali :: Collection Test View
40       */
41      public static final String KUALI_COLLECTION_WINDOW_TITLE = "Kuali :: Collection Test View";
42      
43      /**
44       * Nav tests start at {@link edu.samplu.common.ITUtil#PORTAL}.  Bookmark Tests should override and return {@link CollectionsAbstractSmokeTestBase#BOOKMARK_URL}
45       * {@inheritDoc}
46       * @return
47       */
48      @Override
49      public String getTestUrl() {
50          return ITUtil.PORTAL;
51      }
52  
53      protected void navigation() throws Exception {
54          waitAndClickKRAD();
55          waitAndClickByXpath(TEXT_COLLECTIONS_CONFIGURATION_TEST_VIEW_XPATH);
56          switchToWindow(KUALI_COLLECTION_WINDOW_TITLE);
57      }
58  
59      protected void testCollectionsNav(Failable failable) throws Exception {
60          navigation();
61          testDefaultTestsTableLayout();
62          navigation();
63          testAddBlankLine();
64          navigation();
65          testActionColumnPlacement();
66          navigation();
67          testAddViaLightbox();
68          navigation();
69          testColumnSequence();
70          navigation();
71          testSequencerow();
72          passed();
73      }
74  
75      protected void testCollectionsBookmark(Failable failable) throws Exception {
76          testDefaultTestsTableLayout();
77          testAddBlankLine();
78          testActionColumnPlacement();
79          testAddViaLightbox();
80          testColumnSequence();
81          testSequencerow();
82          passed();
83      }
84  }