sambal-kuali 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +6 -0
- data/Gemfile.lock +34 -0
- data/README.md +40 -0
- data/lib/sambal-kuali/base_page_classes.rb +418 -0
- data/lib/sambal-kuali/data_objects/academic_calendar.rb +90 -0
- data/lib/sambal-kuali/data_objects/activity_offering.rb +438 -0
- data/lib/sambal-kuali/data_objects/activity_offering_cluster.rb +52 -0
- data/lib/sambal-kuali/data_objects/course_offering.rb +42 -0
- data/lib/sambal-kuali/data_objects/holiday_calendar.rb +120 -0
- data/lib/sambal-kuali/data_objects/population.rb +257 -0
- data/lib/sambal-kuali/data_objects/rollover.rb +67 -0
- data/lib/sambal-kuali/data_objects/schedule_of_classes.rb +130 -0
- data/lib/sambal-kuali/kuali_base_page.rb +49 -0
- data/lib/sambal-kuali/pages/active_population_lookup.rb +22 -0
- data/lib/sambal-kuali/pages/activity_offering_inquiry.rb +23 -0
- data/lib/sambal-kuali/pages/activity_offering_lookup.rb +11 -0
- data/lib/sambal-kuali/pages/activity_offering_maintenance.rb +93 -0
- data/lib/sambal-kuali/pages/activity_offering_maintenance_view.rb +44 -0
- data/lib/sambal-kuali/pages/add_hold.rb +11 -0
- data/lib/sambal-kuali/pages/appointment_window_lookup.rb +12 -0
- data/lib/sambal-kuali/pages/calendar_search.rb +82 -0
- data/lib/sambal-kuali/pages/copy_holiday_calendar.rb +20 -0
- data/lib/sambal-kuali/pages/course_offering_edit.rb +122 -0
- data/lib/sambal-kuali/pages/course_offering_info_lookup.rb +12 -0
- data/lib/sambal-kuali/pages/create_acad_calendar.rb +22 -0
- data/lib/sambal-kuali/pages/create_course_offering.rb +20 -0
- data/lib/sambal-kuali/pages/create_holiday_calendar.rb +16 -0
- data/lib/sambal-kuali/pages/create_population.rb +19 -0
- data/lib/sambal-kuali/pages/create_process.rb +17 -0
- data/lib/sambal-kuali/pages/delete_term.rb +17 -0
- data/lib/sambal-kuali/pages/delivery_logistics_edit.rb +37 -0
- data/lib/sambal-kuali/pages/department_lookup.rb +37 -0
- data/lib/sambal-kuali/pages/display_schedule_of_classes.rb +132 -0
- data/lib/sambal-kuali/pages/document_search.rb +37 -0
- data/lib/sambal-kuali/pages/edit_academic_calendar.rb +57 -0
- data/lib/sambal-kuali/pages/edit_population.rb +18 -0
- data/lib/sambal-kuali/pages/enrollment.rb +23 -0
- data/lib/sambal-kuali/pages/enrollment_fee_lookup.rb +11 -0
- data/lib/sambal-kuali/pages/format_offering_info_lookup.rb +9 -0
- data/lib/sambal-kuali/pages/header.rb +5 -0
- data/lib/sambal-kuali/pages/hold_lookup.rb +34 -0
- data/lib/sambal-kuali/pages/holiday_calendar_information.rb +25 -0
- data/lib/sambal-kuali/pages/login_page.rb +15 -0
- data/lib/sambal-kuali/pages/main_menu.rb +73 -0
- data/lib/sambal-kuali/pages/manage_course_offerings.rb +72 -0
- data/lib/sambal-kuali/pages/manage_populations.rb +11 -0
- data/lib/sambal-kuali/pages/manage_process.rb +20 -0
- data/lib/sambal-kuali/pages/manage_registration_groups.rb +89 -0
- data/lib/sambal-kuali/pages/manage_registration_windows.rb +12 -0
- data/lib/sambal-kuali/pages/organization_lookup.rb +39 -0
- data/lib/sambal-kuali/pages/perform_rollover.rb +68 -0
- data/lib/sambal-kuali/pages/personnel_lookup.rb +44 -0
- data/lib/sambal-kuali/pages/rollover_confirm_release_to_depts.rb +14 -0
- data/lib/sambal-kuali/pages/rollover_details.rb +40 -0
- data/lib/sambal-kuali/pages/term_info_lookup.rb +10 -0
- data/lib/sambal-kuali/pages/term_information.rb +8 -0
- data/lib/sambal-kuali/pages/term_lookup.rb +15 -0
- data/lib/sambal-kuali/pages/unknown_term_course_offerings.rb +10 -0
- data/lib/sambal-kuali/pages/view_population.rb +18 -0
- data/lib/sambal-kuali/pages/workflow_preferences.rb +34 -0
- data/lib/sambal-kuali/workflows.rb +121 -0
- data/lib/sambal-kuali.rb +8 -0
- data/linux_headless_setup.sh +107 -0
- data/sambal-kuali.gemspec +12 -0
- metadata +129 -0
@@ -0,0 +1,44 @@
|
|
1
|
+
class ActivityOfferingMaintenanceView < ActivityOfferingMaintenanceBase
|
2
|
+
|
3
|
+
expected_element :header
|
4
|
+
|
5
|
+
element(:header) { |b| b.frm.span(class: "uif-headerText-span") }
|
6
|
+
|
7
|
+
value(:status) { |b| b.frm.div(data_label: "Status").span(index: 2).text }
|
8
|
+
value(:term) { |b| b.frm.div(data_label: "Term").span(index: 2).text }
|
9
|
+
value(:activity_type) { |b| b.frm.div(data_label: "Activity Type").span(index: 2).text }
|
10
|
+
value(:format) { |b| b.frm.div(data_label: "Format").span(index: 2).text }
|
11
|
+
value(:activity_code) { |b| b.frm.div(data_label: /Activity Code/).span(index: 2).text }
|
12
|
+
value(:max_enrollment) { |b| b.frm.div(data_label: "Total Maximum Enrollment").span(index: 2).text }
|
13
|
+
|
14
|
+
def get_inst_effort(id)
|
15
|
+
target_person_row(id).cells[INST_EFFORT_COLUMN].text
|
16
|
+
end
|
17
|
+
|
18
|
+
value(:course_url) { |b| b.frm.div(data_label: "Course URL").span(index: 2).text }
|
19
|
+
value(:evaluation) { |b| b.frm.div(data_label: "This lecture requires an evaluation").span().text }
|
20
|
+
value(:honors){ |b| b.frm.div(data_label: "This is an honors course").span().text }
|
21
|
+
|
22
|
+
|
23
|
+
def get_priority(pop_name)
|
24
|
+
target_pool_row(pop_name).cells[PRIORITY_COLUMN].text
|
25
|
+
#target_pool_row(pop_name).div(id: /u886_line/).span(id: /u886_line/).text
|
26
|
+
end
|
27
|
+
|
28
|
+
def get_seats(pop_name)
|
29
|
+
target_pool_row(pop_name).div(id: /seatLimit_line/).text
|
30
|
+
end
|
31
|
+
|
32
|
+
def get_expiration_milestone(pop_name)
|
33
|
+
target_pool_row(pop_name).cells[EXP_MILESTONE_COLUMN].text
|
34
|
+
#target_pool_row(pop_name).div(id: /u927_line/).span(id: /u927_line/).text
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def target_pool_row(pop_name)
|
40
|
+
seat_pools_table.row(text: /#{Regexp.escape(pop_name.to_s)}/)
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class AppointmentWindowLookup < BasePage
|
2
|
+
|
3
|
+
expected_element :year
|
4
|
+
|
5
|
+
wrapper_elements
|
6
|
+
frame_element
|
7
|
+
green_search_buttons
|
8
|
+
|
9
|
+
element(:term) { |b| b.frm.select(name: "criteriaFields[termType]") }
|
10
|
+
element(:year) { |b| b.frm.text_field(name: "criteriaFields[termYear]") }
|
11
|
+
|
12
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
class CalendarSearch < BasePage
|
2
|
+
|
3
|
+
expected_element :name
|
4
|
+
|
5
|
+
wrapper_elements
|
6
|
+
frame_element
|
7
|
+
|
8
|
+
CALENDAR_NAME = 0
|
9
|
+
CALENDAR_START_DATE = 1
|
10
|
+
CALENDAR_END_DATE = 2
|
11
|
+
CALENDAR_STATUS = 3
|
12
|
+
|
13
|
+
element(:search_for_select) { |b| b.frm.select(name: "calendarType") }
|
14
|
+
element(:name) { |b| b.frm.text_field(name: "name") }
|
15
|
+
element(:year) { |b| b.frm.text_field(name: "year") }
|
16
|
+
element(:results_table) { |b| b.frm.table(class: "uif-tableCollectionLayout dataTable") }
|
17
|
+
|
18
|
+
value(:table_info) { |b| b.frm.div(class: "dataTables_info").text }
|
19
|
+
|
20
|
+
action(:search) { |b| b.frm.button(text: "Search").click; b.loading.wait_while_present }
|
21
|
+
action(:next) { |b| b.frm.link(text: "Next").click }
|
22
|
+
action(:previous) { |b| b.frm.link(text: "Previous").click }
|
23
|
+
|
24
|
+
def total_results
|
25
|
+
table_info[/(?<=of )\d+/]
|
26
|
+
end
|
27
|
+
|
28
|
+
def showing_up_to
|
29
|
+
table_info[/(?<=to )\d+/]
|
30
|
+
end
|
31
|
+
|
32
|
+
def search_for cal_or_term, nm, yr=""
|
33
|
+
search_for_select.select cal_or_term
|
34
|
+
setnameyear nm, yr
|
35
|
+
end
|
36
|
+
|
37
|
+
def view calendar
|
38
|
+
results_table.row(text: /#{calendar}/).link(text: "View").click
|
39
|
+
loading.wait_while_present
|
40
|
+
end
|
41
|
+
|
42
|
+
def edit calendar
|
43
|
+
results_table.row(text: /#{calendar}/).link(text: "Edit").click
|
44
|
+
loading.wait_while_present
|
45
|
+
end
|
46
|
+
|
47
|
+
def copy calendar
|
48
|
+
results_table.row(text: /#{calendar}/).link(text: "Copy").click
|
49
|
+
loading.wait_while_present
|
50
|
+
end
|
51
|
+
|
52
|
+
def delete calendar
|
53
|
+
results_table.row(text: /#{calendar}/).link(text: "Delete").click
|
54
|
+
loading.wait_while_present
|
55
|
+
end
|
56
|
+
|
57
|
+
def calendar_status calendar
|
58
|
+
results_table.row(text: /#{calendar}/)[CALENDAR_STATUS].text
|
59
|
+
end
|
60
|
+
|
61
|
+
def results_list
|
62
|
+
list = []
|
63
|
+
results_table.rows.each do |row|
|
64
|
+
list << row[CALENDAR_NAME].text
|
65
|
+
end
|
66
|
+
list.delete_if { |item| item == "Name" }
|
67
|
+
list
|
68
|
+
end
|
69
|
+
|
70
|
+
private
|
71
|
+
|
72
|
+
def setnameyear nm, yr
|
73
|
+
name.set nm
|
74
|
+
year.set yr
|
75
|
+
begin
|
76
|
+
search
|
77
|
+
rescue Timeout::Error => e
|
78
|
+
puts "rescued search..."
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class CopyHolidayCalendar < BasePage
|
2
|
+
|
3
|
+
expected_element :name
|
4
|
+
|
5
|
+
wrapper_elements
|
6
|
+
frame_element
|
7
|
+
|
8
|
+
value(:source_name) { |b| b.frm.div(id: "u38").text } # Persistent ID needed!
|
9
|
+
value(:source_start_date) { |b| b.frm.span(id: "u47").text } # Persistent ID needed!
|
10
|
+
value(:source_end_date) { |b| b.frm.span(id: "u56").text } # Persistent ID needed!
|
11
|
+
|
12
|
+
element(:start_blank_calendar) { |b| b.frm.link(text: "Start a blank calendar instead?").click }
|
13
|
+
element(:choose_different_calendar) { |b| b.frm.link(text: "Choose a Different Calendar") }
|
14
|
+
element(:name) { |b| b.frm.text_field(name: "newCalendarName") }
|
15
|
+
element(:start_date) { |b| b.frm.text_field(name: "newCalendarStartDate") }
|
16
|
+
element(:end_date) { |b| b.frm.text_field(name: "newCalendarEndDate") }
|
17
|
+
|
18
|
+
action(:copy_academic_calendar) { |b| b.frm.button(text: /Copy Holiday Calendar/).click; b.loading.wait_while_present }
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,122 @@
|
|
1
|
+
class CourseOfferingEdit < BasePage
|
2
|
+
|
3
|
+
wrapper_elements
|
4
|
+
validation_elements
|
5
|
+
frame_element
|
6
|
+
|
7
|
+
expected_element :course_code_element
|
8
|
+
|
9
|
+
action(:submit) { |b| b.frm.button(text: "submit").click; b.loading.wait_while_present }
|
10
|
+
action(:cancel) { |b| b.frm.link(text: "cancel").click; b.loading.wait_while_present }
|
11
|
+
|
12
|
+
element(:course_code_element) { |b| b.frm.div(data_label: "Course Offering Code").span(index: 2) }
|
13
|
+
value(:course_code) { |b| b.frm.course_code_element.text() }
|
14
|
+
element(:change_suffix) { |b| b.frm.div(data_label: "Change Suffix").text_field() }
|
15
|
+
|
16
|
+
element(:grading_option_letter) { |b| b.frm.radio(value: "kuali.resultComponent.grade.letter") }
|
17
|
+
element(:credit_type_option_fixed) { |b| b.frm.radio(value: "kuali.result.values.group.type.fixed") }
|
18
|
+
element(:credits) { |b| b.frm.div(data_label: "Credits").text_field() }
|
19
|
+
|
20
|
+
action(:final_exam_option_standard) { |b| b.frm.radio(value: "STANDARD").set; b.loading.wait_while_present}
|
21
|
+
action(:final_exam_option_alternate) { |b| b.frm.radio(value: "ALTERNATE").set; b.loading.wait_while_present }
|
22
|
+
action(:final_exam_option_none) { |b| b.frm.radio(value: "NONE").set; b.loading.wait_while_present }
|
23
|
+
|
24
|
+
element(:delivery_formats_table) { |b| b.frm.div(id: "KS-CourseOfferingEdit-FormatOfferingSubSection").table() }
|
25
|
+
FORMAT_COLUMN = 0
|
26
|
+
GRADE_ROSTER_LEVEL_COLUMN = 1
|
27
|
+
FINAL_EXAM_COLUMN = 2
|
28
|
+
ACTIONS_COLUMN = 3
|
29
|
+
|
30
|
+
element(:select_format_type_add) {|b| b.frm.delivery_formats_table.rows[1].cells[FORMAT_COLUMN].select() }
|
31
|
+
element(:select_grade_roster_level_add) {|b| b.frm.delivery_formats_table.rows[1].cells[GRADE_ROSTER_LEVEL_COLUMN].select() }
|
32
|
+
element(:delivery_format_add_element) {|b| b.frm.delivery_formats_table.rows[1].cells[ACTIONS_COLUMN].button(text: "add") }
|
33
|
+
action(:delivery_format_add) {|b| b.delivery_format_add_element.click; b.loading.wait_while_present }
|
34
|
+
|
35
|
+
def grade_roster_level(format)
|
36
|
+
delivery_format_row(format).cells[GRADE_ROSTER_LEVEL_COLUMN].select().selected_options[0].text
|
37
|
+
end
|
38
|
+
|
39
|
+
def final_exam_driver(format)
|
40
|
+
delivery_format_row(format).cells[FINAL_EXAM_COLUMN].text
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
element(:waitlist_checkbox) { |b| b.frm.div(data_label: "Waitlists").checkbox() }
|
45
|
+
value(:has_waitlist?) { |b| b.frm.waitlist_checkbox.value }
|
46
|
+
action(:waitlist_on ) { |b| b.frm.waitlist_checkbox.set; b.loading.wait_while_present }
|
47
|
+
action(:waitlist_off ) { |b| b.frm.waitlist_checkbox.clear; b.loading.wait_while_present }
|
48
|
+
action(:waitlist_option_course_offering) { |b| b.frm.div(data_label: "Waitlist Level").radio(index: 0).set }
|
49
|
+
action(:waitlist_option_activity_offering) { |b| b.frm.div(data_label: "Waitlist Level").radio(index: 1).set }
|
50
|
+
element(:waitlist_select) { |b| b.frm.div(data_label: "Waitlist Type").select() }
|
51
|
+
|
52
|
+
ID_COLUMN = 0
|
53
|
+
NAME_COLUMN = 1
|
54
|
+
AFFILIATION_COLUMN = 2
|
55
|
+
#ACTIONS_COLUMN -- defined above
|
56
|
+
|
57
|
+
element(:personnel_table) { |b| b.frm.div(id: "KS-ActivityOffering-PersonnelSection").table() }
|
58
|
+
|
59
|
+
element(:add_person_id) { |b| b.personnel_table.rows[1].cells[ID_COLUMN].text_field() }
|
60
|
+
action(:lookup_person) { |b| b.personnel_table.rows[1].cells[ID_COLUMN].image().click; b.loading.wait_while_present } # Need persistent ID!
|
61
|
+
element(:add_affiliation) { |b| b.personnel_table.rows[1].cells[AFFILIATION_COLUMN].select() }
|
62
|
+
element(:add_personnel_button_element) { |b| b.personnel_table.rows[1].button(text: "add") }
|
63
|
+
action(:add_personnel) { |b| b.add_personnel_button_element.click; b.loading.wait_while_present } # Needs persistent ID value
|
64
|
+
|
65
|
+
def update_affiliation(id, affiliation)
|
66
|
+
target_person_row(id).select(index: 0).select affiliation
|
67
|
+
end
|
68
|
+
|
69
|
+
def get_affiliation(id)
|
70
|
+
target_person_row(id).cells[AFFILIATION_COLUMN].select.selected_options[0].text #cell is hard-coded, getting this value was very problematic
|
71
|
+
end
|
72
|
+
|
73
|
+
def get_person_name(id)
|
74
|
+
target_person_row(id).cells[NAME_COLUMN].text #cell is hard-coded, getting this value was very problematic
|
75
|
+
end
|
76
|
+
|
77
|
+
def delete_person(id)
|
78
|
+
target_person_row(id).button.click
|
79
|
+
loading.wait_while_present
|
80
|
+
end
|
81
|
+
|
82
|
+
ORG_ID_COLUMN = 0
|
83
|
+
ORG_NAME_COLUMN = 1
|
84
|
+
ORG_ACTIONS_COLUMN = 2
|
85
|
+
|
86
|
+
element(:admin_orgs_table) { |b| b.frm.div(id: "KS-CourseOfferingEdit-OrganizationSection").table() }
|
87
|
+
|
88
|
+
element(:add_org_id) { |b| b.admin_orgs_table.rows[1].cells[ORG_ID_COLUMN].text_field() }
|
89
|
+
action(:lookup_org) { |b| b.admin_orgs_table.rows[1].cells[ORG_ID_COLUMN].button().click; b.loading.wait_while_present } # Need persistent ID!
|
90
|
+
action(:add_org) { |b| b.admin_orgs_table.rows[1].button(text: "add").click; b.loading.wait_while_present } # Needs persistent ID value
|
91
|
+
|
92
|
+
def get_org_name(id)
|
93
|
+
target_orgs_row(id).cells[NAME_COLUMN].text #cell is hard-coded, getting this value was very problematic
|
94
|
+
end
|
95
|
+
|
96
|
+
def delete_org(id)
|
97
|
+
target_orgs_row(id).button(text: "delete").click
|
98
|
+
loading.wait_while_present
|
99
|
+
end
|
100
|
+
|
101
|
+
element(:honors_flag) { |b| b.div(data_label: "Honors Flag").checkbox() }
|
102
|
+
|
103
|
+
private
|
104
|
+
|
105
|
+
def target_orgs_row(org_id)
|
106
|
+
#workaround here as id field value is not returned in rows[1].text
|
107
|
+
#admin_orgs_table.row(text: /#{Regexp.escape(org_id)}/)
|
108
|
+
admin_orgs_table.rows[1..-1].each do |row|
|
109
|
+
if row.cells[ORG_ID_COLUMN].text_field().value == org_id
|
110
|
+
return row
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
def target_person_row(id)
|
116
|
+
personnel_table.row(text: /#{Regexp.escape(id.to_s)}/)
|
117
|
+
end
|
118
|
+
|
119
|
+
def delivery_format_row(format)
|
120
|
+
delivery_formats_table.row(text: /#{Regexp.escape(format)}/)
|
121
|
+
end
|
122
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class CourseOfferingInfoLookup < BasePage
|
2
|
+
|
3
|
+
expected_element :term_id
|
4
|
+
|
5
|
+
wrapper_elements
|
6
|
+
frame_element
|
7
|
+
green_search_buttons
|
8
|
+
|
9
|
+
element(:term_id) { |b| b.frm.text_field(name: "criteriaFields[termId]") }
|
10
|
+
element(:subject_area) { |b| b.frm.text_field(name: "criteriaFields[subjectArea]") }
|
11
|
+
|
12
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class CreateAcadCalendar < BasePage
|
2
|
+
|
3
|
+
expected_element :copy_from_div
|
4
|
+
|
5
|
+
wrapper_elements
|
6
|
+
frame_element
|
7
|
+
|
8
|
+
element(:copy_from_div) { |b| b.frm.div(id: "KS-AcademicCalendar-CopyPage-From") }
|
9
|
+
value(:source_name) { |b| b.frm.div(id: "copyFromAcalName").text }
|
10
|
+
value(:source_start_date) { |b| b.frm.div(data_label: "Start Date").span(index: 2).text }
|
11
|
+
value(:source_end_date) { |b| b.frm.div(data_label: "End Date").span(index: 2).text }
|
12
|
+
|
13
|
+
action(:start_blank_calendar) { |b| b.frm.link(text: "Start a blank calendar instead?").click; b.loading.wait_while_present }
|
14
|
+
action(:choose_different_calendar) { |b| b.frm.link(text: "Choose a Different Calendar").click; b.loading.wait_while_present }
|
15
|
+
|
16
|
+
element(:name) { |b| b.frm.text_field(name: "academicCalendarInfo.name") }
|
17
|
+
element(:start_date) { |b| b.frm.text_field(name: "academicCalendarInfo.startDate") }
|
18
|
+
element(:end_date) { |b| b.frm.text_field(name: "academicCalendarInfo.endDate") }
|
19
|
+
|
20
|
+
action(:copy_academic_calendar) { |b| b.frm.button(text: /Copy Academic Calendar/).click; b.loading.wait_while_present }
|
21
|
+
|
22
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class CreateCourseOffering < BasePage
|
2
|
+
|
3
|
+
wrapper_elements
|
4
|
+
frame_element
|
5
|
+
|
6
|
+
expected_element :target_term
|
7
|
+
|
8
|
+
crucial_element(:target_term) { |b| b.frm.div(data_label: "Target Term").text_field() }
|
9
|
+
crucial_element(:catalogue_course_code) { |b| b.frm.div(data_label: "Catalog Course Code").text_field() }
|
10
|
+
|
11
|
+
action(:show) { |b| b.frm.button(text: "Show").click; b.loading.wait_while_present } # Persistent ID needed!
|
12
|
+
action(:create_offering) { |b| b.frm.button(id: "createOfferingButton").click; b.loading.wait_while_present }
|
13
|
+
action(:search) { |b| b.frm.link(text: "Search").click; b.loading.wait_while_present } # Persistent ID needed!
|
14
|
+
|
15
|
+
element(:create_offering_from_div) { |b| b.frm.div(id: "KS-CourseOffering-LinkSection").text_field() }
|
16
|
+
action(:create_from_existing_offering) { |b| b.create_offering_from_div.link(text: /Existing Offering/).click }
|
17
|
+
element(:suffix) { |b| b.frm.div(data_label: "Add Suffix").text_field() }
|
18
|
+
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateHolidayCalendar < HolidayBase
|
2
|
+
|
3
|
+
include Holidays
|
4
|
+
|
5
|
+
wrapper_elements
|
6
|
+
frame_element
|
7
|
+
|
8
|
+
expected_element :calendar_name
|
9
|
+
|
10
|
+
element(:calendar_name) { |b| b.frm.text_field(name: "holidayCalendarInfo.name") }
|
11
|
+
element(:organization) { |b| b.frm.select(name: "holidayCalendarInfo.adminOrgId") }
|
12
|
+
element(:start_date) { |b| b.frm.text_field(name: "holidayCalendarInfo.startDate") }
|
13
|
+
element(:end_date) { |b| b.frm.text_field(name: "holidayCalendarInfo.endDate") }
|
14
|
+
element(:holiday_table) { |b| b.frm.div(id: "KS-HolidayCalendar-HolidaySection").table(class: "uif-tableCollectionLayout") }
|
15
|
+
|
16
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class CreatePopulation < PopulationsBase
|
2
|
+
|
3
|
+
expected_element :name
|
4
|
+
|
5
|
+
frame_element
|
6
|
+
population_attribute_elements
|
7
|
+
validation_elements
|
8
|
+
include PopulationEdit
|
9
|
+
|
10
|
+
element(:union_radio) { |b| b.frm.radio(value: "kuali.population.rule.type.union") }
|
11
|
+
|
12
|
+
action(:by_using_populations) { |b| b.frm.link(id: "link_byUsingPopulations").click; b.loading.wait_while_present }
|
13
|
+
action(:by_rule) { |b| b.frm.link(id: "link_byRule").click; b.loading.wait_while_present }
|
14
|
+
action(:union) { |b| b.union_radio.set }
|
15
|
+
action(:intersection) { |b| b.frm.radio(value: "kuali.population.rule.type.intersection").set }
|
16
|
+
action(:exclusion) { |b| b.frm.radio(value: "kuali.population.rule.type.exclusion").set }
|
17
|
+
action(:create) { |b| b.frm.button(id: "button_createPopulation").click; b.loading.wait_while_present }
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateProcess < BasePage
|
2
|
+
|
3
|
+
frame_element
|
4
|
+
wrapper_elements
|
5
|
+
|
6
|
+
expected_element :process_name
|
7
|
+
|
8
|
+
element(:process_name) { |b| b.frm.text_field(name: "name") }
|
9
|
+
element(:process_category) { |b| b.frm.select(name: "typeKey") }
|
10
|
+
element(:hold_description) { |b| b.frm.text_area(name: "descr") }
|
11
|
+
element(:owning_organization) { |b| b.frm.text_field(name: "orgName") }
|
12
|
+
|
13
|
+
action(:lookup_organization) { |b| b.frm.button(title: "Search Field").click; b.loading.wait_while_present }
|
14
|
+
|
15
|
+
action(:create_process) { |b| b.frm.button(text: "Create process").click; b.loading.wait_while_present }
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class DeleteTargetTerm < BasePage
|
2
|
+
|
3
|
+
expected_element :term
|
4
|
+
|
5
|
+
wrapper_elements
|
6
|
+
frame_element
|
7
|
+
|
8
|
+
element(:term) { |b| b.frm.text_field(name: "targetTermCode") }
|
9
|
+
|
10
|
+
value(:term_id) { |b| b.frm.span(id: "u120").text } # Persistent ID needed!
|
11
|
+
value(:term_start_date) { |b| b.frm.span(id: "u131").text } # Persistent ID needed!
|
12
|
+
value(:term_end_date) { |b| b.frm.span(id: "u142").text } # Persistent ID needed!
|
13
|
+
|
14
|
+
action(:go) { |b| b.frm.button(text: "Go").click; b.loading.wait_while_present } # Persistent ID needed!
|
15
|
+
action(:delete_target_term) { |b| b.frm.button(text: "Delete Target Term").click; b.loading.wait_while_present } # Persistent ID needed!
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
class DeliveryLogisticsEdit < ActivityOfferingMaintenanceBase
|
2
|
+
|
3
|
+
expected_element :logistics_div_actual
|
4
|
+
|
5
|
+
element(:add_tba){ |b|b.frm.div(data_label: "TBA").checkbox()}
|
6
|
+
element(:add_days) { |b| b.frm.div(data_label: "Days").text_field() }
|
7
|
+
element(:add_start_time) { |b| b.frm.div(data_label: "Start Time").text_field() }
|
8
|
+
element(:add_start_time_ampm) { |b| b.frm.select(name: "document.newMaintainableObject.dataObject.newScheduleRequest.startTimeAMPM") }
|
9
|
+
element(:add_end_time) { |b| b.frm.div(data_label: "End Time").text_field() }
|
10
|
+
element(:add_end_time_ampm) { |b| b.frm.select(name: "document.newMaintainableObject.dataObject.newScheduleRequest.endTimeAMPM") }
|
11
|
+
element(:add_facility) { |b| b.frm.div(data_label: "Facility").text_field() }
|
12
|
+
action(:lookup_facility) { |b| b.frm.div(data_label: "Facility").button().click; b.loading.wait_while_present }
|
13
|
+
element(:add_room) { |b| b.frm.div(data_label: "Room").text_field() }
|
14
|
+
action(:lookup_room) { |b| b.frm.div(data_label: "Room").button().click; b.loading.wait_while_present }
|
15
|
+
|
16
|
+
action(:facility_features) { |b| b.frm.link(id: "ActivityOffering-DeliveryLogistic-New-Features-Section_toggle").click; b.loading.wait_while_present }
|
17
|
+
element(:feature_list){ |b|b.frm.select(id: "featuresList_control")}
|
18
|
+
action(:add) { |b| b.frm.div(id: "ActivityOffering-DeliveryLogistic-SchedulePage-New").button(text: "Add").click; b.loading.wait_while_present }
|
19
|
+
action(:update_request) { |b| b.frm.div(id: "ActivityOffering-DeliveryLogistic-SchedulePage-New").button(text: "Update Request").click; b.loading.wait_while_present }
|
20
|
+
|
21
|
+
ACTIONS_COLUMN = 7
|
22
|
+
def edit_requested_logistics_features(row)
|
23
|
+
requested_logistics_table.rows[row].cells[ACTIONS_COLUMN].link(text: "Edit").click
|
24
|
+
loading.wait_while_present
|
25
|
+
end
|
26
|
+
|
27
|
+
def delete_requested_logistics_features(row)
|
28
|
+
requested_logistics_table.rows[row].cells[ACTIONS_COLUMN].link(text: "Delete").click
|
29
|
+
loading.wait_while_present
|
30
|
+
end
|
31
|
+
|
32
|
+
action(:save_request) { |b| b.frm.div(class: "uif-footer").button(text: "Save Request").click; b.loading.wait_while_present }
|
33
|
+
action(:save_and_process_request) { |b| b.frm.div(class: "uif-footer").button(text: "Save and Process Request").click; b.loading.wait_while_present }
|
34
|
+
action(:cancel) { |b| b.frm.div(class: "uif-footer").link(text: "Cancel").click; b.loading.wait_while_present }
|
35
|
+
|
36
|
+
|
37
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
class DepartmentLookup < BasePage
|
2
|
+
|
3
|
+
wrapper_elements
|
4
|
+
green_search_buttons
|
5
|
+
expected_element :short_name
|
6
|
+
|
7
|
+
def frm
|
8
|
+
self.frame(class: "fancybox-iframe")
|
9
|
+
end
|
10
|
+
|
11
|
+
element(:short_name) { |b| b.frm.div(data_label: "Short Name").text_field }
|
12
|
+
element(:long_name) { |b| b.frm.div(data_label: "Long Name").text_field }
|
13
|
+
element(:results_table) { |b| b.frm.div(id: "uLookupResults").table(index: 0) }
|
14
|
+
|
15
|
+
element(:paginate_links_span) { |b| b.frm.div(class: "dataTables_paginate paging_full_numbers").span() }
|
16
|
+
|
17
|
+
# Clicks the 'return value' link for the named row
|
18
|
+
def return_value(short_name)
|
19
|
+
target_row(short_name).wait_until_present
|
20
|
+
target_row(short_name).link(text: "return value").wait_until_present
|
21
|
+
begin
|
22
|
+
target_row(short_name).link(text: "return value").click
|
23
|
+
rescue Timeout::Error => e
|
24
|
+
puts "rescued target_row dept lookup"
|
25
|
+
end
|
26
|
+
loading.wait_while_present
|
27
|
+
end
|
28
|
+
|
29
|
+
def target_row(short_name)
|
30
|
+
results_table.row(text: /#{short_name}/)
|
31
|
+
end
|
32
|
+
|
33
|
+
def change_results_page(page_number)
|
34
|
+
results_table.wait_until_present
|
35
|
+
paginate_links_span.link(text: "#{page_number}").click
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,132 @@
|
|
1
|
+
class DisplayScheduleOfClasses < BasePage
|
2
|
+
|
3
|
+
expected_element :term
|
4
|
+
|
5
|
+
wrapper_elements
|
6
|
+
frame_element
|
7
|
+
|
8
|
+
element(:term) { |b| b.frm.div(data_label: "Term").select() }
|
9
|
+
element(:course_search_parm) { |b| b.frm.text_field(id: "course_search_text_control") }
|
10
|
+
element(:course_search_lookup) { |b| b.frm.link(id: "lookup_searchCourseCode") }
|
11
|
+
|
12
|
+
element(:instructor_search_parm) { |b| b.frm.text_field(id: "instructor_search_text_control") }
|
13
|
+
action(:instructor_search_lookup) { |b| b.frm.link(id: "KS-Personnel-LookupView").click; b.loading.wait_while_present }
|
14
|
+
|
15
|
+
element(:department_search_parm) { |b| b.frm.text_field(id: "department_search_text_control") }
|
16
|
+
action(:department_search_lookup) { |b| b.frm.link(id: "lookup_searchDepartment").click; b.loading.wait_while_present }
|
17
|
+
|
18
|
+
element(:title_description_search_parm) { |b| b.frm.text_field(id: "title_description_search_text_control") }
|
19
|
+
#element(:title_description_search_lookup) { |b| b.frm.link(id: "lookup_searchTitleDesc") }
|
20
|
+
|
21
|
+
element(:type_of_search_element) { |b| b.frm.div(data_label: "Type of Search").select() }
|
22
|
+
|
23
|
+
def select_type_of_search(type_of_search)
|
24
|
+
type_of_search_element.select type_of_search
|
25
|
+
loading.wait_while_present
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
action(:show) { |b| b.frm.button(id: "show_button").click; b.loading.wait_while_present}
|
30
|
+
|
31
|
+
element(:course_search_text_info_message) { |b| b.frm.span(id: "course_search_text_info_message") }
|
32
|
+
|
33
|
+
element(:results_table) { |b| b.frm.div(id: "KS-ScheduleOfClasses-CourseOfferingListSection").table() }
|
34
|
+
|
35
|
+
EXPAND_ACTION_COLUMN = 0
|
36
|
+
COURSE_CODE_COLUMN = 1
|
37
|
+
TITLE_COLUMN = 2
|
38
|
+
CREDITS_COLUMN = 3
|
39
|
+
|
40
|
+
def target_course_row(course_code)
|
41
|
+
results_table.row(text: /\b#{course_code}\b/)
|
42
|
+
end
|
43
|
+
|
44
|
+
def get_results_course_list()
|
45
|
+
course_list = []
|
46
|
+
results_table.rows[1..-1].each do |row|
|
47
|
+
course_list << row[COURSE_CODE_COLUMN].text
|
48
|
+
end
|
49
|
+
course_list.delete_if { |course| course == "" }
|
50
|
+
course_list
|
51
|
+
end
|
52
|
+
|
53
|
+
def get_course_code(row)
|
54
|
+
row.cells[COURSE_CODE_COLUMN].text
|
55
|
+
end
|
56
|
+
|
57
|
+
def course_expand(course_code)
|
58
|
+
target_course_row(course_code).cells[EXPAND_ACTION_COLUMN].image().click
|
59
|
+
loading.wait_while_present
|
60
|
+
end
|
61
|
+
|
62
|
+
def course_title(course_code)
|
63
|
+
target_course_row(course_code).cells[TITLE_COLUMN].text()
|
64
|
+
end
|
65
|
+
|
66
|
+
def credits(course_code)
|
67
|
+
target_course_row(course_code).cells[CREDITS_COLUMN].text()
|
68
|
+
end
|
69
|
+
|
70
|
+
def course_ao_information_table(course_code) #must call 'course_expand' first
|
71
|
+
target_course_row(course_code).table
|
72
|
+
end
|
73
|
+
|
74
|
+
def course_description(course_code) #must call 'course_expand' first
|
75
|
+
target_course_row(course_code).div(id: /findThisId/).p.text
|
76
|
+
end
|
77
|
+
|
78
|
+
AO_CODE_COLUMN = 0
|
79
|
+
TYPE_COLUMN = 1
|
80
|
+
DAYS_COLUMN = 2
|
81
|
+
ST_TIME_COLUMN = 3
|
82
|
+
END_TIME_COLUMN = 4
|
83
|
+
BUILDING_COLUMN = 5
|
84
|
+
ROOM_COLUMN = 6
|
85
|
+
INSTRUCTOR_COLUMN = 7
|
86
|
+
MAX_ENR_COLUMN = 8
|
87
|
+
|
88
|
+
def get_ao_list(course_code) #course details must be expanded
|
89
|
+
ao_list = []
|
90
|
+
course_ao_information_table(course_code).rows[1..-1].each do |row|
|
91
|
+
ao_list << row[AO_CODE_COLUMN].text
|
92
|
+
end
|
93
|
+
ao_list
|
94
|
+
end
|
95
|
+
|
96
|
+
def get_instructor_list(course_code) #course details must be expanded
|
97
|
+
instructor_list = []
|
98
|
+
course_ao_information_table(course_code).rows[1..-1].each do |row|
|
99
|
+
instructor_list << row[INSTRUCTOR_COLUMN].text
|
100
|
+
end
|
101
|
+
instructor_list
|
102
|
+
end
|
103
|
+
|
104
|
+
def ao_information_target_row(course_code,activity_offering_code)
|
105
|
+
course_ao_information_table(course_code).rows.each do |row|
|
106
|
+
if row.cells[AO_CODE_COLUMN].text == activity_offering_code
|
107
|
+
return row
|
108
|
+
end
|
109
|
+
end
|
110
|
+
raise "row not found in course information table - course code: #{course_code}, ao_code: #{activity_offering_code}"
|
111
|
+
end
|
112
|
+
|
113
|
+
def self.ao_details_table_accessor_maker(method_name, column)
|
114
|
+
define_method method_name.to_s do |course_code, activity_offering_code|
|
115
|
+
ao_info(course_code, activity_offering_code,column)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
ao_details_table_accessor_maker :get_ao_type, TYPE_COLUMN
|
120
|
+
ao_details_table_accessor_maker :get_ao_days, DAYS_COLUMN
|
121
|
+
ao_details_table_accessor_maker :get_ao_start_time, ST_TIME_COLUMN
|
122
|
+
ao_details_table_accessor_maker :get_ao_end_time, END_TIME_COLUMN
|
123
|
+
ao_details_table_accessor_maker :get_ao_building, BUILDING_COLUMN
|
124
|
+
ao_details_table_accessor_maker :get_ao_room, ROOM_COLUMN
|
125
|
+
ao_details_table_accessor_maker :get_ao_instructor, INSTRUCTOR_COLUMN
|
126
|
+
ao_details_table_accessor_maker :get_ao_max_enr, MAX_ENR_COLUMN
|
127
|
+
|
128
|
+
private
|
129
|
+
def ao_info(course_code, activity_offering_code,column)
|
130
|
+
ao_information_target_row(course_code,activity_offering_code).cells[column].text
|
131
|
+
end
|
132
|
+
end
|