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 DemoClientResponsivenessComponentRefreshAft 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 waitAndClickById("Demo-LibraryLink", "");
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 assertTrue("Input field not empty assertion", "asdf".equals(waitAndGetAttributeByName("inputField1", "value")));
59 }
60
61
62
63
64
65 protected void testClientResponsivenessResetDataOnRefresh() throws Exception {
66 waitAndClickByLinkText("Reset Data On Refresh");
67 assertIsVisibleByXpath("//input[@name='booleanField2']", "Is Visible");
68 waitAndTypeByName("inputField2","yada");
69 waitAndClickByName("booleanField2");
70 waitForTextNotPresent("Loading...");
71 assertFalse("Input field empty assertion", "yada".equals(waitAndGetAttributeByName("inputField2", "value")));
72 }
73
74
75
76
77
78 @Test
79 public void testClientResponsivenessComponentRefreshBookmark() throws Exception {
80 testClientResponsivenessMethodToCallOnRefresh();
81 testClientResponsivenessResetDataOnRefresh();
82 passed();
83 }
84
85
86
87
88
89 @Test
90 public void testClientResponsivenessComponentRefreshNav() throws Exception {
91 testClientResponsivenessMethodToCallOnRefresh();
92 testClientResponsivenessResetDataOnRefresh();
93 passed();
94 }
95 }