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 org.junit.Assert;
20 import org.junit.Test;
21
22 import edu.samplu.common.ITUtil;
23 import edu.samplu.common.WebDriverLegacyITBase;
24
25
26
27
28
29
30 public class AgendaEditRuleRefreshLegacyIT extends WebDriverLegacyITBase {
31
32 @Override
33 public String getTestUrl(){
34 return ITUtil.PORTAL;
35 }
36
37
38
39
40
41
42 @Test
43
44
45
46 public void testAgendaEditRuleRefreshIT() throws Exception {
47 waitAndClickByLinkText("Agenda Lookup");
48 waitForPageToLoad();
49 selectFrame("iframeportlet");
50 waitAndClickByXpath("//div[@class='uif-boxLayout uif-horizontalBoxLayout clearfix']/button[1]"); // waitAndClick("id=32");
51 Thread.sleep(3000);
52 waitAndClickByXpath("//a[@title='edit Agenda Definition withAgenda Id=T1000 ']", "Does user have edit permissions?"); // waitAndClick("id=194_line0");
53 checkForIncidentReport("");
54 Thread.sleep(3000);
55 waitAndClickByXpath("//li/a[@class='agendaNode ruleNode']"); // waitAndClick("//li[@id='473_node_0_parent_root']/a");
56 waitAndClickByXpath("//li/a[@class='agendaNode logicNode whenTrueNode']");
57 waitAndClickByLinkText("[-] collapse all");
58
59
60 for (int i = 0; i < 6; i++) {
61 for (int second = 0;; second++) {
62 if (second >= 60)
63 Assert.fail("timeout");
64 try {
65 if (isElementPresent(".kr-refresh-button"))
66 break;
67 } catch (Exception e) {}
68 Thread.sleep(1000);
69 }
70
71 waitAndClick("button.kr-refresh-button");
72 }
73 }
74
75 }
76