001/** 002 * Copyright 2004-2014 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.hr.core.department; 017 018import org.junit.Test; 019import org.kuali.hr.KPMEWebTestCase; 020import org.kuali.kpme.core.FunctionalTest; 021 022@FunctionalTest 023public class DepartmentTest extends KPMEWebTestCase { 024 @Test 025 public void testDepartmentMaint() throws Exception { /* 026 HtmlPage deptLookup = HtmlUnitUtil.gotoPageAndLogin(getWebClient(), HrTestConstants.Urls.DEPT_MAINT_URL); 027 deptLookup = HtmlUnitUtil.clickInputContainingText(deptLookup, "search"); 028 Assert.assertTrue("Page contains test dept", deptLookup.asText().contains("TEST")); 029 HtmlUnitUtil.createTempFile(deptLookup); 030 HtmlPage maintPage = HtmlUnitUtil.clickAnchorContainingText(deptLookup, "edit","100"); 031 032 Assert.assertTrue("Maintenance Page contains test dept",maintPage.asText().contains("TEST")); 033 Assert.assertTrue("Maintenance Page contains test dept",maintPage.asText().contains("Time Department Admin")); 034 } 035 036 @Override 037 public void setUp() throws Exception { 038 super.setUp(); 039 Department dept = new Department(); 040 dept.setHrDeptId("1001"); 041 dept.setDept("__TEST"); 042 dept.setDescription("TESTING_DEPT"); 043 dept.setActive(true); 044 dept.setLocation("BL"); 045 dept.setUserPrincipalId("admin"); 046 KRADServiceLocatorWeb.getLegacyDataAdapter().save(dept);*/ 047 } 048}