001 /*
002 * Copyright 2005-2013 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
017 package edu.samplu.krad.configview;
018
019 import edu.samplu.common.ITUtil;
020 import edu.samplu.common.WebDriverLegacyITBase;
021
022 import org.junit.Test;
023
024 /**
025 * Selenium test that tests collections
026 *
027 * @author Kuali Rice Team (rice.collab@kuali.org)
028 */
029 public class CollectionsNavIT extends WebDriverLegacyITBase {
030
031 /**
032 * (//a[contains(text(),'Collections Configuration Test View')])[2]
033 */
034 public static final String TEXT_COLLECTIONS_CONFIGURATION_TEST_VIEW_XPATH =
035 "(//a[contains(text(),'Collections Configuration Test View')])[2]";
036
037 /**
038 * Kuali :: Collection Test View
039 */
040 public static final String KUALI_COLLECTION_WINDOW_TITLE = "Kuali :: Collection Test View";
041
042 @Override
043 public String getTestUrl() {
044 return ITUtil.PORTAL;
045 }
046
047 /**
048 * Test adding a column of values to the Default Tests Table Layout
049 */
050 @Test
051 public void testDefaultTestsTableLayout() throws Exception {
052 navigate();
053 super.testDefaultTestsTableLayout();
054 passed();
055 }
056
057 private void navigate() throws InterruptedException {
058 waitAndClickKRAD();
059 waitAndClickByXpath(TEXT_COLLECTIONS_CONFIGURATION_TEST_VIEW_XPATH);
060 switchToWindow(KUALI_COLLECTION_WINDOW_TITLE);
061 }
062
063 /**
064 * Test adding a column of values to the Add Blank Line Tests Table Layout
065 */
066 @Test
067 public void testAddBlankLine() throws Exception {
068 navigate();
069 super.testAddBlankLine();
070 passed();
071 }
072
073 /**
074 * Test action column placement in table layout collections
075 */
076 @Test
077 public void testActionColumnPlacement() throws Exception {
078 navigate();
079 super.testActionColumnPlacement();
080 passed();
081 }
082
083 @Test
084 public void testAddViaLightbox() throws Exception {
085 navigate();
086 super.testAddViaLightbox();
087 passed();
088 }
089
090 @Test
091 public void testColumnSequence() throws Exception {
092 navigate();
093 super.testColumnSequence();
094 passed();
095 }
096
097 @Test
098 public void testSequencerow() throws Exception {
099 navigate();
100 super.testSequencerow();
101 passed();
102 }
103
104 }