1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.core.job;
17
18 import junit.framework.Assert;
19
20 import org.junit.Test;
21 import org.kuali.hr.KPMEWebTestCase;
22 import org.kuali.hr.util.HtmlUnitUtil;
23 import org.kuali.kpme.core.FunctionalTest;
24 import org.kuali.kpme.core.util.HrTestConstants;
25
26 import com.gargoylesoftware.htmlunit.html.HtmlPage;
27
28
29
30
31
32
33 @FunctionalTest
34 public class JobMaintenanceTest extends KPMEWebTestCase {
35
36 private static final String CALENDAR_GROUP = "BWN-CAL";
37 private static Long jobId = 23L;
38 private static Long jobNumber = 5L;
39 public static final String TEST_USER = "admin";
40
41 @Test
42 public void jobMaintenancePage() throws Exception{
43 HtmlPage lookupPage = HtmlUnitUtil.gotoPageAndLogin(getWebClient(), HrTestConstants.Urls.JOB_MAINT_URL);
44 lookupPage = HtmlUnitUtil.clickInputContainingText(lookupPage, "search");
45 HtmlUnitUtil.createTempFile(lookupPage);
46 Assert.assertTrue("Page contains admin entry", lookupPage.asText().contains("admin"));
47
48 HtmlPage editPage = HtmlUnitUtil.clickAnchorContainingText(lookupPage, "edit", jobId.toString());
49 HtmlUnitUtil.createTempFile(editPage);
50 Assert.assertTrue("Maintenance Page contains the correct job number", editPage.asText().contains(jobNumber.toString()));
51 }
52
53 @Test
54 public void testSaveAndFetchObject() throws Exception{
55
56
57 }
58
59 @Test
60 public void testMaintenancePageNew() throws Exception {
61
62
63
64 }
65
66 @Test
67 public void testMaintenancePageEdit() throws Exception {
68 HtmlPage lookupPage = HtmlUnitUtil.gotoPageAndLogin(getWebClient(), HrTestConstants.Urls.JOB_MAINT_URL);
69 lookupPage = HtmlUnitUtil.clickInputContainingText(lookupPage, "search");
70 HtmlPage editPage = HtmlUnitUtil.clickAnchorContainingText(lookupPage, "edit", jobId.toString());
71
72
73
74
75
76
77
78
79 }
80 }
81