1 /*
2 * Copyright 2006-2012 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.krad.configview;
18
19 import edu.samplu.common.WebDriverITBase;
20 import edu.samplu.common.WebDriverLegacyITBase;
21
22 import org.junit.Test;
23 import org.openqa.selenium.By;
24 import org.openqa.selenium.interactions.Actions;
25
26 import static org.junit.Assert.assertEquals;
27 import static org.junit.Assert.assertFalse;
28 import static org.junit.Assert.assertTrue;
29
30 /**
31 * Test the help widget
32 *
33 * @author Kuali Rice Team (rice.collab@kuali.org)
34 */
35 public class HelpWDIT2 extends WebDriverLegacyITBase {
36
37 /**
38 * URL for the Configuration Test View - Help
39 *
40 * <p>
41 * Due to a WebDriver bug (feature?) the tooltips can not be tested with WebDriver.
42 * {@link HelpWDIT} is being used to test help tooltips.
43 * </p>
44 *
45 * @see edu.samplu.common.WebDriverITBase#getTestUrl()
46 */
47 @Override
48 public String getTestUrl() {
49 return "/kr-krad/configuration-test-view-uif-controller?viewId=ConfigurationTestView-Help&methodToCall=start";
50 }
51
52 /**
53 * Test the tooltip and external help on the view
54 */
55 @Test
56 public void testViewHelp2() throws Exception {
57 selectFrame("iframeportlet");
58 super.testViewHelp2();
59 }
60
61 /**
62 * Test the external help on the section and fields
63 */
64 @Test
65 public void testExternalHelp2() throws Exception {
66 selectFrame("iframeportlet");
67 super.testExternalHelp2();
68 }
69
70 /**
71 * Test the external help on the sub-section and display only fields
72 */
73 @Test
74 public void testDisplayOnlyExternalHelp2() throws Exception {
75 selectFrame("iframeportlet");
76 super.testDisplayOnlyExternalHelp2();
77 }
78
79 /**
80 * Test the external help on the section and fields with missing help URL
81 */
82 @Test
83 public void testMissingExternalHelp2() throws Exception {
84 selectFrame("iframeportlet");
85 super.testMissingExternalHelp2();
86 }
87 }