1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.samplu.admin.test;
17
18 import static org.junit.Assert.assertEquals;
19 import static org.junit.Assert.assertTrue;
20
21 import edu.samplu.common.UpgradedSeleniumITBase;
22 import org.junit.Test;
23
24
25
26
27
28
29 public class IdentityRoleIT extends UpgradedSeleniumITBase{
30 @Override
31 public String getTestUrl() {
32 return PORTAL;
33 }
34
35 @Test
36
37
38
39 public void testCreateNew() throws Exception {
40 assertEquals("Kuali Portal Index", selenium.getTitle());
41 selenium.click("link=Administration");
42 selenium.waitForPageToLoad("30000");
43 assertEquals("Kuali Portal Index", selenium.getTitle());
44 selenium.click("link=Role");
45 selenium.waitForPageToLoad("30000");
46 assertEquals("Kuali Portal Index", selenium.getTitle());
47 selenium.selectFrame("iframeportlet");
48 selenium.click("//img[@alt='create new']");
49 selenium.waitForPageToLoad("30000");
50 selenium.click("//input[@name='methodToCall.search' and @value='search']");
51 selenium.waitForPageToLoad("30000");
52 selenium.click("link=return value");
53 selenium.waitForPageToLoad("30000");
54 assertTrue(selenium.isElementPresent("methodToCall.cancel"));
55 selenium.click("methodToCall.cancel");
56 selenium.waitForPageToLoad("30000");
57 selenium.click("methodToCall.processAnswer.button0");
58 selenium.waitForPageToLoad("30000");
59 }
60
61 @Test
62
63
64
65 public void testEditRole() throws Exception {
66 assertEquals("Kuali Portal Index", selenium.getTitle());
67 selenium.click("link=Administration");
68 selenium.waitForPageToLoad("30000");
69 assertEquals("Kuali Portal Index", selenium.getTitle());
70 selenium.click("link=Role");
71 selenium.waitForPageToLoad("30000");
72 assertEquals("Kuali Portal Index", selenium.getTitle());
73 selenium.selectFrame("iframeportlet");
74 selenium.click("//input[@name='methodToCall.search' and @value='search']");
75 selenium.waitForPageToLoad("30000");
76 selenium.click("link=edit");
77 selenium.waitForPageToLoad("30000");
78 assertTrue(selenium.isElementPresent("methodToCall.cancel"));
79 selenium.click("methodToCall.cancel");
80 selenium.waitForPageToLoad("30000");
81 selenium.click("methodToCall.processAnswer.button0");
82 selenium.waitForPageToLoad("30000");
83 }
84 }