1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package edu.sampleu.admin;
18
19 import org.junit.Test;
20 import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
21 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
22 import org.kuali.rice.testtools.selenium.WebDriverUtils;
23
24
25
26
27
28 public class AgendaEditRuleRefreshAft extends WebDriverLegacyITBase {
29
30 public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=Agenda%20Lookup&channelUrl="
31 + WebDriverUtils.getBaseUrlString() + AutomatedFunctionalTestUtils.KRAD_LOOKUP_METHOD
32 + "org.kuali.rice.krms.impl.repository.AgendaBo"
33 + AutomatedFunctionalTestUtils.SHOW_MAINTENANCE_LINKS
34 + "&returnLocation=" + AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.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 waitAndClickByXpath("//a[@title='edit Agenda Definition with Agenda Id=T1000']",
52 "Does user have edit permissions?");
53 waitAndClickByXpath("//li/a[@class='agendaNode ruleNode']"); // jiraAwareWaitAndClick("//li[@id='473_node_0_parent_root']/a");
54 waitAndClickByXpath("//li/a[@class='agendaNode logicNode whenTrueNode']");
55 waitAndClickByLinkText("[-] collapse all");
56
57
58 for (int i = 0; i < 6; i++) {
59 for (int second = 0;; second++) {
60 if (second >= waitSeconds)
61 jiraAwareFail(TIMEOUT_MESSAGE);
62 try {
63 if (isElementPresent(".kr-refresh-button"))
64 break;
65 } catch (Exception e) {}
66 Thread.sleep(1000);
67 }
68 waitAndClick("button.kr-refresh-button");
69 }
70 passed();
71 }
72
73
74
75
76 @Test
77 public void testAgendaEditRuleRefreshBookmark() throws Exception {
78 testAgendaEditRuleRefresh();
79 }
80
81
82
83
84 @Test
85 public void testAgendaEditRuleRefreshNav() throws Exception {
86 testAgendaEditRuleRefresh();
87 }
88 }
89