001/** 002 * Copyright 2005-2013 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.rice.edl.impl; 017 018import org.junit.Test; 019import org.kuali.rice.kew.test.KEWTestCase; 020 021/** 022 * Tests the web GUI for the ActionList. 023 * 024 * @author Kuali Rice Team (rice.collab@kuali.org) 025 */ 026public class OfficeOfAffirmativeActionTest extends KEWTestCase { 027 028 //private static final String URL_PREFIX = "http://localhost:9952/en-test/"; 029 private final String OAA_DIR = getBaseDir() + "/src/test/config/edoclite/OfficeOfAffirmativeAction/"; 030 031 protected void loadTestData() throws Exception { 032 // workgroups 033 loadXmlFile("OAATestWorkgroups.xml"); 034 035 // attributes 036 loadXmlFileFromFileSystem(OAA_DIR + "EdocliteDepartmentSearchAttribute.xml"); 037 loadXmlFileFromFileSystem(OAA_DIR + "EdocliteExpectedStartDateSearchAttribute.xml"); 038 loadXmlFileFromFileSystem(OAA_DIR + "EdocliteInitiatorAttribute.xml"); 039 loadXmlFileFromFileSystem(OAA_DIR + "EdocliteOAASearchAttribute.xml"); 040 loadXmlFileFromFileSystem(OAA_DIR + "EdocliteSalaryGradeSearchAttribute.xml"); 041 loadXmlFileFromFileSystem(OAA_DIR + "EdocliteSchoolAttribute.xml"); 042 loadXmlFileFromFileSystem(OAA_DIR + "EdocliteSchoolSearchAttribute.xml"); 043 loadXmlFileFromFileSystem(OAA_DIR + "EdocliteTotalAMFSearchAttribute.xml"); 044 loadXmlFileFromFileSystem(OAA_DIR + "EdocliteTotalApplicantsSearchAttribute.xml"); 045 046 // templates 047 loadXmlFileFromFileSystem(OAA_DIR + "OfficeOfAffirmativeActionInitiatorAcknowledgmentRuleTemplate.xml"); 048 loadXmlFileFromFileSystem(OAA_DIR + "OfficeOfAffirmativeActionOfficerRuleTemplate.xml"); 049 loadXmlFileFromFileSystem(OAA_DIR + "OfficeOfAffirmativeActionSchoolAcknowledgementRuleTemplate.xml"); 050 loadXmlFileFromFileSystem(OAA_DIR + "OfficeOfAffirmativeActionSchoolRuleTemplate.xml"); 051 loadXmlFileFromFileSystem(OAA_DIR + "OfficeOfAffirmativeActionViceChancellorRuleTemplate.xml"); 052 053 // document types 054 loadXmlFileFromFileSystem(OAA_DIR + "OfficeOfAffirmativeActionDocType.xml"); 055 loadXmlFileFromFileSystem(OAA_DIR + "InterviewRequestDocType.xml"); 056 loadXmlFileFromFileSystem(OAA_DIR + "OfferRequestDocType.xml"); 057 loadXmlFileFromFileSystem(OAA_DIR + "SearchStatusDocType.xml"); 058 loadXmlFileFromFileSystem(OAA_DIR + "VacancyNoticeDocType.xml"); 059 loadXmlFileFromFileSystem(OAA_DIR + "WaiverRequestDocType.xml"); 060 061 // forms 062 loadXmlFileFromFileSystem(OAA_DIR + "InterviewRequestForm.xml"); 063 loadXmlFileFromFileSystem(OAA_DIR + "OfferRequestForm.xml"); 064 loadXmlFileFromFileSystem(OAA_DIR + "SearchStatusForm.xml"); 065 loadXmlFileFromFileSystem(OAA_DIR + "VacancyNoticeForm.xml"); 066 loadXmlFileFromFileSystem(OAA_DIR + "WaiverRequestForm.xml"); 067 068 // rules 069 loadXmlFileFromFileSystem(OAA_DIR + "OfficeOfAffirmativeActionPilotRules.xml"); 070 071 // widgets 072 loadXmlFile(EDLXmlUtils.class, "default-widgets.xml"); 073 } 074 075 @Test public void testOAAEdocLiteLoad() { 076 // just a test to allow the setup method above to run and verify the xml import 077 // of these files 078 } 079 080 /** 081 * Tests the Office of Affirmative Action interview request. 082 */ 083// @Test public void testInterviewRequest() throws Exception { 084// WebClient webClient = new WebClient(); 085// 086// URL url = new URL (URL_PREFIX + "EDocLite?userAction=initiate&edlName=InterviewRequest"); 087// HtmlPage page = (HtmlPage)webClient.getPage(url); 088// 089// // On the first access, we should end up on the backdoor and login as quickstart 090// HtmlForm form = (HtmlForm) page.getForms().get(0); 091// HtmlTextInput textInput = (HtmlTextInput)form.getInputByName("__login_user"); 092// assertEquals("quickstart", textInput.getDefaultValue()); 093// page = (HtmlPage)form.submit(); 094// 095// // we should be on the EDL form now, check that theres a form here 096// assertEquals("Should be one form.", 1, page.getForms().size()); 097// 098// // TOOD, fill out the form, route it, verify it goes where it needs to go 099// // do a few different permutations of data on a few different EDL's 100// } 101// 102// 103// @Test public void testOfferRequest() throws Exception { 104// // TODO 105// } 106// 107// @Test public void testSearchStatus() throws Exception { 108// // TODO 109// } 110// 111// @Test public void testVacancyNotice() throws Exception { 112// // TODO 113// } 114// 115// @Test public void testWaiverRequest() throws Exception { 116// // TODO 117// } 118 119}