1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.demo.uif.library.clientresponsiveness;
17
18 import org.junit.Test;
19 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
20
21
22
23
24
25
26 public class LibraryClientResponsivenessComponentRefreshAft extends WebDriverLegacyITBase {
27
28
29 protected static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=Demo-ComponentRefresh&methodToCall=start";
30
31
32
33
34
35 @Override
36 protected String getBookmarkUrl() { return BOOKMARK_URL; }
37
38
39
40
41
42 @Override
43 protected void navigate() throws Exception {
44 waitAndClickLibraryLink();
45 waitAndClickByLinkText("Client Responsiveness");
46 waitAndClickByLinkText("Component Refresh");
47 }
48
49
50
51
52
53 protected void testClientResponsivenessMethodToCallOnRefresh() throws Exception {
54 assertIsVisibleByXpath("//input[@name='booleanField1']", "Is Visible");
55 waitAndTypeByName("inputField1","asdf");
56 waitAndClickByName("booleanField1");
57 waitForTextNotPresent("Loading...");
58 }
59
60
61
62
63
64 protected void testClientResponsivenessResetDataOnRefresh() throws Exception {
65 waitAndClickByLinkText("Reset Data On Refresh");
66 assertIsVisibleByXpath("//input[@name='booleanField2']", "Is Visible");
67 waitAndTypeByName("inputField2","yada");
68 waitAndClickByName("booleanField2");
69 waitForTextNotPresent("Loading...");
70 assertFalse("Input field empty assertion", "yada".equals(waitAndGetAttributeByName("inputField2", "value")));
71 }
72
73
74
75
76
77 @Test
78 public void testClientResponsivenessComponentRefreshBookmark() throws Exception {
79 testClientResponsivenessMethodToCallOnRefresh();
80 testClientResponsivenessResetDataOnRefresh();
81 passed();
82 }
83
84
85
86
87
88 @Test
89 public void testClientResponsivenessComponentRefreshNav() throws Exception {
90 testClientResponsivenessMethodToCallOnRefresh();
91 testClientResponsivenessResetDataOnRefresh();
92 passed();
93 }
94 }