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.travel.krad.test;
018
019 import edu.samplu.common.ITUtil;
020 import edu.samplu.common.WebDriverLegacyITBase;
021
022 import org.junit.Test;
023
024 /**
025 * test that configuration test view items work as expected
026 *
027 * @author Kuali Rice Team (rice.collab@kuali.org)
028 */
029 public class ConfigurationTestViewNavIT extends WebDriverLegacyITBase {
030
031 @Override
032 public String getTestUrl() {
033 return ITUtil.PORTAL;
034 }
035
036 /** bean id prefix in used in view */
037 private String idPrefix = "ConfigurationTestView-ProgressiveRender-";
038
039 /** bean id suffix for add line controls */
040 String addLineIdSuffix = "InputField_add_control";
041
042 /**
043 * open the configuration test view page
044 */
045 protected void openConfigurationTestView() throws InterruptedException {
046 waitAndClickKRAD();
047 waitAndClickByXpath("(//a[text()='Configuration Test View'])[2]");
048 switchToWindow(CONFIGURATION_VIEW_WINDOW_TITLE);
049 waitForTitleToEqualKualiPortalIndex();
050 }
051
052
053 /**
054 * test for text input field label - style setting and refreshWhenChanged for components not in collection
055 */
056 @Test
057 public void testConfigurationTestView() throws Exception {
058 openConfigurationTestView();
059 super.testConfigurationTestView(idPrefix);
060 passed();
061 }
062
063 /**
064 * test adding a line to a collection which uses an add line that has spring expressions that are evaluated on refresh
065 * a specific time is set
066 */
067 @Test
068 public void testAddLineWithSpecificTime() throws Exception{
069 openConfigurationTestView();
070 super.testAddLineWithSpecificTime(idPrefix, addLineIdSuffix);
071 passed();
072 }
073
074 /**
075 * test adding a line to a collection which has the property refreshWhenChangedPropertyNames set
076 * on more than one component.
077 */
078 @Test
079 public void testAddLineWithAllDay() throws Exception {
080 openConfigurationTestView();
081 super.testAddLineWithAllDay(idPrefix, addLineIdSuffix);
082 passed();
083 }
084
085 /**
086 * test adding a line to a collection which uses an add line that has spring expressions that are evaluated on refresh
087 * a specific time is set
088 */
089 @Test
090 public void testAddLineAllDay() throws Exception{
091 openConfigurationTestView();
092 super.testAddLineAllDay(idPrefix, addLineIdSuffix);
093 passed();
094 }
095 }