1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.core.principal;
17
18 import org.junit.Assert;
19 import org.junit.Test;
20 import org.kuali.hr.KPMEWebTestCase;
21 import org.kuali.hr.util.HtmlUnitUtil;
22 import org.kuali.kpme.core.FunctionalTest;
23 import org.kuali.kpme.core.util.HrTestConstants;
24
25 import com.gargoylesoftware.htmlunit.html.HtmlPage;
26
27 @FunctionalTest
28 public class PrincipalHRAttributeMaintenanceTest extends KPMEWebTestCase {
29 @Test
30 public void testPrincipalHRAttributeTest() throws Exception{
31
32
33
34 HtmlPage page = HtmlUnitUtil.gotoPageAndLogin(getWebClient(), HrTestConstants.Urls.PRIN_HR_MAINT_URL);
35 page = HtmlUnitUtil.clickInputContainingText(page, "search");
36 HtmlUnitUtil.createTempFile(page);
37 page = HtmlUnitUtil.clickAnchorContainingText(page, "edit","hrPrincipalAttributeId=2004");
38 HtmlUnitUtil.createTempFile(page);
39 Assert.assertTrue("Test that maintenance screen rendered", page.asText().contains("fred"));
40 Assert.assertTrue("Test that maintenance screen rendered", page.asText().contains("Pay Calendar"));
41 Assert.assertTrue("Test that maintenance screen rendered", page.asText().contains("Leave Calendar"));
42 }
43
44
45
46
47
48
49 }