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 LibraryCollectionFeaturesLightTableAft extends WebDriverLegacyITBase {
26
27
28
29
30 public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=Demo-LightTableView&methodToCall=start";
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("Light Table");
42 }
43
44 protected void testCollectionFeaturesLightTableBasicData() throws Exception {
45 waitAndClickByLinkText("Basic Data");
46 waitAndClickByLinkText("Basic DataFields LightTable");
47 switchToWindow("Kuali :: Light Table test");
48 waitForElementPresentByXpath("//table[@id='Demo-LightTableGroup1_lightTable']/thead/tr/th[@aria-sort='ascending']");
49 switchToWindow("Kuali");
50 }
51
52 protected void testCollectionFeaturesLightTableInquiryLinkActions() throws Exception {
53 waitAndClickByLinkText("Inquiry, Links, and Actions");
54 waitAndClickByXpath("//section[@id='Demo-LightTable-Example2']/a");
55 switchToWindow("Kuali :: Light Table test");
56 waitForElementPresentByXpath("//table[@id='Demo-LightTableGroup2_lightTable']/tbody/tr/td/div/a");
57 waitForElementPresentByXpath("//table[@id='Demo-LightTableGroup2_lightTable']/tbody/tr/td[5]/div/fieldset/div/button");
58 switchToWindow("Kuali");
59 }
60
61 protected void testCollectionFeaturesLightTableConditionalRender() throws Exception {
62 waitAndClickByLinkText("Conditional Render");
63 waitAndClickByXpath("//section[@id='Demo-LightTable-Example3']/a");
64 switchToWindow("Kuali :: Light Table test");
65 waitForElementPresentByXpath("//table[@id='Demo-LightTableGroup3_lightTable']/tbody/tr/td[3]");
66 switchToWindow("Kuali");
67 }
68
69 protected void testCollectionFeaturesLightTableBasicInput() throws Exception {
70 waitAndClickByLinkText("Basic Input");
71 waitAndClickByLinkText("Basic Inputs");
72 switchToWindow("Kuali :: Light Table test");
73 waitForElementPresentByXpath("//table[@id='Demo-LightTableGroup4_lightTable']/tbody/tr/td/div/input");
74 assertElementPresentByXpath("//table[@id='Demo-LightTableGroup4_lightTable']/tbody/tr/td[3]/div/input[@type='checkbox']");
75 assertElementPresentByXpath("//table[@id='Demo-LightTableGroup4_lightTable']/tbody/tr/td[4]/div/select");
76 switchToWindow("Kuali");
77 }
78
79 @Test
80 public void testCollectionFeaturesLightTableBasicDataBookmark() throws Exception {
81 testCollectionFeaturesLightTableBasicData();
82 passed();
83 }
84
85 @Test
86 public void testCollectionFeaturesLightTableInquiryLinkActionsBookmark() throws Exception {
87 testCollectionFeaturesLightTableInquiryLinkActions();
88 passed();
89 }
90
91 @Test
92 public void testCollectionFeaturesLightTableConditionalRenderBookmark() throws Exception {
93 testCollectionFeaturesLightTableConditionalRender();
94 passed();
95 }
96
97 @Test
98 public void testCollectionFeaturesLightTableBasicInputBookmark() throws Exception {
99 testCollectionFeaturesLightTableBasicInput();
100 passed();
101 }
102
103 @Test
104 public void testCollectionFeaturesLightTableBasicDataNav() throws Exception {
105 testCollectionFeaturesLightTableBasicData();
106 passed();
107 }
108
109 @Test
110 public void testCollectionFeaturesLightTableInquiryLinkActionsNav() throws Exception {
111 testCollectionFeaturesLightTableInquiryLinkActions();
112 passed();
113 }
114
115 @Test
116 public void testCollectionFeaturesLightTableConditionalRenderNav() throws Exception {
117 testCollectionFeaturesLightTableConditionalRender();
118 passed();
119 }
120
121 @Test
122 public void testCollectionFeaturesLightTableBasicInputNav() throws Exception {
123 testCollectionFeaturesLightTableBasicInput();
124 passed();
125 }
126 }