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