1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.demo.uif.library.collections;
17
18 import org.junit.Test;
19
20 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
21
22
23
24
25 public class LibraryCollectionFeaturesSelectLineAft extends WebDriverLegacyITBase {
26
27
28
29
30 public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=Demo-CollectionSelectLineView";
31
32 @Override
33 protected String getBookmarkUrl() {
34 return BOOKMARK_URL;
35 }
36
37 @Override
38 protected void navigate() throws Exception {
39 waitAndClickLibraryLink();
40 waitAndClickByLinkText("Collection Features");
41 waitAndClickByLinkText("Select Line");
42 }
43
44 protected void testCollectionFeaturesSelectLine() throws Exception {
45 selectByName("exampleShown", "Line Selection");
46
47 waitAndClickByXpath("//input[@name='collection1[0].bfield']");
48 assertElementPresentByXpath("//input[@name='collection1[0].bfield' and @value='collection1[0]']");
49
50 waitAndClickByXpath("//input[@name='collection1[2].bfield']");
51 assertElementPresentByXpath("//input[@name='collection1[2].bfield' and @value='collection1[2]']");
52 }
53
54 protected void testCollectionFeaturesSelectLineExpressionVariable() throws Exception {
55 selectByName("exampleShown", "Line Selection with Expression Variable");
56
57 waitAndClickByXpath("//input[@name='collection2[0].bfield']");
58 assertElementPresentByXpath("//input[@name='collection2[0].bfield' and @value='0']");
59
60 waitAndClickByXpath("//input[@name='collection2[2].bfield']");
61 assertElementPresentByXpath("//input[@name='collection2[2].bfield' and @value='2']");
62 }
63
64 @Test
65 public void testCollectionFeaturesSelectLineBookmark() throws Exception {
66 testCollectionFeaturesSelectLine();
67 passed();
68 }
69
70 @Test
71 public void testCollectionFeaturesSelectLineExpressionVariableBookmark() throws Exception {
72 testCollectionFeaturesSelectLineExpressionVariable();
73 passed();
74 }
75
76 @Test
77 public void testCollectionFeaturesSelectLineNav() throws Exception {
78 testCollectionFeaturesSelectLine();
79 passed();
80 }
81
82 @Test
83 public void testCollectionFeaturesSelectLineExpressionVariableNav() throws Exception {
84 testCollectionFeaturesSelectLineExpressionVariable();
85 passed();
86 }
87
88 }