1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package edu.samplu.admin.test;
18
19 import edu.samplu.common.SmokeTestBase;
20 import org.junit.Test;
21
22 import edu.samplu.common.ITUtil;
23
24
25
26
27
28 public class AgendaEditRuleRefreshSmokeTest extends SmokeTestBase {
29
30 public static final String BOOKMARK_URL =ITUtil.PORTAL+"?channelTitle=Agenda%20Lookup&channelUrl="
31 + ITUtil.getBaseUrlString() + ITUtil.KRAD_LOOKUP_METHOD
32 + "org.kuali.rice.krms.impl.repository.AgendaBo"
33 + ITUtil.SHOW_MAINTENANCE_LINKS
34 + "&returnLocation=" + ITUtil.PORTAL_URL + ITUtil.HIDE_RETURN_LINK;
35
36 @Override
37 protected String getBookmarkUrl() {
38 return BOOKMARK_URL;
39 }
40
41 @Override
42 protected void navigate() throws Exception {
43 waitAndClickByLinkText(AGENDA_LOOKUP_LINK_TEXT);
44 waitForPageToLoad();
45 }
46
47 protected void testAgendaEditRuleRefresh() throws Exception {
48 selectFrameIframePortlet();
49 waitAndClickButtonByText("Search");
50
51 Thread.sleep(3000);
52 waitAndClickByXpath("//a[@title='edit Agenda Definition with Agenda Id=T1000']",
53 "Does user have edit permissions?");
54 checkForIncidentReport("");
55 Thread.sleep(3000);
56 waitAndClickByXpath("//li/a[@class='agendaNode ruleNode']"); // jiraAwareWaitAndClick("//li[@id='473_node_0_parent_root']/a");
57 waitAndClickByXpath("//li/a[@class='agendaNode logicNode whenTrueNode']");
58 waitAndClickByLinkText("[-] collapse all");
59
60
61 for (int i = 0; i < 6; i++) {
62 for (int second = 0;; second++) {
63 if (second >= waitSeconds)
64 failableFail(TIMEOUT_MESSAGE);
65 try {
66 if (isElementPresent(".kr-refresh-button"))
67 break;
68 } catch (Exception e) {}
69 Thread.sleep(1000);
70 }
71 waitAndClick("button.kr-refresh-button");
72 }
73 passed();
74 }
75
76
77
78
79 @Test
80 public void testAgendaEditRuleRefreshBookmark() throws Exception {
81 testAgendaEditRuleRefresh();
82 }
83
84
85
86
87 @Test
88 public void testAgendaEditRuleRefreshNav() throws Exception {
89 testAgendaEditRuleRefresh();
90 }
91 }
92