ole-qa-framework 2.7.3 → 3.0.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 +15 -0
- data/lib/common/common_object.rb +1 -1
- data/lib/common/line_object.rb +35 -10
- data/lib/common/page.rb +5 -0
- data/lib/common/subline_object.rb +8 -24
- data/lib/module/qa_helpers.rb +1 -1
- data/lib/module/qa_page_helpers.rb +24 -0
- data/lib/ole_qa_framework/VERSION.rb +1 -1
- data/lib/olefs/common/purap_document.rb +20 -25
- data/lib/olefs/objects/invoice_current_item.rb +1 -1
- data/lib/olefs/objects/invoice_line.rb +5 -2
- data/lib/olefs/objects/line_item.rb +44 -50
- data/lib/olefs/objects/receiving_line.rb +22 -52
- data/lib/olefs/pages/invoice.rb +5 -2
- data/lib/olefs/pages/payment_request.rb +0 -39
- data/lib/olefs/pages/purchase_order.rb +1 -11
- data/lib/olefs/pages/receiving_document.rb +1 -11
- data/lib/olefs/pages/requisition.rb +1 -11
- data/lib/olefs/subobjects/accounting_line.rb +16 -16
- data/lib/olefs/subobjects/copies_line.rb +9 -7
- data/lib/olefs/subobjects/exception_notes_line.rb +3 -3
- data/lib/olefs/{objects → subobjects}/invoice_line_item.rb +34 -45
- data/lib/olefs/subobjects/notes_line.rb +5 -5
- data/lib/olefs/subobjects/processing_line.rb +2 -2
- data/lib/olefs/subobjects/receipt_notes_line.rb +2 -2
- data/lib/olels/common/e_doc.rb +0 -17
- data/lib/olels/common/editor.rb +0 -17
- data/lib/olels/objects/access_info_line.rb +4 -4
- data/lib/olels/objects/control_006_line.rb +6 -6
- data/lib/olels/objects/control_007_line.rb +6 -6
- data/lib/olels/objects/data_line.rb +7 -7
- data/lib/olels/objects/editor_note.rb +3 -3
- data/lib/olels/objects/holdings_note.rb +5 -5
- data/lib/olels/objects/item_note.rb +5 -5
- data/lib/olels/objects/ownership_extent_line.rb +6 -16
- data/lib/olels/objects/patron_address_line.rb +33 -33
- data/lib/olels/objects/patron_email_line.rb +10 -10
- data/lib/olels/objects/patron_phone_line.rb +14 -14
- data/lib/olels/pages/bib_editor.rb +3 -44
- data/lib/olels/pages/instance_editor.rb +3 -33
- data/lib/olels/pages/item_editor.rb +1 -13
- data/lib/olels/pages/patron.rb +4 -33
- data/lib/olels/pages/return.rb +1 -0
- data/lib/olels/pages/staff_upload.rb +1 -0
- data/lib/olels/subobjects/ownership_note.rb +4 -4
- data/spec/common/line_object_spec.rb +41 -8
- data/spec/common/subline_object_spec.rb +9 -19
- data/spec/modules/qa_page_helpers_spec.rb +54 -0
- data/spec/olefs/accounting_line_spec.rb +9 -30
- data/spec/olefs/copies_line_spec.rb +1 -16
- data/spec/olefs/exception_notes_line_spec.rb +3 -13
- data/spec/olefs/invoice_current_item_spec.rb +1 -1
- data/spec/olefs/invoice_line_item_spec.rb +5 -5
- data/spec/olefs/invoice_line_spec.rb +2 -2
- data/spec/olefs/invoice_spec.rb +2 -2
- data/spec/olefs/line_item_spec.rb +32 -67
- data/spec/olefs/notes_line_spec.rb +5 -17
- data/spec/olefs/payment_request_spec.rb +1 -43
- data/spec/olefs/processing_line_spec.rb +5 -4
- data/spec/olefs/purap_document_spec.rb +23 -1
- data/spec/olefs/purchase_order_spec.rb +4 -18
- data/spec/olefs/receipt_notes_line_spec.rb +5 -14
- data/spec/olefs/receive_spec.rb +3 -18
- data/spec/olefs/receiving_line_spec.rb +35 -74
- data/spec/olefs/requisition_spec.rb +5 -19
- data/spec/olels/access_info_line_spec.rb +1 -1
- data/spec/olels/bib_editor_spec.rb +8 -56
- data/spec/olels/data_line_spec.rb +2 -2
- data/spec/olels/editor_spec.rb +0 -4
- data/spec/olels/{holdings_note_spec_spec.rb → holdings_note_spec.rb} +1 -1
- data/spec/olels/instance_editor_spec.rb +8 -31
- data/spec/olels/item_editor_spec.rb +4 -14
- data/spec/olels/item_note_spec.rb +2 -2
- data/spec/olels/ownership_extent_line_spec.rb +6 -16
- data/spec/olels/ownership_note_spec.rb +2 -1
- data/spec/olels/patron_address_line_spec.rb +1 -1
- data/spec/olels/patron_email_line_spec.rb +1 -1
- data/spec/olels/patron_phone_line_spec.rb +2 -2
- data/spec/olels/patron_spec.rb +8 -40
- metadata +7 -30
- data/lib/olefs/common/invoice_line_object.rb +0 -37
- data/lib/olefs/common/line_object.rb +0 -39
- data/lib/olefs/objects/new_line_item.rb +0 -48
- data/lib/olefs/objects/new_preq_line_item.rb +0 -43
- data/lib/olefs/objects/new_receiving_line.rb +0 -42
- data/lib/olefs/objects/preq_line_item.rb +0 -68
- data/lib/olefs/pages/payment_request_creation.rb +0 -44
- data/lib/olefs/subobjects/invoice_notes_line.rb +0 -25
- data/lib/olefs/subobjects/new_accounting_line.rb +0 -43
- data/lib/olefs/subobjects/new_copies_line.rb +0 -37
- data/lib/olefs/subobjects/new_exception_notes_line.rb +0 -30
- data/lib/olefs/subobjects/new_invoice_notes_line.rb +0 -35
- data/lib/olefs/subobjects/new_notes_line.rb +0 -36
- data/lib/olefs/subobjects/new_receipt_notes_line.rb +0 -35
- data/lib/olels/common/line_object.rb +0 -39
- data/spec/olefs/invoice_line_object_spec.rb +0 -49
- data/spec/olefs/invoice_notes_line_spec.rb +0 -49
- data/spec/olefs/preq_creation_spec.rb +0 -47
- data/spec/olefs/preq_line_item_spec.rb +0 -111
- data/spec/workflows/purap_spec.rb +0 -221
@@ -15,15 +15,15 @@
|
|
15
15
|
module OLE_QA::Framework::OLELS
|
16
16
|
|
17
17
|
# Represents a Marc control field 006 line in the OLELS Bib Editor.
|
18
|
-
class Control_007_Line < OLE_QA::Framework::
|
18
|
+
class Control_007_Line < OLE_QA::Framework::Line_Object
|
19
19
|
|
20
20
|
# Set Marc data line elements.
|
21
21
|
def set_elements
|
22
|
-
element(:field) {b.text_field(:id => "Control_Field_007_line#{
|
23
|
-
element(:add_button) {b.button(:id => "Control_Field_007_addTagButton_id_line#{
|
24
|
-
element(:edit_button) {b.button(:id => "Control_Field_007_EditTagButton_id_line#{
|
25
|
-
element(:remove_button) {b.button(:id => "Control_Field_007_removeTagButton_id_line#{
|
26
|
-
element(:clear_button) {b.button(:id => "Control_Field_007_clearTagButton_id_line#{
|
22
|
+
element(:field) {b.text_field(:id => "Control_Field_007_line#{line_id}_control")}
|
23
|
+
element(:add_button) {b.button(:id => "Control_Field_007_addTagButton_id_line#{line_id}")}
|
24
|
+
element(:edit_button) {b.button(:id => "Control_Field_007_EditTagButton_id_line#{line_id}")}
|
25
|
+
element(:remove_button) {b.button(:id => "Control_Field_007_removeTagButton_id_line#{line_id}")}
|
26
|
+
element(:clear_button) {b.button(:id => "Control_Field_007_clearTagButton_id_line#{line_id}")}
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
@@ -16,16 +16,16 @@ module OLE_QA::Framework::OLELS
|
|
16
16
|
|
17
17
|
# Represents a Marc data line in the OLE Library System Bib Editor.
|
18
18
|
# e.g. '245','','','|aTitle of Work'
|
19
|
-
class Data_Line < OLE_QA::Framework::
|
19
|
+
class Data_Line < OLE_QA::Framework::Line_Object
|
20
20
|
|
21
21
|
# Set Marc data line elements.
|
22
22
|
def set_elements
|
23
|
-
element(:tag_field) {b.text_field(:id => "dataField_tag_id_line#{
|
24
|
-
element(:ind1_field) {b.text_field(:id => "dataField_ind1_id_line#{
|
25
|
-
element(:ind2_field) {b.text_field(:id => "dataField_ind2_id_line#{
|
26
|
-
element(:data_field) {b.text_field(:id => "dataField_value_id_line#{
|
27
|
-
element(:add_button) {b.button(:id => "dataField_addTagButton_id_line#{
|
28
|
-
element(:remove_button) {b.button(:id => "dataField_removeTagButton_id_line#{
|
23
|
+
element(:tag_field) {b.text_field(:id => "dataField_tag_id_line#{line_id}_control")}
|
24
|
+
element(:ind1_field) {b.text_field(:id => "dataField_ind1_id_line#{line_id}_control")}
|
25
|
+
element(:ind2_field) {b.text_field(:id => "dataField_ind2_id_line#{line_id}_control")}
|
26
|
+
element(:data_field) {b.text_field(:id => "dataField_value_id_line#{line_id}_control")}
|
27
|
+
element(:add_button) {b.button(:id => "dataField_addTagButton_id_line#{line_id}")}
|
28
|
+
element(:remove_button) {b.button(:id => "dataField_removeTagButton_id_line#{line_id}")}
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
@@ -39,7 +39,7 @@ module OLE_QA::Framework::OLELS
|
|
39
39
|
super(browser)
|
40
40
|
|
41
41
|
@line_number = line_number
|
42
|
-
|
42
|
+
line_identifier = line_number - 1
|
43
43
|
@subline_number = subline_number
|
44
44
|
@subline_identifier = subline_number - 1
|
45
45
|
@note_type = note_type
|
@@ -64,14 +64,14 @@ module OLE_QA::Framework::OLELS
|
|
64
64
|
end
|
65
65
|
|
66
66
|
# Replace element identifiers in a series of element hashes.
|
67
|
-
# - Replace LINEID with
|
67
|
+
# - Replace LINEID with line_identifier
|
68
68
|
# - Replace LINENUM with @line_number
|
69
69
|
# - Replace SUBLINEID with @subline_identifier
|
70
70
|
# - Replace SUBLINENUM with @subline_number
|
71
71
|
def parse_elements(element_hash)
|
72
72
|
replace_identifiers(element_hash, /SUBLINEID/, @subline_identifier.to_s)
|
73
73
|
replace_identifiers(element_hash, /SUBLINENUM/, @subline_number.to_s)
|
74
|
-
replace_identifiers(element_hash, /LINEID/,
|
74
|
+
replace_identifiers(element_hash, /LINEID/, line_identifier.to_s)
|
75
75
|
replace_identifiers(element_hash, /LINENUM/, @line_number.to_s)
|
76
76
|
end
|
77
77
|
|
@@ -14,13 +14,13 @@
|
|
14
14
|
|
15
15
|
module OLE_QA::Framework::OLELS
|
16
16
|
# A Holdings Note on the OLE Library System Instance Editor
|
17
|
-
class Holdings_Note < OLE_QA::Framework::
|
17
|
+
class Holdings_Note < OLE_QA::Framework::Line_Object
|
18
18
|
# Set holdings note screen elements.
|
19
19
|
def set_elements
|
20
|
-
element(:note_type_selector) {b.select_list(:id => "OleHoldingNoteTypeField_line#{
|
21
|
-
element(:note_field) {b.text_field(:id => "OleHoldingNoteDescField_line#{
|
22
|
-
element(:add_button) {b.button(:id => "OleHoldingNotes_addTagButton_line#{
|
23
|
-
element(:remove_button) {b.button(:id => "OleHoldingNotes_removeTagButton_line#{
|
20
|
+
element(:note_type_selector) {b.select_list(:id => "OleHoldingNoteTypeField_line#{line_id}_control")}
|
21
|
+
element(:note_field) {b.text_field(:id => "OleHoldingNoteDescField_line#{line_id}_control")}
|
22
|
+
element(:add_button) {b.button(:id => "OleHoldingNotes_addTagButton_line#{line_id}")}
|
23
|
+
element(:remove_button) {b.button(:id => "OleHoldingNotes_removeTagButton_line#{line_id}")}
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -14,13 +14,13 @@
|
|
14
14
|
|
15
15
|
module OLE_QA::Framework::OLELS
|
16
16
|
# An Item Note in the OLE Library System Item Editor
|
17
|
-
class Item_Note < OLE_QA::Framework::
|
17
|
+
class Item_Note < OLE_QA::Framework::Line_Object
|
18
18
|
# Set screen elements for an OLELS Item Note.
|
19
19
|
def set_elements
|
20
|
-
element(:note_type_selector) {b.select_list(:id => "OleItemNoteTypeField_line#{
|
21
|
-
element(:note_field) {b.text_field(:id => "OleItemNoteDescField_line#{
|
22
|
-
element(:add_button) {b.button(:id => "OleItemNote_addTagButton_line#{
|
23
|
-
element(:remove_button) {b.button(:id => "OleItemNote_removeTagButton_line#{
|
20
|
+
element(:note_type_selector) {b.select_list(:id => "OleItemNoteTypeField_line#{line_id}_control")}
|
21
|
+
element(:note_field) {b.text_field(:id => "OleItemNoteDescField_line#{line_id}_control")}
|
22
|
+
element(:add_button) {b.button(:id => "OleItemNote_addTagButton_line#{line_id}")}
|
23
|
+
element(:remove_button) {b.button(:id => "OleItemNote_removeTagButton_line#{line_id}")}
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -14,27 +14,17 @@
|
|
14
14
|
|
15
15
|
module OLE_QA::Framework::OLELS
|
16
16
|
# An Extent of Ownership Line on the OLE Library System Instance Editor.
|
17
|
-
class Ownership_Extent_Line < OLE_QA::Framework::
|
17
|
+
class Ownership_Extent_Line < OLE_QA::Framework::Line_Object
|
18
18
|
|
19
19
|
def set_elements
|
20
|
-
element(:type_selector) {b.select_list(:id => "extentTextualHoldingsType_line#{
|
21
|
-
element(:statement_field) {b.text_field(:id => "extentTextualHoldings_line#{
|
22
|
-
element(:add_button) {b.button(:id => "extentOfOwnership_addTagButton_line#{
|
23
|
-
element(:remove_button) {b.button(:id => "extentOfOwnership_removeTagButton_line#{
|
20
|
+
element(:type_selector) {b.select_list(:id => "extentTextualHoldingsType_line#{line_id}_control")}
|
21
|
+
element(:statement_field) {b.text_field(:id => "extentTextualHoldings_line#{line_id}_control")}
|
22
|
+
element(:add_button) {b.button(:id => "extentOfOwnership_addTagButton_line#{line_id}")}
|
23
|
+
element(:remove_button) {b.button(:id => "extentOfOwnership_removeTagButton_line#{line_id}")}
|
24
24
|
end
|
25
25
|
|
26
26
|
def set_sublines
|
27
|
-
|
27
|
+
set_subline(:ownership_note, OLE_QA::Framework::OLELS::Ownership_Note)
|
28
28
|
end
|
29
|
-
|
30
|
-
def create_ownership_note(which = 1)
|
31
|
-
create_subline("ownership_note_#{which}","Ownership_Note", which)
|
32
|
-
end
|
33
|
-
alias_method(:add_ownership_note,:create_ownership_note)
|
34
|
-
|
35
|
-
def remove_ownership_note(which = 1)
|
36
|
-
remove_subline("ownership_note_#{which}")
|
37
|
-
end
|
38
|
-
alias_method(:delete_ownership_note,:remove_ownership_note)
|
39
29
|
end
|
40
30
|
end
|
@@ -14,75 +14,75 @@
|
|
14
14
|
|
15
15
|
module OLE_QA::Framework::OLELS
|
16
16
|
# An address line on an individual patron record.
|
17
|
-
class Patron_Address_Line < Line_Object
|
17
|
+
class Patron_Address_Line < OLE_QA::Framework::Line_Object
|
18
18
|
# Define screen elements for patron record address line.
|
19
19
|
def set_elements
|
20
|
-
# Format id string based on
|
20
|
+
# Format id string based on line_id .
|
21
21
|
# @note Address line 0 has no numerical identifier.
|
22
|
-
element(:details_link) {(
|
22
|
+
element(:details_link) {(line_id == 0) ?
|
23
23
|
id_str = 'OlePatronDocument-Address_detLink_add' :
|
24
|
-
id_str = "OlePatronDocument-Address_detLink_line#{
|
24
|
+
id_str = "OlePatronDocument-Address_detLink_line#{line_id - 1}"
|
25
25
|
b.a(:id => id_str)}
|
26
|
-
element(:address_type_selector) {(
|
26
|
+
element(:address_type_selector) {(line_id == 0) ?
|
27
27
|
id_str = 'addressTypeCode_add_control' :
|
28
|
-
id_str = "addressTypeCode_line#{
|
28
|
+
id_str = "addressTypeCode_line#{line_id - 1}_control"
|
29
29
|
b.select_list(:id => id_str)}
|
30
|
-
element(:address_source_selector) {(
|
30
|
+
element(:address_source_selector) {(line_id == 0) ?
|
31
31
|
id_str = 'addressSource_add_control' :
|
32
|
-
id_str = "addressSource_line#{
|
32
|
+
id_str = "addressSource_line#{line_id - 1}_control"
|
33
33
|
b.select_list(:id => id_str)}
|
34
|
-
element(:valid_from_date_field) {(
|
34
|
+
element(:valid_from_date_field) {(line_id == 0) ?
|
35
35
|
id_str = 'addressValidFrom_add_control' :
|
36
|
-
id_str = "addressValidFrom_line#{
|
36
|
+
id_str = "addressValidFrom_line#{line_id - 1}_control"
|
37
37
|
b.text_field(:id => id_str)}
|
38
|
-
element(:valid_to_date_field) {(
|
38
|
+
element(:valid_to_date_field) {(line_id == 0) ?
|
39
39
|
id_str = 'addressValidTo_add_control' :
|
40
|
-
id_str = "addressValidTo_line#{
|
40
|
+
id_str = "addressValidTo_line#{line_id - 1}_control"
|
41
41
|
b.text_field(:id => id_str)}
|
42
|
-
element(:verified_checkbox) {(
|
42
|
+
element(:verified_checkbox) {(line_id == 0) ?
|
43
43
|
id_str = 'addressVerified_add_control' :
|
44
|
-
id_str = "addressVerified_line#{
|
44
|
+
id_str = "addressVerified_line#{line_id - 1}_control"
|
45
45
|
b.checkbox(:id => id_str)}
|
46
|
-
element(:preferred_checkbox) {(
|
46
|
+
element(:preferred_checkbox) {(line_id == 0) ?
|
47
47
|
id_str = 'defaultValue_add_control' :
|
48
|
-
id_str = "defaultValue_line#{
|
48
|
+
id_str = "defaultValue_line#{line_id - 1}_control"
|
49
49
|
b.checkbox(:id => id_str)}
|
50
|
-
element(:active_checkbox) {(
|
50
|
+
element(:active_checkbox) {(line_id == 0) ?
|
51
51
|
id_str = 'active_add_control' :
|
52
|
-
id_str = "active_line#{
|
52
|
+
id_str = "active_line#{line_id - 1}_control"
|
53
53
|
b.checkbox(:id => id_str)}
|
54
54
|
# Details Area
|
55
|
-
element(:line_1_field) {(
|
55
|
+
element(:line_1_field) {(line_id == 0) ?
|
56
56
|
id_str = 'line1_add_control' :
|
57
|
-
id_str = "line1_line#{
|
57
|
+
id_str = "line1_line#{line_id - 1}_control"
|
58
58
|
b.text_field(:id => id_str)}
|
59
|
-
element(:line_2_field) {(
|
59
|
+
element(:line_2_field) {(line_id == 0) ?
|
60
60
|
id_str = 'line2_add_control' :
|
61
|
-
id_str = "line2_line#{
|
61
|
+
id_str = "line2_line#{line_id - 1}_control"
|
62
62
|
b.text_field(:id => id_str)}
|
63
|
-
element(:line_3_field) {(
|
63
|
+
element(:line_3_field) {(line_id == 0) ?
|
64
64
|
id_str = 'line3_add_control' :
|
65
|
-
id_str = "line3_line#{
|
65
|
+
id_str = "line3_line#{line_id - 1}_control"
|
66
66
|
b.text_field(:id => id_str)}
|
67
|
-
element(:city_field) {(
|
67
|
+
element(:city_field) {(line_id == 0) ?
|
68
68
|
id_str = 'city_add_control' :
|
69
|
-
id_str = "city_line#{
|
69
|
+
id_str = "city_line#{line_id - 1}_control"
|
70
70
|
b.text_field(:id => id_str)}
|
71
|
-
element(:state_selector) {(
|
71
|
+
element(:state_selector) {(line_id == 0) ?
|
72
72
|
id_str = 'state_add_control' :
|
73
|
-
id_str = "state_line#{
|
73
|
+
id_str = "state_line#{line_id - 1}_control"
|
74
74
|
b.select_list(:id => id_str)}
|
75
|
-
element(:postal_code_field) {(
|
75
|
+
element(:postal_code_field) {(line_id == 0) ?
|
76
76
|
id_str = 'postalCode_add_control' :
|
77
|
-
id_str = "postalCode_line#{
|
77
|
+
id_str = "postalCode_line#{line_id - 1}_control"
|
78
78
|
b.text_field(:id => id_str)}
|
79
|
-
element(:country_selector) {(
|
79
|
+
element(:country_selector) {(line_id == 0) ?
|
80
80
|
id_str = 'country_add_control' :
|
81
|
-
id_str = "country_line#{
|
81
|
+
id_str = "country_line#{line_id - 1}_control"
|
82
82
|
b.select_list(:id => id_str)}
|
83
83
|
# Add/Delete
|
84
84
|
element(:add_button) {b.button(:id => 'OlePatronDocument-Address_add')}
|
85
|
-
element(:delete_button) {b.button(:id => "OlePatronDocument-Address_del_line#{
|
85
|
+
element(:delete_button) {b.button(:id => "OlePatronDocument-Address_del_line#{line_id - 1}")}
|
86
86
|
end
|
87
87
|
end
|
88
88
|
end
|
@@ -14,27 +14,27 @@
|
|
14
14
|
|
15
15
|
module OLE_QA::Framework::OLELS
|
16
16
|
# A line of email address information on a patron record.
|
17
|
-
class Patron_Email_Line < Line_Object
|
17
|
+
class Patron_Email_Line < OLE_QA::Framework::Line_Object
|
18
18
|
# Set screen elements on patron record email info line.
|
19
19
|
def set_elements
|
20
|
-
element(:email_type_selector) {(
|
20
|
+
element(:email_type_selector) {(line_id == 0) ?
|
21
21
|
id_str = 'emailTypeCode_add_control' :
|
22
|
-
id_str = "emailTypeCode_line#{
|
22
|
+
id_str = "emailTypeCode_line#{line_id - 1}_control"
|
23
23
|
b.select_list(:id => id_str)}
|
24
|
-
element(:email_address_field) {(
|
24
|
+
element(:email_address_field) {(line_id == 0) ?
|
25
25
|
id_str = 'emailAddress_add_control' :
|
26
|
-
id_str = "emailAddress_line#{
|
26
|
+
id_str = "emailAddress_line#{line_id - 1}_control"
|
27
27
|
b.text_field(:id => id_str)}
|
28
|
-
element(:preferred_checkbox) {(
|
28
|
+
element(:preferred_checkbox) {(line_id == 0) ?
|
29
29
|
id_str = 'email_defaultValue_add_control' :
|
30
|
-
id_str = "email_defaultValue_line#{
|
30
|
+
id_str = "email_defaultValue_line#{line_id - 1}_control"
|
31
31
|
b.checkbox(:id => id_str)}
|
32
|
-
element(:active_checkbox) {(
|
32
|
+
element(:active_checkbox) {(line_id == 0) ?
|
33
33
|
id_str = 'email_active_add_control' :
|
34
|
-
id_str = "email_active_line#{
|
34
|
+
id_str = "email_active_line#{line_id - 1}_control"
|
35
35
|
b.checkbox(:id => id_str)}
|
36
36
|
element(:add_button) {b.button(:id => 'OlePatronDocument-Email_add')}
|
37
|
-
element(:delete_button) {b.button(:id => "OlePatronDocument-Email_del_line#{
|
37
|
+
element(:delete_button) {b.button(:id => "OlePatronDocument-Email_del_line#{line_id - 1}")}
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
@@ -14,35 +14,35 @@
|
|
14
14
|
|
15
15
|
module OLE_QA::Framework::OLELS
|
16
16
|
# A phone number info line on a single patron record.
|
17
|
-
class Patron_Phone_Line < Line_Object
|
17
|
+
class Patron_Phone_Line < OLE_QA::Framework::Line_Object
|
18
18
|
# Set screen elements for patron phone number info line.
|
19
19
|
def set_elements
|
20
|
-
element(:phone_type_selector) {(
|
20
|
+
element(:phone_type_selector) {(line_id == 0) ?
|
21
21
|
id_str = 'phoneTypeCode_add_control' :
|
22
|
-
id_str = "phoneTypeCode_line#{
|
22
|
+
id_str = "phoneTypeCode_line#{line_id - 1}_control"
|
23
23
|
b.select_list(:id => id_str)}
|
24
|
-
element(:phone_number_field) {(
|
24
|
+
element(:phone_number_field) {(line_id == 0) ?
|
25
25
|
id_str = 'phoneNumber_add_control' :
|
26
|
-
id_str = "phoneNumber_line#{
|
26
|
+
id_str = "phoneNumber_line#{line_id - 1}_control"
|
27
27
|
b.text_field(:id => id_str)}
|
28
|
-
element(:extension_field) {(
|
28
|
+
element(:extension_field) {(line_id == 0) ?
|
29
29
|
id_str = 'extensionNumber_add_control' :
|
30
|
-
id_str = "extensionNumber_line#{
|
30
|
+
id_str = "extensionNumber_line#{line_id - 1}_control"
|
31
31
|
b.text_field(:id => id_str)}
|
32
|
-
element(:country_selector) {(
|
32
|
+
element(:country_selector) {(line_id == 0) ?
|
33
33
|
id_str = 'countryCode_add_control' :
|
34
|
-
id_str = "countryCode_line#{
|
34
|
+
id_str = "countryCode_line#{line_id - 1}_control"
|
35
35
|
b.select_list(:id => id_str)}
|
36
|
-
element(:preferred_checkbox) {(
|
36
|
+
element(:preferred_checkbox) {(line_id == 0) ?
|
37
37
|
id_str = 'phoneNumber_defaultValue_add_control' :
|
38
|
-
id_str = "phoneNumber_defaultValue_line#{
|
38
|
+
id_str = "phoneNumber_defaultValue_line#{line_id - 1}_control"
|
39
39
|
b.checkbox(:id => id_str)}
|
40
|
-
element(:active_checkbox) {(
|
40
|
+
element(:active_checkbox) {(line_id == 0) ?
|
41
41
|
id_str = 'phoneNumber_active_add_control' :
|
42
|
-
id_str = "phoneNumber_active_line#{
|
42
|
+
id_str = "phoneNumber_active_line#{line_id - 1}_control"
|
43
43
|
b.checkbox(:id => id_str)}
|
44
44
|
element(:add_button) {b.button(:id => 'OlePatronDocument-Phone_add')}
|
45
|
-
element(:delete_button) {b.button(:id => "OlePatronDocument-Phone_del_line#{
|
45
|
+
element(:delete_button) {b.button(:id => "OlePatronDocument-Phone_del_line#{line_id - 1}")}
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
@@ -67,51 +67,10 @@ module OLE_QA::Framework::OLELS
|
|
67
67
|
function(:readonly_data_field) {|which = 1| which -= 1 ; b.span(:id => "dataField_value_id_readOnly_line#{which}_control")}
|
68
68
|
end
|
69
69
|
|
70
|
-
# Add the first Marc Data Line to a new Bib Editor record.
|
71
|
-
# @note There will always be at least one Marc Data Line on a newly-opened record,
|
72
|
-
# whether newly-created or previously extant.
|
73
70
|
def set_lines
|
74
|
-
|
75
|
-
|
76
|
-
|
71
|
+
set_line(:control_006_line, OLE_QA::Framework::OLELS::Control_006_Line)
|
72
|
+
set_line(:control_007_line, OLE_QA::Framework::OLELS::Control_007_Line)
|
73
|
+
set_line(:data_line, OLE_QA::Framework::OLELS::Data_Line)
|
77
74
|
end
|
78
|
-
|
79
|
-
# Add a control field 006 line to the editor page model.
|
80
|
-
def create_006_line(which = 1)
|
81
|
-
create_line("control_006_line_#{which}", "Control_006_Line", which)
|
82
|
-
end
|
83
|
-
alias_method(:add_006_line, :create_006_line)
|
84
|
-
|
85
|
-
# Add a control field 007 line to the editor page model.
|
86
|
-
def create_007_line(which = 1)
|
87
|
-
create_line("control_007_line_#{which}", "Control_007_Line", which)
|
88
|
-
end
|
89
|
-
alias_method(:add_007_line, :create_007_line)
|
90
|
-
|
91
|
-
# Add a Marc data line to the editor page model.
|
92
|
-
def create_data_line(which = 1)
|
93
|
-
create_line("data_line_#{which}","Data_Line", which)
|
94
|
-
end
|
95
|
-
alias_method(:add_data_line, :create_data_line)
|
96
|
-
|
97
|
-
# Remove a Marc data line from the editor page model.
|
98
|
-
def remove_data_line(which = 1)
|
99
|
-
remove_line("data_line_#{which}")
|
100
|
-
end
|
101
|
-
alias_method(:delete_data_line,:remove_data_line)
|
102
|
-
|
103
|
-
# Remove a control 006 line from the editor page model.
|
104
|
-
def remove_006_line(which = 1)
|
105
|
-
remove_line("control_006_line_#{which}")
|
106
|
-
end
|
107
|
-
alias_method(:delete_006_line,:remove_006_line)
|
108
|
-
|
109
|
-
# Remove a control 007 line from the editor page model.
|
110
|
-
def remove_007_line(which = 1)
|
111
|
-
remove_line("control_007_line_#{which}")
|
112
|
-
end
|
113
|
-
alias_method(:delete_007_line,:remove_007_line)
|
114
|
-
|
115
|
-
|
116
75
|
end
|
117
76
|
end
|
@@ -48,39 +48,9 @@ module OLE_QA::Framework::OLELS
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def set_lines
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
set_line(:ownership_extent_line, OLE_QA::Framework::OLELS::Ownership_Extent_Line)
|
52
|
+
set_line(:access_info_line, OLE_QA::Framework::OLELS::Access_Info_Line)
|
53
|
+
set_line(:holdings_note_line, OLE_QA::Framework::OLELS::Holdings_Note)
|
54
54
|
end
|
55
|
-
|
56
|
-
def create_ownership_extent_line(which = 1)
|
57
|
-
create_line("ownership_extent_line_#{which}","Ownership_Extent_Line",which)
|
58
|
-
end
|
59
|
-
alias_method(:add_ownership_extent_line,:create_ownership_extent_line)
|
60
|
-
|
61
|
-
def create_access_info_line(which = 1)
|
62
|
-
create_line("access_info_line_#{which}","Access_Info_Line",which)
|
63
|
-
end
|
64
|
-
alias_method(:add_access_info_line,:create_access_info_line)
|
65
|
-
|
66
|
-
def create_holdings_note(which = 1)
|
67
|
-
create_line("holdings_note_#{which}","Holdings_Note",which)
|
68
|
-
end
|
69
|
-
alias_method(:add_holdings_note,:create_holdings_note)
|
70
|
-
|
71
|
-
def remove_ownership_extent_line(which = 1)
|
72
|
-
remove_line("ownership_extent_line_#{which}")
|
73
|
-
end
|
74
|
-
alias_method(:delete_ownership_extent_line,:remove_ownership_extent_line)
|
75
|
-
|
76
|
-
def remove_access_info_line(which = 1)
|
77
|
-
remove_line("access_info_line_#{which}")
|
78
|
-
end
|
79
|
-
alias_method(:delete_access_info_line,:remove_access_info_line)
|
80
|
-
|
81
|
-
def remove_holdings_note(which = 1)
|
82
|
-
remove_line("holdings_note_#{which}")
|
83
|
-
end
|
84
|
-
alias_method(:delete_holdings_note,:remove_holdings_note)
|
85
55
|
end
|
86
56
|
end
|