View Javadoc
1   /**
2    * Copyright 2005-2013 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.rice.edl.impl;
17  
18  import org.junit.Test;
19  import org.kuali.rice.kew.test.KEWTestCase;
20  
21  /**
22   * Tests the web GUI for the ActionList.
23   *
24   * @author Kuali Rice Team (rice.collab@kuali.org)
25   */
26  public class OfficeOfAffirmativeActionTest extends KEWTestCase {
27  
28  	//private static final String URL_PREFIX = "http://localhost:9952/en-test/";
29  	private final String OAA_DIR = getBaseDir() + "/src/test/config/edoclite/OfficeOfAffirmativeAction/";
30  
31  	protected void loadTestData() throws Exception {
32  		// workgroups
33  		loadXmlFile("OAATestWorkgroups.xml");
34  
35  		// attributes
36  		loadXmlFileFromFileSystem(OAA_DIR + "EdocliteDepartmentSearchAttribute.xml");
37  		loadXmlFileFromFileSystem(OAA_DIR + "EdocliteExpectedStartDateSearchAttribute.xml");
38          loadXmlFileFromFileSystem(OAA_DIR + "EdocliteInitiatorAttribute.xml");
39          loadXmlFileFromFileSystem(OAA_DIR + "EdocliteOAASearchAttribute.xml");
40          loadXmlFileFromFileSystem(OAA_DIR + "EdocliteSalaryGradeSearchAttribute.xml");
41          loadXmlFileFromFileSystem(OAA_DIR + "EdocliteSchoolAttribute.xml");
42          loadXmlFileFromFileSystem(OAA_DIR + "EdocliteSchoolSearchAttribute.xml");
43          loadXmlFileFromFileSystem(OAA_DIR + "EdocliteTotalAMFSearchAttribute.xml");
44          loadXmlFileFromFileSystem(OAA_DIR + "EdocliteTotalApplicantsSearchAttribute.xml");
45  
46          // templates
47          loadXmlFileFromFileSystem(OAA_DIR + "OfficeOfAffirmativeActionInitiatorAcknowledgmentRuleTemplate.xml");
48          loadXmlFileFromFileSystem(OAA_DIR + "OfficeOfAffirmativeActionOfficerRuleTemplate.xml");
49          loadXmlFileFromFileSystem(OAA_DIR + "OfficeOfAffirmativeActionSchoolAcknowledgementRuleTemplate.xml");
50          loadXmlFileFromFileSystem(OAA_DIR + "OfficeOfAffirmativeActionSchoolRuleTemplate.xml");
51          loadXmlFileFromFileSystem(OAA_DIR + "OfficeOfAffirmativeActionViceChancellorRuleTemplate.xml");
52  
53          // document types
54          loadXmlFileFromFileSystem(OAA_DIR + "OfficeOfAffirmativeActionDocType.xml");
55          loadXmlFileFromFileSystem(OAA_DIR + "InterviewRequestDocType.xml");
56          loadXmlFileFromFileSystem(OAA_DIR + "OfferRequestDocType.xml");
57          loadXmlFileFromFileSystem(OAA_DIR + "SearchStatusDocType.xml");
58          loadXmlFileFromFileSystem(OAA_DIR + "VacancyNoticeDocType.xml");
59          loadXmlFileFromFileSystem(OAA_DIR + "WaiverRequestDocType.xml");
60  
61          // forms
62          loadXmlFileFromFileSystem(OAA_DIR + "InterviewRequestForm.xml");
63          loadXmlFileFromFileSystem(OAA_DIR + "OfferRequestForm.xml");
64          loadXmlFileFromFileSystem(OAA_DIR + "SearchStatusForm.xml");
65          loadXmlFileFromFileSystem(OAA_DIR + "VacancyNoticeForm.xml");
66          loadXmlFileFromFileSystem(OAA_DIR + "WaiverRequestForm.xml");
67  
68          // rules
69          loadXmlFileFromFileSystem(OAA_DIR + "OfficeOfAffirmativeActionPilotRules.xml");
70  
71          // widgets
72          loadXmlFile(EDLXmlUtils.class, "default-widgets.xml");
73      }
74  
75  	@Test public void testOAAEdocLiteLoad() {
76  	    // just a test to allow the setup method above to run and verify the xml import
77  	    // of these files
78  	}
79  
80  	/**
81  	 * Tests the Office of Affirmative Action interview request.
82  	 */
83  //	@Test public void testInterviewRequest() throws Exception {
84  //		WebClient webClient = new WebClient();
85  //
86  //		URL url = new URL (URL_PREFIX + "EDocLite?userAction=initiate&edlName=InterviewRequest");
87  //		HtmlPage page = (HtmlPage)webClient.getPage(url);
88  //
89  //		// On the first access, we should end up on the backdoor and login as quickstart
90  //		HtmlForm form = (HtmlForm) page.getForms().get(0);
91  //		HtmlTextInput textInput = (HtmlTextInput)form.getInputByName("__login_user");
92  //		assertEquals("quickstart", textInput.getDefaultValue());
93  //		page = (HtmlPage)form.submit();
94  //
95  //		// we should be on the EDL form now, check that theres a form here
96  //		assertEquals("Should be one form.", 1, page.getForms().size());
97  //
98  //		// TOOD, fill out the form, route it, verify it goes where it needs to go
99  //		// 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 }