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