ole-qa-framework 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +882 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +45 -0
- data/LICENSE.md +14 -0
- data/README.md +17 -0
- data/Rakefile.rb +25 -0
- data/examples/README.md +57 -0
- data/examples/create_bib_record.rb +64 -0
- data/examples/create_requisition.rb +96 -0
- data/examples/purap_workflow_test.rb +185 -0
- data/lib/common/common_object.rb +57 -0
- data/lib/common/data_object.rb +21 -0
- data/lib/common/line_object.rb +44 -0
- data/lib/common/page.rb +72 -0
- data/lib/common/subline_object.rb +47 -0
- data/lib/config/default_options.yml +7 -0
- data/lib/docstore/docstore.rb +13 -0
- data/lib/module/qa_data_helpers.rb +17 -0
- data/lib/module/qa_helpers.rb +153 -0
- data/lib/module/qa_page_helpers.rb +33 -0
- data/lib/ole-qa-framework.rb +178 -0
- data/lib/ole_qa_framework/COMPATIBILITY.rb +20 -0
- data/lib/ole_qa_framework/VERSION.rb +20 -0
- data/lib/olefs/common/e_doc.rb +79 -0
- data/lib/olefs/common/line_object.rb +39 -0
- data/lib/olefs/common/lookup.rb +30 -0
- data/lib/olefs/common/purap_document.rb +73 -0
- data/lib/olefs/objects/line_item.rb +105 -0
- data/lib/olefs/objects/new_line_item.rb +44 -0
- data/lib/olefs/objects/new_preq_line_item.rb +43 -0
- data/lib/olefs/objects/new_receiving_line.rb +42 -0
- data/lib/olefs/objects/preq_line_item.rb +68 -0
- data/lib/olefs/objects/receiving_line.rb +88 -0
- data/lib/olefs/pages/building_lookup.rb +36 -0
- data/lib/olefs/pages/main_menu.rb +23 -0
- data/lib/olefs/pages/payment_request.rb +67 -0
- data/lib/olefs/pages/payment_request_creation.rb +44 -0
- data/lib/olefs/pages/purchase_order.rb +68 -0
- data/lib/olefs/pages/receiving_document.rb +49 -0
- data/lib/olefs/pages/requisition.rb +61 -0
- data/lib/olefs/pages/vendor_lookup.rb +40 -0
- data/lib/olefs/subobjects/accounting_line.rb +46 -0
- data/lib/olefs/subobjects/copies_line.rb +32 -0
- data/lib/olefs/subobjects/exception_notes_line.rb +26 -0
- data/lib/olefs/subobjects/invoice_notes_line.rb +25 -0
- data/lib/olefs/subobjects/new_accounting_line.rb +43 -0
- data/lib/olefs/subobjects/new_copies_line.rb +37 -0
- data/lib/olefs/subobjects/new_exception_notes_line.rb +30 -0
- data/lib/olefs/subobjects/new_invoice_notes_line.rb +35 -0
- data/lib/olefs/subobjects/new_notes_line.rb +36 -0
- data/lib/olefs/subobjects/new_receipt_notes_line.rb +35 -0
- data/lib/olefs/subobjects/notes_line.rb +29 -0
- data/lib/olefs/subobjects/processing_line.rb +24 -0
- data/lib/olefs/subobjects/receipt_notes_line.rb +25 -0
- data/lib/olels/common/e_doc.rb +23 -0
- data/lib/olels/common/editor.rb +92 -0
- data/lib/olels/common/line_object.rb +39 -0
- data/lib/olels/common/lookup.rb +30 -0
- data/lib/olels/objects/access_info_line.rb +25 -0
- data/lib/olels/objects/data_line.rb +31 -0
- data/lib/olels/objects/editor_note.rb +79 -0
- data/lib/olels/objects/holdings_note.rb +26 -0
- data/lib/olels/objects/item_note.rb +26 -0
- data/lib/olels/objects/ownership_extent_line.rb +40 -0
- data/lib/olels/pages/bib_editor.rb +63 -0
- data/lib/olels/pages/describe_workbench.rb +42 -0
- data/lib/olels/pages/instance_editor.rb +80 -0
- data/lib/olels/pages/item_editor.rb +91 -0
- data/lib/olels/pages/loan.rb +102 -0
- data/lib/olels/pages/main_menu.rb +31 -0
- data/lib/olels/pages/patron_lookup.rb +44 -0
- data/lib/olels/pages/return.rb +64 -0
- data/lib/olels/subobjects/ownership_note.rb +26 -0
- data/ole-qa-framework.gemspec +30 -0
- data/pkg/ole-qa-framework-2.1.0.gem +0 -0
- data/spec/common/browser_spec.rb +37 -0
- data/spec/common/data_object_spec.rb +37 -0
- data/spec/common/line_object_spec.rb +49 -0
- data/spec/common/page_spec.rb +44 -0
- data/spec/common/subline_object_spec.rb +54 -0
- data/spec/modules/qa_helpers_spec.rb +55 -0
- data/spec/modules/qa_page_helpers_spec.rb +43 -0
- data/spec/olefs/accounting_line_spec.rb +85 -0
- data/spec/olefs/building_lookup_spec.rb +45 -0
- data/spec/olefs/copies_line_spec.rb +70 -0
- data/spec/olefs/edocs_spec.rb +75 -0
- data/spec/olefs/exception_notes_line_spec.rb +52 -0
- data/spec/olefs/invoice_notes_line_spec.rb +45 -0
- data/spec/olefs/line_item_spec.rb +155 -0
- data/spec/olefs/lookup_spec.rb +44 -0
- data/spec/olefs/main_menu_spec.rb +34 -0
- data/spec/olefs/notes_line_spec.rb +65 -0
- data/spec/olefs/patron_lookup_spec.rb +54 -0
- data/spec/olefs/payment_request_spec.rb +85 -0
- data/spec/olefs/preq_creation_spec.rb +43 -0
- data/spec/olefs/preq_line_item_spec.rb +111 -0
- data/spec/olefs/processing_line_spec.rb +44 -0
- data/spec/olefs/purap_document_spec.rb +58 -0
- data/spec/olefs/purchase_order_spec.rb +77 -0
- data/spec/olefs/receipt_notes_line_spec.rb +54 -0
- data/spec/olefs/receive_spec.rb +66 -0
- data/spec/olefs/receiving_line_spec.rb +125 -0
- data/spec/olefs/requisition_spec.rb +83 -0
- data/spec/olefs/vendor_lookup_spec.rb +49 -0
- data/spec/olels/access_info_line_spec.rb +40 -0
- data/spec/olels/bib_editor_spec.rb +84 -0
- data/spec/olels/data_line_spec.rb +44 -0
- data/spec/olels/describe_workbench_spec.rb +44 -0
- data/spec/olels/editor_spec.rb +56 -0
- data/spec/olels/edocs_spec.rb +42 -0
- data/spec/olels/holdings_note_spec_spec.rb +41 -0
- data/spec/olels/instance_editor_spec.rb +81 -0
- data/spec/olels/item_editor_spec.rb +94 -0
- data/spec/olels/item_note_spec.rb +41 -0
- data/spec/olels/loan_spec.rb +104 -0
- data/spec/olels/lookup_spec.rb +38 -0
- data/spec/olels/main_menu_spec.rb +35 -0
- data/spec/olels/ownership_extent_line_spec.rb +58 -0
- data/spec/olels/ownership_note_spec.rb +41 -0
- data/spec/olels/return_spec.rb +72 -0
- data/spec/spec_helper.rb +21 -0
- data/spec/workflows/purap_spec.rb +221 -0
- metadata +313 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Copyright 2005-2013 The Kuali Foundation
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at:
|
|
6
|
+
#
|
|
7
|
+
# http://www.opensource.org/licenses/ecl2.php
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
module OLE_QA::Framework::OLELS
|
|
16
|
+
# The OLE Library System MARC Item Record Editor Screen
|
|
17
|
+
class Item_Editor < Editor
|
|
18
|
+
# Set Item Editor screen elements.
|
|
19
|
+
def set_elements
|
|
20
|
+
super
|
|
21
|
+
# Override message in Editor base class, add multi-message element.
|
|
22
|
+
element(:message, true) {b.span(:id => "workItemMessage_span")}
|
|
23
|
+
element(:messages) {b.span(:id => "workItemMessage_span").font}
|
|
24
|
+
# Holdings Location/Call Number Information
|
|
25
|
+
element(:holdings_location_field) {b.span(:id => "OleHoldingLocationLevelName_control")}
|
|
26
|
+
element(:holdings_prefix_field) {b.span(:id => "OleHoldingCallNumberPrefix_control")}
|
|
27
|
+
element(:holdings_shelving_order_field) {b.span(:id => "OleHoldingShelvingOrder_control")}
|
|
28
|
+
element(:holdings_call_number_field) {b.span(:id => "OleHoldingCallNumber_control")}
|
|
29
|
+
element(:holdings_call_number_type_field) {b.span(:id => "OleHoldingShelvingScheme_control")}
|
|
30
|
+
# Item Location/Call Number Information
|
|
31
|
+
element(:location_field) {b.text_field(:id => "OleItemLocationLevelName_control")}
|
|
32
|
+
element(:prefix_field) {b.text_field(:id => "OleItemCallNumberPrefix_control")}
|
|
33
|
+
element(:shelving_order_field) {b.text_field(:id => "OleItemShelvingOrder_control")}
|
|
34
|
+
element(:call_number_field) {b.text_field(:id => "OleItemCallNumber_control")}
|
|
35
|
+
element(:call_number_type_selector) {b.select_list(:id => "OleItemShelvingScheme_control")}
|
|
36
|
+
element(:browse_button) {b.button(:id => "callNumberItemBrowseLink")}
|
|
37
|
+
# Item Information
|
|
38
|
+
element(:item_id_field) {b.text_field(:id => "oleItemIdentifier_ID_control")}
|
|
39
|
+
element(:barcode_field) {b.text_field(:id => "oleItemAccessInformationBarcode_control")}
|
|
40
|
+
element(:barcode_arsl_field) {b.text_field(:id => "oleItemBarcodeARSL_control")}
|
|
41
|
+
element(:former_identifiers_field) {b.text_field(:id => "oleItemFormerIdentifier_control")}
|
|
42
|
+
element(:statistical_searching_codes_selector) {b.select_list(:id => "oleItemStatisticalSearchingCodes_control")}
|
|
43
|
+
element(:temp_item_type_selector) {b.select_list(:id => "oleItemTemporaryItemType_control")}
|
|
44
|
+
element(:enumeration_field) {b.text_field(:id => "oleItemEnumeration_control")}
|
|
45
|
+
element(:chronology_field) {b.text_field(:id => "oleItemChronology_control")}
|
|
46
|
+
element(:copy_number_field) {b.text_field(:id => "oleItemCopyNumber_control")}
|
|
47
|
+
element(:access_info_uri_field) {b.text_field(:id => "oleItemAccessInformationURI_control")}
|
|
48
|
+
element(:item_type_selector) {b.select_list(:id => "oleItemItemType_control")}
|
|
49
|
+
element(:number_of_pieces_field) {b.select_list(:id => "oleItemNumberOfPiece_control")}
|
|
50
|
+
# Acquisition Information
|
|
51
|
+
element(:po_line_item_id_field) {b.text_field(:id => "oleItemPoID_control")}
|
|
52
|
+
element(:vendor_line_item_id_field) {b.text_field(:id => "oleItemVendorLineItemID_control")}
|
|
53
|
+
element(:fund_field) {b.text_field(:id => "oleItemFund_control")}
|
|
54
|
+
element(:price_field) {b.text_field(:id => "oleItemPrice_control")}
|
|
55
|
+
element(:donor_public_display_field) {b.text_field(:id => "oleItemDonorPublicDisplay_control")}
|
|
56
|
+
element(:donor_note_field) {b.text_field(:id => "oleItemDonorNote_control")}
|
|
57
|
+
# Circulation Information
|
|
58
|
+
element(:item_status_selector) {b.select_list(:id => "oleItemStatus_control")}
|
|
59
|
+
element(:checkin_note_field) {b.text_field(:id => "oleItemCheckinNote_control")}
|
|
60
|
+
element(:item_effective_status_date) {b.text_field(:id => "oleItemStatusEffectiveDate_control")}
|
|
61
|
+
element(:fast_add_checkbox) {b.checkbox(:id => "oleItemFastAdd_control")}
|
|
62
|
+
element(:staff_only_checkbox) {b.checkbox(:id => "oleItemStaffOnly_control")}
|
|
63
|
+
# Extended Information
|
|
64
|
+
element(:high_density_storage_field) {b.text_field(:id => "oleItemHighDensityStorage_control")}
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Set commonly-used functions on the Item Editor page.
|
|
68
|
+
def set_functions
|
|
69
|
+
super
|
|
70
|
+
# Return an array containing the text of multiple message elements.
|
|
71
|
+
function(:get_messages) {ary_out = [] ; messages.each {|msg| ary_out << msg.text} ; ary_out}
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Create an item note line object.
|
|
75
|
+
def set_lines
|
|
76
|
+
create_item_note(1)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Add an item note line object.
|
|
80
|
+
def create_item_note(which = 1)
|
|
81
|
+
create_line("item_note_#{which}","Item_Note",which)
|
|
82
|
+
end
|
|
83
|
+
alias_method(:add_item_note,:create_item_note)
|
|
84
|
+
|
|
85
|
+
# Remove an item note line object.
|
|
86
|
+
def remove_item_note(which = 1)
|
|
87
|
+
remove_line("item_note_#{which}")
|
|
88
|
+
end
|
|
89
|
+
alias_method(:delete_item_note,:remove_item_note)
|
|
90
|
+
end
|
|
91
|
+
end
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Copyright 2005-2013 The Kuali Foundation
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at:
|
|
6
|
+
#
|
|
7
|
+
# http://www.opensource.org/licenses/ecl2.php
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
module OLE_QA::Framework::OLELS
|
|
16
|
+
# The Loan page in the OLE Library System.
|
|
17
|
+
class Loan < OLE_QA::Framework::Page
|
|
18
|
+
def initialize(ole_session)
|
|
19
|
+
url = ole_session.ls_url + 'portal.do?channelTitle=Loan&channelUrl='
|
|
20
|
+
url += ole_session.ls_url + 'ole-kr-krad/loancontroller?viewId=PatronItemView&methodToCall=start'
|
|
21
|
+
super(ole_session, url)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Set elements for loan page.
|
|
25
|
+
def set_elements
|
|
26
|
+
super
|
|
27
|
+
# Circulation desk elements
|
|
28
|
+
element(:circulation_desk_selector) {b.select_list(:id => 'LoanCirculationDesk_control')}
|
|
29
|
+
element(:circulation_desk_yes) {b.button(:id => 'ChangeCirculationLocationBtn')}
|
|
30
|
+
element(:circulation_desk_no) {b.button(:id => 'CirculationLocationCloseBtn')}
|
|
31
|
+
# Loan Elements
|
|
32
|
+
element(:patron_field) {b.text_field(:id => 'Patron-barcode_control')}
|
|
33
|
+
element(:patron_search_button) {b.fieldset(:id => 'Patron-barcode_fieldset').input(:title => "Search Field")}
|
|
34
|
+
element(:item_field) {b.text_field(:id => 'Patron-item_control')}
|
|
35
|
+
element(:item_search_button) {b.fieldset(:id => 'Patron-item_fieldset').input(:title => "Search Field")}
|
|
36
|
+
element(:fast_add_button) {b.button(:id => 'FastAddItemSectionLink')}
|
|
37
|
+
element(:loan_popup_box) {b.div(:id => "MessagePopupSection")}
|
|
38
|
+
element(:due_date_field) {b.text_field(:id => 'popUpDate_control')}
|
|
39
|
+
element(:due_time_field) {b.text_field(:id => 'popUpTime_control')}
|
|
40
|
+
element(:loan_button) {b.button(:id => 'loanBtn')}
|
|
41
|
+
element(:do_not_loan_button) {b.button(:id => 'noLoanBtn')}
|
|
42
|
+
# Current Item Elements
|
|
43
|
+
element(:current_items_toggle) {b.a(:id => 'Patron-LoanItemListSection-HorizontalBoxSection_toggle').span}
|
|
44
|
+
element(:checked_out_items_toggle) {b.a(:id => 'Patron-ExistingLoanItemListSection-HorizontalBoxSection_toggle').span}
|
|
45
|
+
# General
|
|
46
|
+
element(:loan_messages) {b.div(:id => 'LoanMessageFieldSection').spans(:class => 'uif-message')}
|
|
47
|
+
element(:return_button) {b.button(:id => 'ReturnLinkView-buttons')}
|
|
48
|
+
element(:header_close_button) {b.button(:id => 'headerDoneButton')}
|
|
49
|
+
element(:header_clear_patron_button) {b.button(:id => 'headerClearPatronButton')}
|
|
50
|
+
element(:header_alter_due_date_button) {b.button(:id => 'headerEditDueDateButton')}
|
|
51
|
+
element(:header_claims_return_button) {b.button(:id => 'headerClaimsButton')}
|
|
52
|
+
element(:header_renew_button) {b.button(:id => 'headerRenewalButton')}
|
|
53
|
+
element(:clear_patron_button) {b.button(:id => 'clearPatronButton')}
|
|
54
|
+
element(:close_button) {b.button(:id => 'doneButton')}
|
|
55
|
+
element(:alter_due_date_button) {b.button(:id => 'editDueDateButton')}
|
|
56
|
+
element(:claims_return_button) {b.button(:id => 'claimsButton')}
|
|
57
|
+
element(:renew_button) {b.button(:id => 'renewalButton')}
|
|
58
|
+
# Patron Details Area
|
|
59
|
+
element(:patron_details_toggle) {b.a(:id => 'PatronDetailList-HorizontalBoxSection_toggle').span(:class => "uif-headerText-span")}
|
|
60
|
+
element(:patron_name) {b.div(:id => 'patronName').a}
|
|
61
|
+
element(:patron_type) {b.span(:id => 'patronType_control')}
|
|
62
|
+
element(:patron_preferred_address) {b.span(:id => 'patronPreferredAddress_control')}
|
|
63
|
+
element(:patron_phone_number) {b.span(:id => 'patronPhone_control')}
|
|
64
|
+
element(:patron_email) {b.span(:id => 'patronEmail_control')}
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Wait for the return button to be present.
|
|
68
|
+
def wait_for_elements
|
|
69
|
+
super
|
|
70
|
+
@wait_on << :return_button
|
|
71
|
+
@wait_on << :circulation_desk_selector
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Set commonly-used functions for loan screen.
|
|
75
|
+
def set_functions
|
|
76
|
+
# Current Item Functions - Pass a (1-based) numerical position to refer to a specific item line.
|
|
77
|
+
# (Defaults to 1.)
|
|
78
|
+
function(:item_selector) {|which = 1| b.checkbox(:id => "checkId_line#{which-1}_control")}
|
|
79
|
+
function(:item_barcode_link) {|which = 1| b.div(:id => "Barcode_line#{which-1}").a}
|
|
80
|
+
function(:item_title) {|which = 1| b.span(:id => "title_line#{which-1}_control")}
|
|
81
|
+
function(:item_author) {|which = 1| b.span(:id => "author_line#{which-1}_control")}
|
|
82
|
+
function(:item_location) {|which = 1| b.span(:id => "itemLocation_line#{which-1}_control")}
|
|
83
|
+
function(:item_call_number) {|which = 1| b.span(:id => "itemCallNumber_line#{which-1}_control")}
|
|
84
|
+
function(:item_number_of_renewals) {|which = 1| b.span(:id => "currentNoOfrenew_line#{which-1}_control")}
|
|
85
|
+
function(:item_due_date) {|which = 1| b.span(:id => "loanDueDate_line#{which-1}_control")}
|
|
86
|
+
function(:item_claims_return_note) {|which = 1| b.span(:id => "claimsReturnNote_line#{which-1}_control")}
|
|
87
|
+
function(:item_claims_return_date) {|which = 1| b.span(:id => "claimsReturnDate_line#{which-1}_control")}
|
|
88
|
+
# Checked Out Items Functions - Pass a (1-based) numerical position to refer to a specific item line.
|
|
89
|
+
# (Defaults to 1.)
|
|
90
|
+
function(:co_item_selector) {|which = 1| b.checkbox(:id => "checkIdRenewal_line#{which-1}_control")}
|
|
91
|
+
function(:co_item_barcode_link) {|which = 1| b.div(:id => "BarcodeRenewal_line#{which-1}").a}
|
|
92
|
+
function(:co_item_title) {|which = 1| b.span(:id => "titleRenewal_line#{which-1}_control")}
|
|
93
|
+
function(:co_item_author) {|which = 1| b.span(:id => "authorRenewal_line#{which-1}_control")}
|
|
94
|
+
function(:co_item_location) {|which = 1| b.span(:id => "itemLocationRenewal_line#{which-1}_control")}
|
|
95
|
+
function(:co_item_call_number) {|which = 1| b.span(:id => "itemCallNumberRenewal_line#{which-1}_control")}
|
|
96
|
+
function(:co_item_number_of_renewals) {|which = 1| b.span(:id => "previousNoOfrenew_line#{which-1}_control")}
|
|
97
|
+
function(:co_item_due_date) {|which = 1| b.span(:id => "loanDueDateRenewal_line#{which-1}_control")}
|
|
98
|
+
function(:co_item_claims_return_note) {|which = 1| b.span(:id => "claimsReturnNoteRenewal_line#{which-1}_control")}
|
|
99
|
+
function(:co_item_claims_return_date) {|which = 1| b.span(:id => "claimsReturnDateRenewal_line#{which-1}_control")}
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Copyright 2005-2013 The Kuali Foundation
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at:
|
|
6
|
+
#
|
|
7
|
+
# http://www.opensource.org/licenses/ecl2.php
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
module OLE_QA::Framework::OLELS
|
|
16
|
+
# The OLE Library System Main Menu Page
|
|
17
|
+
class Main_Menu < OLE_QA::Framework::Page
|
|
18
|
+
# Set page URL to OLE Library System URL
|
|
19
|
+
def initialize(ole_session)
|
|
20
|
+
url = ole_session.ls_url
|
|
21
|
+
super(ole_session, url)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def set_elements
|
|
25
|
+
super
|
|
26
|
+
element(:loan_link) {b.link(:text => "Loan")}
|
|
27
|
+
element(:return_link) {b.link(:text => "Return")}
|
|
28
|
+
element(:editor_link) {b.link(:text => "Editor")}
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Copyright 2005-2013 The Kuali Foundation
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at:
|
|
6
|
+
#
|
|
7
|
+
# http://www.opensource.org/licenses/ecl2.php
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
module OLE_QA::Framework::OLELS
|
|
16
|
+
# The Patron lookup page in the OLE Library System.
|
|
17
|
+
class Patron_Lookup < Lookup
|
|
18
|
+
def initialize(ole_session)
|
|
19
|
+
url = ole_session.ls_url + 'portal.do?channelTitle=Patron&channelUrl='
|
|
20
|
+
url += ole_session.ls_url + 'ole-kr-krad/lookup?methodToCall=start&dataObjectClassName=org.kuali.ole.patron.bo.OlePatronDocument&returnLocation='
|
|
21
|
+
url += ole_session.ls_url + 'portal.do&hideReturnLink=true&showMaintenanceLinks=true'
|
|
22
|
+
super(ole_session, url)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Set Patron Lookup elements.
|
|
26
|
+
def set_elements
|
|
27
|
+
super
|
|
28
|
+
element(:patron_id_field) {b.text_field(:id => "olePatronId_control")}
|
|
29
|
+
element(:barcode_field) {b.text_field(:id => "barcode_control")}
|
|
30
|
+
element(:first_name_field) {b.text_field(:id => "firstName_control")}
|
|
31
|
+
element(:last_name_field) {b.text_field(:id => "lastName_control")}
|
|
32
|
+
element(:borrower_type_selector) {b.select_list(:id => "borrowerType_control")}
|
|
33
|
+
element(:email_address_field) {b.text_field(:id => "emailAddress_control")}
|
|
34
|
+
# Search Controls
|
|
35
|
+
# TODO Move these elements to OLE_QA::Framework::OLELS::Lookup (common) when they become universal.
|
|
36
|
+
element(:active_yes_button) {b.radio(:id => 'activeIndicator_control_0')}
|
|
37
|
+
element(:active_no_button) {b.radio(:id => 'activeIndicator_control_1')}
|
|
38
|
+
element(:active_both_button) {b.radio(:id => 'activeIndicator_control_2')}
|
|
39
|
+
element(:search_button) {b.button(:text => "Search")}
|
|
40
|
+
element(:clear_button) {b.button(:text => "Clear Values")}
|
|
41
|
+
element(:cancel_button) {b.button(:text => "Cancel")}
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Copyright 2005-2013 The Kuali Foundation
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at:
|
|
6
|
+
#
|
|
7
|
+
# http://www.opensource.org/licenses/ecl2.php
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
module OLE_QA::Framework::OLELS
|
|
16
|
+
# The Return page in the OLE Library System.
|
|
17
|
+
class Return < OLE_QA::Framework::Page
|
|
18
|
+
def initialize(ole_session)
|
|
19
|
+
url = ole_session.ls_url + 'portal.do?channelTitle=Loan&channelUrl='
|
|
20
|
+
url += ole_session.ls_url + 'ole-kr-krad/loancontroller?viewId=ReturnItemView&methodToCall=start'
|
|
21
|
+
super(ole_session, url)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Set elements for return page.
|
|
25
|
+
def set_elements
|
|
26
|
+
# General Elements
|
|
27
|
+
element(:loan_button) {b.button(:id => 'LoanScreenLinkView-buttons')}
|
|
28
|
+
element(:end_session_button) {b.button(:id => 'endSessionButton')}
|
|
29
|
+
# Checkin Elements
|
|
30
|
+
element(:damaged_checkin_checkbox) {b.checkbox(:id => 'DamagedCheckIn_control')}
|
|
31
|
+
element(:checkin_date_field) {b.text_field(:id => 'CheckInDate_control')}
|
|
32
|
+
element(:checkin_time_field) {b.text_field(:id => 'CheckInTime_control')}
|
|
33
|
+
element(:item_field) {b.text_field(:id => 'CheckInItem_control')}
|
|
34
|
+
element(:item_search_button) {b.fieldset(:id => 'CheckInItem_fieldset').input(:title => 'Search Field')}
|
|
35
|
+
element(:items_returned_toggle) {b.a(:id => 'ItemReturnedList-HorizontalBoxSection_toggle')}
|
|
36
|
+
# Checkin Message Elements
|
|
37
|
+
element(:checkin_message_box) {b.div(:id => 'MessagePopupSectionForReturn')}
|
|
38
|
+
element(:return_button) {b.button(:id => 'returnBtn')}
|
|
39
|
+
element(:do_not_return_button) {b.button(:id => 'noReturnBtn')}
|
|
40
|
+
# Circulation desk elements
|
|
41
|
+
element(:circulation_desk_selector) {b.select_list(:id => 'LoanCirculationDesk_control')}
|
|
42
|
+
element(:circulation_desk_yes) {b.button(:id => 'ChangeCirculationLocationBtn')}
|
|
43
|
+
element(:circulation_desk_no) {b.button(:id => 'CirculationLocationCloseBtn')}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Wait for the loan button and item barcode field to be present.
|
|
47
|
+
def wait_for_elements
|
|
48
|
+
@wait_on << :loan_button
|
|
49
|
+
@wait_on << :item_field
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Set commonly used functions on return page.
|
|
53
|
+
def set_functions
|
|
54
|
+
function(:item_barcode_link) {|which = 1| b.div(:id => "returnBarcode_line#{which-1}").a}
|
|
55
|
+
function(:item_title) {|which = 1| b.span(:id => "returnTitle_line#{which-1}_control")}
|
|
56
|
+
function(:item_author) {|which = 1| b.span(:id => "returnAuthor_line#{which-1}_control")}
|
|
57
|
+
function(:item_location) {|which = 1| b.span(:id => "returnItemLocation_line#{which-1}_control")}
|
|
58
|
+
function(:item_call_number) {|which = 1| b.span(:id => "returnItemCallNumber_line#{which-1}_control")}
|
|
59
|
+
function(:item_checkin_date) {|which = 1| b.span(:id => "returnCheckInDate_line#{which-1}_control")}
|
|
60
|
+
function(:item_status) {|which = 1| b.span(:id => "returnItemStatus_line#{which-1}_control")}
|
|
61
|
+
function(:item_bill_link) {|which = 1| b.div(:id => "returnBill_line#{which-1}").a}
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Copyright 2005-2013 The Kuali Foundation
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at:
|
|
6
|
+
#
|
|
7
|
+
# http://www.opensource.org/licenses/ecl2.php
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
module OLE_QA::Framework::OLELS
|
|
16
|
+
# An Ownership Note on an OLE Library System Extent of Ownership Line.
|
|
17
|
+
class Ownership_Note < OLE_QA::Framework::Subline_Object
|
|
18
|
+
# Set ownership note screen elements.
|
|
19
|
+
def set_elements
|
|
20
|
+
element(:note_type_selector) {b.select_list(:id => "extentSubHoldingNoteTypeField_line#{@line_id}_line#{@subline_id}_control")}
|
|
21
|
+
element(:note_field) {b.text_field(:id => "extentSubHoldingNoteDescField_line#{@line_id}_line#{@subline_id}_control")}
|
|
22
|
+
element(:add_button) {b.button(:id => "oleEowHoldingNotes_addTagButton_line#{@line_id}_line#{@subline_id}")}
|
|
23
|
+
element(:remove_button) {b.button(:id => "oleEowHoldingNotes_removeTagButton_line#{@line_id}_line#{@subline_id}")}
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require "ole_qa_framework/VERSION"
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = "ole-qa-framework"
|
|
8
|
+
spec.version = OLE_QA::Framework::VERSION
|
|
9
|
+
spec.authors = ["Jain Waldrip"]
|
|
10
|
+
spec.email = ["jkwaldri@indiana.edu"]
|
|
11
|
+
spec.description = "Watir-Webdriver Based Page-Object Framework for Kuali Open Library Environment QA Testing"
|
|
12
|
+
spec.summary = "Kuali Open Library Environment"
|
|
13
|
+
spec.homepage = "http://www.github.com/jkwaldrip/ole-qa-framework/"
|
|
14
|
+
spec.license = "ECLv2"
|
|
15
|
+
|
|
16
|
+
spec.files = Dir.glob("**/**/**")
|
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
|
+
spec.require_paths = ["lib"]
|
|
20
|
+
|
|
21
|
+
spec.required_ruby_version = '~> 1.9.3'
|
|
22
|
+
|
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
|
24
|
+
spec.add_development_dependency "rake"
|
|
25
|
+
spec.add_development_dependency "yard"
|
|
26
|
+
|
|
27
|
+
spec.add_dependency "watir-webdriver"
|
|
28
|
+
spec.add_dependency "headless"
|
|
29
|
+
spec.add_dependency "rspec"
|
|
30
|
+
end
|
|
Binary file
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Copyright 2005-2013 The Kuali Foundation
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at:
|
|
6
|
+
#
|
|
7
|
+
# http://www.opensource.org/licenses/ecl2.php
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require "rspec"
|
|
16
|
+
require "spec_helper"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
describe "The Watir Webdriver" do
|
|
20
|
+
|
|
21
|
+
before :all do
|
|
22
|
+
@ole = OLE_QA::Framework::Session.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after :all do
|
|
26
|
+
@ole.quit
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
it 'should create an instance of Watir Webdriver' do
|
|
30
|
+
@ole.browser.class.should == Watir::Browser
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
it "should be able to open Google" do
|
|
34
|
+
@ole.browser.goto("http://www.google.com")
|
|
35
|
+
@ole.browser.title.should == "Google"
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Copyright 2005-2013 The Kuali Foundation
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at:
|
|
6
|
+
#
|
|
7
|
+
# http://www.opensource.org/licenses/ecl2.php
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'rspec'
|
|
16
|
+
require 'spec_helper'
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
describe 'A Data Object' do
|
|
20
|
+
|
|
21
|
+
before :all do
|
|
22
|
+
@ole = OLE_QA::Framework::Session.new
|
|
23
|
+
@data_object = OLE_QA::Framework::Data_Object.new(@ole)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after :all do
|
|
27
|
+
@ole.quit
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it 'should create a new instance' do
|
|
31
|
+
@data_object.class.should == OLE_QA::Framework::Data_Object
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
it 'should have a browser accessor' do
|
|
35
|
+
@data_object.browser.class.should == @ole.browser.class
|
|
36
|
+
end
|
|
37
|
+
end
|