View Javadoc

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