1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.demo.uif.library.controls;
17
18 import org.junit.Test;
19
20 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
21
22
23
24
25 public class DemoControlCheckboxGroupAft extends WebDriverLegacyITBase {
26
27
28
29
30 public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=Demo-CheckboxGroupControlView&methodToCall=start";
31
32 @Override
33 protected String getBookmarkUrl() {
34 return BOOKMARK_URL;
35 }
36
37 @Override
38 protected void navigate() throws Exception {
39 waitAndClickById("Demo-LibraryLink", "");
40 waitAndClickByLinkText("Controls");
41 waitAndClickByLinkText("Checkbox Group");
42 }
43
44 protected void testLibraryControlCheckboxGroupOptionsFinder() throws Exception {
45 waitAndClickByLinkText("optionsFinder");
46 waitForElementPresentByXpath("//input[@type='checkbox' and @name='checkboxesField1' and @value='1']");
47 waitForElementPresentByXpath("//input[@type='checkbox' and @name='checkboxesField1' and @value='5']");
48 }
49
50 protected void testLibraryControlCheckboxGroupKeyValuePairs() throws Exception {
51 waitAndClickByLinkText("Key Value Pairs");
52 waitForElementPresentByXpath("//input[@type='checkbox' and @name='checkboxesField2' and @value='1']");
53 waitForElementPresentByXpath("//input[@type='checkbox' and @name='checkboxesField2' and @value='3']");
54 }
55
56 protected void testLibraryControlCheckboxGroupHorizontal() throws Exception {
57 waitAndClickByLinkText("Horizontal");
58 waitForElementPresentByXpath("//input[@type='checkbox' and @name='checkboxesField3' and @value='1']");
59 waitForElementPresentByXpath("//input[@type='checkbox' and @name='checkboxesField3' and @value='2']");
60 }
61
62 protected void testLibraryControlCheckboxGroupDelimiter() throws Exception {
63 waitAndClickByLinkText("Delimiter");
64 waitForElementPresentByXpath("//input[@type='checkbox' and @name='checkboxesField4' and @value='1']");
65 assertTextPresent("\n|");
66 waitForElementPresentByXpath("//input[@type='checkbox' and @name='checkboxesField4' and @value='2']");
67 }
68
69 @Test
70 public void testControlCheckboxGroupBookmark() throws Exception {
71 testLibraryControlCheckboxGroupOptionsFinder();
72 testLibraryControlCheckboxGroupKeyValuePairs();
73 testLibraryControlCheckboxGroupHorizontal();
74 testLibraryControlCheckboxGroupDelimiter();
75 passed();
76 }
77
78 @Test
79 public void testControlCheckboxGroupNav() throws Exception {
80 testLibraryControlCheckboxGroupOptionsFinder();
81 testLibraryControlCheckboxGroupKeyValuePairs();
82 testLibraryControlCheckboxGroupHorizontal();
83 testLibraryControlCheckboxGroupDelimiter();
84 passed();
85 }
86 }