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  
17  package edu.samplu.travel.krad.test;
18  
19  import edu.samplu.common.ITUtil;
20  import edu.samplu.common.WebDriverLegacyITBase;
21  
22  import org.junit.Test;
23  
24  /**
25   * test that configuration test view items work as expected
26   *
27   * @author Kuali Rice Team (rice.collab@kuali.org)
28   */
29  public class ConfigurationTestViewNavIT extends WebDriverLegacyITBase {
30  
31      @Override
32      public String getTestUrl() {
33          return ITUtil.PORTAL;
34      }
35  
36      /** bean id prefix in used in view */
37      private String idPrefix = "ConfigurationTestView-ProgressiveRender-";
38  
39      /** bean id suffix for add line controls */
40      String addLineIdSuffix = "InputField_add_control";
41  
42      /**
43       * open the configuration test view page
44       */
45      protected void openConfigurationTestView() throws InterruptedException {
46          waitAndClickKRAD();
47          waitAndClickByXpath("(//a[text()='Configuration Test View'])[2]");
48          switchToWindow(CONFIGURATION_VIEW_WINDOW_TITLE);
49          waitForTitleToEqualKualiPortalIndex();
50      }
51      
52      	
53      /**
54       * test for text input field label - style setting and refreshWhenChanged for components not in collection
55       */
56      @Test
57  	public void testConfigurationTestView() throws Exception {
58          openConfigurationTestView();
59          super.testConfigurationTestView(idPrefix);
60          passed();
61  	}
62  
63      /**
64       * test adding a line to a collection which uses an add line that has spring expressions that are evaluated on refresh
65       * a specific time is set
66       */
67      @Test    
68      public void testAddLineWithSpecificTime() throws Exception{
69          openConfigurationTestView();
70          super.testAddLineWithSpecificTime(idPrefix, addLineIdSuffix);
71          passed();
72      }
73  
74      /**
75       * test adding a line to a collection which has the property refreshWhenChangedPropertyNames set
76       * on more than one component.
77       */
78      @Test
79      public void testAddLineWithAllDay() throws Exception {
80          openConfigurationTestView();
81          super.testAddLineWithAllDay(idPrefix, addLineIdSuffix);
82          passed();
83      }
84  
85      /**
86       * test adding a line to a collection which uses an add line that has spring expressions that are evaluated on refresh
87       * a specific time is set
88       */
89      @Test  
90      public void testAddLineAllDay() throws Exception{
91          openConfigurationTestView();
92          super.testAddLineAllDay(idPrefix, addLineIdSuffix);
93          passed();
94      }
95  }