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 IdentityPersonBlanketAppIT extends UpgradedSeleniumITBase {
30 @Override
31 public String getTestUrl() {
32 return PORTAL;
33 }
34
35 @Test
36 public void testPerson() throws Exception {
37 assertEquals("Kuali Portal Index", selenium.getTitle());
38 selenium.click("link=Administration");
39 selenium.waitForPageToLoad("30000");
40 assertEquals("Kuali Portal Index", selenium.getTitle());
41 selenium.click("link=Person");
42 selenium.waitForPageToLoad("30000");
43 assertEquals("Kuali Portal Index", selenium.getTitle());
44 selenium.selectFrame("iframeportlet");
45 selenium.click("//img[@alt='create new']");
46 selenium.waitForPageToLoad("30000");
47 String docId = selenium.getText("//div[@id='headerarea']/div/table/tbody/tr[1]/td[1]");
48 selenium.type("//input[@id='document.documentHeader.documentDescription']", "Validation Test Person");
49 selenium.type("//input[@id='document.principalName']", "Principal");
50 selenium.select("newAffln.affiliationTypeCode", "label=Affiliate");
51 selenium.select("newAffln.campusCode", "label=BX - BLGTN OFF CAMPUS");
52 selenium.select("newAffln.campusCode", "label=BL - BLOOMINGTON");
53 selenium.click("newAffln.dflt");
54 selenium.click("methodToCall.addAffln.anchor");
55 selenium.waitForPageToLoad("30000");
56 selenium.click("tab-Contact-imageToggle");
57 selenium.select("newName.namePrefix", "label=Mr");
58 selenium.type("newName.firstName", "First");
59 selenium.type("newName.lastName", "Last");
60 selenium.select("newName.nameSuffix", "label=Mr");
61 selenium.click("newName.dflt");
62 selenium.click("methodToCall.addName.anchor");
63 selenium.waitForPageToLoad("30000");
64 selenium.click("methodToCall.blanketApprove");
65 selenium.waitForPageToLoad("30000");
66 selenium.selectWindow("null");
67 selenium.click("//img[@alt='doc search']");
68 selenium.waitForPageToLoad("30000");
69 assertEquals("Kuali Portal Index", selenium.getTitle());
70 selenium.selectFrame("iframeportlet");
71 selenium.click("//input[@name='methodToCall.search' and @value='search']");
72 selenium.waitForPageToLoad("30000");
73
74 docId= "link=" + docId;
75 assertTrue(selenium.isElementPresent(docId));
76 if(selenium.isElementPresent(docId)){
77 assertEquals("FINAL", selenium.getText("//table[@id='row']/tbody/tr[1]/td[4]"));
78 }else{
79 assertEquals(docId, selenium.getText("//table[@id='row']/tbody/tr[1]/td[1]"));
80 assertEquals("FINAL", selenium.getText("//table[@id='row']/tbody/tr[1]/td[4]"));
81 }
82 }
83 }