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.ITUtil;
20  import edu.samplu.common.UpgradedSeleniumITBase;
21  import org.junit.Test;
22  
23  import static org.junit.Assert.fail;
24  
25  
26  
27  
28  
29  public class AgendaEditRuleRefreshIT extends UpgradedSeleniumITBase {
30      @Override
31      public String getTestUrl() {
32          return ITUtil.PORTAL;
33      }
34  
35  	@Test
36      
37  
38  
39  	public void testAgendaEditRuleRefreshIT() throws Exception {
40  		waitAndClick("link=Agenda Lookup");
41  		waitForPageToLoad();
42  		selectFrame("iframeportlet");
43  		waitAndClick("css=button:contains(earch)"); 
44          Thread.sleep(3000);
45  		waitAndClick("css=a[title='edit Agenda Definition withAgenda Id=T1000 ']", "Does user have edit permissions?");  
46          checkForIncidentReport("");
47  		waitAndClick("css=div.uif-message:contains(Rule1: stub rule lorem ipsum)"); 
48          waitAndClick("css=//li/a/span.uif-message:contains('When TRUE')");
49  		waitAndClick("link=[-] collapse all");
50  
51          
52          for (int i=0; i<6; i++) {
53              for (int second = 0;; second++) {
54                  if (second >= 60) fail("timeout");
55                  try { if (isElementPresent("css=button.kr-refresh-button")) break; } catch (Exception e) {}
56                  Thread.sleep(1000);
57              }
58  
59              waitAndClick("css=button.kr-refresh-button");
60          }
61  	}
62  }