View Javadoc
1   /**
2    * Copyright 2004-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.hr.core.department;
17  
18  import org.junit.Test;
19  import org.kuali.hr.KPMEWebTestCase;
20  import org.kuali.kpme.core.FunctionalTest;
21  
22  @FunctionalTest
23  public class DepartmentTest extends KPMEWebTestCase {
24  	@Test
25  	public void testDepartmentMaint() throws Exception { /*
26  		HtmlPage deptLookup = HtmlUnitUtil.gotoPageAndLogin(getWebClient(), HrTestConstants.Urls.DEPT_MAINT_URL);
27  		deptLookup = HtmlUnitUtil.clickInputContainingText(deptLookup, "search");
28  		Assert.assertTrue("Page contains test dept", deptLookup.asText().contains("TEST"));
29  		HtmlUnitUtil.createTempFile(deptLookup);
30  		HtmlPage maintPage = HtmlUnitUtil.clickAnchorContainingText(deptLookup, "edit","100");
31  
32  		Assert.assertTrue("Maintenance Page contains test dept",maintPage.asText().contains("TEST"));
33  		Assert.assertTrue("Maintenance Page contains test dept",maintPage.asText().contains("Time Department Admin"));
34  	}
35  	
36  	@Override
37  	public void setUp() throws Exception {
38  		super.setUp();
39  		Department dept = new Department();
40  		dept.setHrDeptId("1001");
41  		dept.setDept("__TEST");
42  		dept.setDescription("TESTING_DEPT");
43  		dept.setActive(true);
44          dept.setLocation("BL");
45          dept.setUserPrincipalId("admin");
46  		KRADServiceLocatorWeb.getLegacyDataAdapter().save(dept);*/
47  	}
48  }