1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.labs.clientside.stateview;
17
18 import org.junit.Test;
19 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
20 import org.openqa.selenium.By;
21
22
23
24
25 public class LabsClientSideStateViewAft extends WebDriverLegacyITBase {
26
27
28
29
30
31 public static final String BOOKMARK_URL = "/kr-krad/labs?viewId=Lab-ClientSideState&formKey=ff000d97-13e9-4130-81a3-bc0217e8e0eb&cacheKey=otutyty24mo0f76n59ebqxvtpg&pageId=Lab-ClientSideState-Page1";
32
33
34
35
36 private static final String ACTIVE_COMPONENT_NAME = "inactivatableCollection[0].active";
37
38
39
40
41 private static final String ACTIVE_COMPONENT2_NAME = "inactivatableCollection2[0].active";
42
43
44
45
46
47
48 @Override
49 protected void navigate() throws Exception {
50
51
52 }
53
54 @Override
55 protected String getBookmarkUrl() {
56 return BOOKMARK_URL;
57 }
58
59 @Test
60 public void testClientSideStateViewBookmark() throws Exception {
61 testClientSideStateView();
62 }
63
64 public void testClientSideStateView() throws Exception {
65 waitAndClickByName(ACTIVE_COMPONENT_NAME);
66 waitAndClickByName(ACTIVE_COMPONENT2_NAME);
67 waitAndClickButtonByText("Refresh - Ajax");
68 Thread.sleep(2000);
69 waitForElementNotPresent(By.name(ACTIVE_COMPONENT_NAME));
70 assertFalse(isElementPresentByName(ACTIVE_COMPONENT_NAME));
71 assertFalse(isElementPresentByName(ACTIVE_COMPONENT2_NAME));
72 waitAndClickButtonByText("Refresh - Non-Ajax");
73 Thread.sleep(2000);
74 waitForElementNotPresent(By.name(ACTIVE_COMPONENT_NAME));
75 assertFalse(isElementPresentByName(ACTIVE_COMPONENT2_NAME));
76 }
77 }