View Javadoc

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