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 IdentityResponsibilityBlanketAppIT extends UpgradedSeleniumITBase {
30
31 public static final String LABEL_KUALI_KUALI_SYSTEMS = "label=KUALI - Kuali Systems";
32
33 @Override
34 public String getTestUrl() {
35 return PORTAL;
36 }
37
38 @Test
39 public void testResponsibility() 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=Responsibility");
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 String docId = selenium.getText("//div[@id='headerarea']/div/table/tbody/tr[1]/td[1]");
51 selenium.type("//input[@id='document.documentHeader.documentDescription']", "Validation Test Responsibility");
52 selenium.select("//select[@id='document.newMaintainableObject.namespaceCode']", LABEL_KUALI_KUALI_SYSTEMS);
53 selenium.type("//input[@id='document.newMaintainableObject.name']", "Validation Test Responsibility1");
54 selenium.type("//input[@id='document.newMaintainableObject.documentTypeName']", "Test");
55 selenium.type("//input[@id='document.newMaintainableObject.routeNodeName']", "Test");
56 selenium.click("//input[@id='document.newMaintainableObject.actionDetailsAtRoleMemberLevel']");
57 selenium.click("//input[@id='document.newMaintainableObject.required']");
58 selenium.click("methodToCall.blanketApprove");
59 selenium.waitForPageToLoad("30000");
60 selenium.selectWindow("null");
61 selenium.click("//img[@alt='doc search']");
62 selenium.waitForPageToLoad("30000");
63 assertEquals("Kuali Portal Index", selenium.getTitle());
64 selenium.selectFrame("iframeportlet");
65 selenium.click("//input[@name='methodToCall.search' and @value='search']");
66 selenium.waitForPageToLoad("30000");
67 docId= "link=" + docId;
68 assertTrue(selenium.isElementPresent(docId));
69 if(selenium.isElementPresent(docId)){
70 assertEquals("ENROUTE", selenium.getText("//table[@id='row']/tbody/tr[1]/td[4]"));
71 }else{
72 assertEquals(docId, selenium.getText("//table[@id='row']/tbody/tr[1]/td[1]"));
73 assertEquals("ENROUTE", selenium.getText("//table[@id='row']/tbody/tr[1]/td[4]"));
74 }
75 }
76 }