ole-qa-framework 2.7.3 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -28,7 +28,7 @@ describe 'An OLE Invoice PO Line' do
|
|
28
28
|
|
29
29
|
it 'should create a new instance' do
|
30
30
|
@invoice_line.class.should == OLE_QA::Framework::OLEFS::Invoice_Line
|
31
|
-
@invoice_line.class.superclass.should == OLE_QA::Framework::
|
31
|
+
@invoice_line.class.superclass.should == OLE_QA::Framework::Line_Object
|
32
32
|
end
|
33
33
|
|
34
34
|
it 'should have invoice line elements' do
|
@@ -58,7 +58,7 @@ describe 'An OLE Invoice PO Line' do
|
|
58
58
|
end
|
59
59
|
|
60
60
|
it 'should have an instance of the invoice line item class' do
|
61
|
-
@invoice_line.
|
61
|
+
@invoice_line.sublines.include?(:line_item).should be_true
|
62
62
|
@invoice_line.line_item.class.should == OLE_QA::Framework::OLEFS::Invoice_Line_Item
|
63
63
|
end
|
64
64
|
end
|
data/spec/olefs/invoice_spec.rb
CHANGED
@@ -80,12 +80,12 @@ describe 'An OLE Invoice' do
|
|
80
80
|
end
|
81
81
|
|
82
82
|
it 'should have a purchase order line' do
|
83
|
-
@invoice.
|
83
|
+
@invoice.lines.include?(:po_line).should be_true
|
84
84
|
@invoice.po_line.class.should == OLE_QA::Framework::OLEFS::Invoice_Line
|
85
85
|
end
|
86
86
|
|
87
87
|
it 'should have a current items line' do
|
88
|
-
@invoice.
|
88
|
+
@invoice.lines.include?(:current_items_line).should be_true
|
89
89
|
@invoice.current_items_line.class.should == OLE_QA::Framework::OLEFS::Invoice_Current_Item
|
90
90
|
end
|
91
91
|
end
|
@@ -22,7 +22,6 @@ describe 'An OLEFS line item' do
|
|
22
22
|
@ole = OLE_QA::Framework::Session.new
|
23
23
|
@line_number = 1
|
24
24
|
@line_item = OLE_QA::Framework::OLEFS::Line_Item.new(@ole, @line_number)
|
25
|
-
@new_line_item = OLE_QA::Framework::OLEFS::New_Line_Item.new(@ole, @line_number)
|
26
25
|
end
|
27
26
|
|
28
27
|
after :all do
|
@@ -31,22 +30,18 @@ describe 'An OLEFS line item' do
|
|
31
30
|
|
32
31
|
it 'should should create a new instance' do
|
33
32
|
@line_item.class.should == OLE_QA::Framework::OLEFS::Line_Item
|
34
|
-
@new_line_item.class.should == OLE_QA::Framework::OLEFS::New_Line_Item
|
35
33
|
end
|
36
34
|
|
37
35
|
it 'should be a subclass of Line Object' do
|
38
|
-
@line_item.class.superclass.should == OLE_QA::Framework::
|
39
|
-
@new_line_item.class.superclass.should == OLE_QA::Framework::OLEFS::Line_Object
|
36
|
+
@line_item.class.superclass.should == OLE_QA::Framework::Line_Object
|
40
37
|
end
|
41
38
|
|
42
39
|
it 'should have a browser accessor' do
|
43
40
|
@line_item.browser.class.should == @ole.browser.class
|
44
|
-
@new_line_item.browser.class.should == @ole.browser.class
|
45
41
|
end
|
46
42
|
|
47
43
|
it 'should have line number attributes' do
|
48
44
|
@line_item.line_number.should == 1
|
49
|
-
@new_line_item.line_number.should == 0
|
50
45
|
end
|
51
46
|
|
52
47
|
it 'should have line item elements' do
|
@@ -92,73 +87,43 @@ describe 'An OLEFS line item' do
|
|
92
87
|
#TODO add the methods below when OLE-4329 is fixed.
|
93
88
|
# elements.should include(:notes_toggle)
|
94
89
|
# methods_array.include(:copies_toggle)
|
90
|
+
# TODO add new_accounting_line, new_notes_line, new_copies_line definitions.
|
95
91
|
end
|
96
|
-
|
97
|
-
it 'should have
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
elements
|
106
|
-
elements.
|
107
|
-
elements.
|
108
|
-
elements.
|
109
|
-
elements.should include(:existing_bib_button)
|
110
|
-
elements.should include(:item_type_selector)
|
111
|
-
elements.should include(:copies_field)
|
112
|
-
elements.should include(:parts_field)
|
113
|
-
elements.should include(:list_price_field)
|
114
|
-
elements.should include(:public_view_checkbox)
|
115
|
-
elements.should include(:item_price_source_selector)
|
116
|
-
elements.should include(:request_source_selector)
|
117
|
-
elements.should include(:format_selector)
|
118
|
-
elements.should include(:category_selector)
|
119
|
-
elements.should include(:route_to_requestor_checkbox)
|
120
|
-
elements.should include(:discount_field)
|
121
|
-
elements.should include(:discount_type_selector)
|
122
|
-
elements.should include(:add_button)
|
123
|
-
elements.should include(:location_selector)
|
124
|
-
end
|
125
|
-
|
126
|
-
it 'should create an accounting line' do
|
127
|
-
@line_item.create_accounting_line(1)
|
128
|
-
@line_item.methods.include?(:accounting_line_1).should be_true
|
129
|
-
@line_item.accounting_line_1.class.should == OLE_QA::Framework::OLEFS::Accounting_Line
|
130
|
-
end
|
131
|
-
|
132
|
-
it 'should create a notes line' do
|
133
|
-
@line_item.create_notes_line(1)
|
134
|
-
@line_item.methods.include?(:notes_line_1).should be_true
|
135
|
-
@line_item.notes_line_1.class.should == OLE_QA::Framework::OLEFS::Notes_Line
|
136
|
-
end
|
137
|
-
|
138
|
-
it 'should create a copies line' do
|
139
|
-
@line_item.create_copies_line(1)
|
140
|
-
@line_item.methods.include?(:copies_line_1).should be_true
|
141
|
-
@line_item.copies_line_1.class.should == OLE_QA::Framework::OLEFS::Copies_Line
|
142
|
-
end
|
143
|
-
|
144
|
-
it 'should remove an accounting line' do
|
145
|
-
@line_item.remove_accounting_line(1)
|
146
|
-
@line_item.methods.include?(:accounting_line_1).should be_false
|
92
|
+
|
93
|
+
it 'should have new accounting line elements' do
|
94
|
+
elements = @line_item.elements
|
95
|
+
elements.include?(:chart_selector).should be_true
|
96
|
+
elements.include?(:account_number_field).should be_true
|
97
|
+
elements.include?(:sub_account_number_field).should be_true
|
98
|
+
elements.include?(:object_field).should be_true
|
99
|
+
elements.include?(:sub_object_field).should be_true
|
100
|
+
elements.include?(:project_field).should be_true
|
101
|
+
elements.include?(:org_ref_id_field).should be_true
|
102
|
+
elements.include?(:dollar_field).should be_true
|
103
|
+
elements.include?(:percent_field).should be_true
|
104
|
+
elements.include?(:add_account_button).should be_true
|
147
105
|
end
|
148
106
|
|
149
|
-
it 'should
|
150
|
-
@line_item.
|
151
|
-
|
107
|
+
it 'should have new notes line elements' do
|
108
|
+
elements = @line_item.elements
|
109
|
+
elements.include?(:note_type_selector).should be_true
|
110
|
+
elements.include?(:note_field).should be_true
|
111
|
+
elements.include?(:add_note_button).should be_true
|
152
112
|
end
|
153
113
|
|
154
|
-
it 'should
|
155
|
-
@line_item.
|
156
|
-
|
114
|
+
it 'should have new copies line elements' do
|
115
|
+
elements = @line_item.elements
|
116
|
+
elements.include?(:num_copies_field).should be_true
|
117
|
+
elements.include?(:num_parts_field).should be_true
|
118
|
+
elements.include?(:location_copies_selector).should be_true
|
119
|
+
elements.include?(:starting_copy_field).should be_true
|
120
|
+
elements.include?(:add_copy_button).should be_true
|
157
121
|
end
|
158
122
|
|
159
|
-
it 'should
|
160
|
-
|
161
|
-
|
162
|
-
|
123
|
+
it 'should have subline objects' do
|
124
|
+
sublines = @line_item.sublines
|
125
|
+
sublines.include?(:accounting_line).should be_true
|
126
|
+
sublines.include?(:notes_line).should be_true
|
127
|
+
sublines.include?(:copies_line).should be_true
|
163
128
|
end
|
164
129
|
end
|
@@ -19,8 +19,7 @@ describe 'A notes line' do
|
|
19
19
|
|
20
20
|
before :all do
|
21
21
|
@ole = OLE_QA::Framework::Session.new
|
22
|
-
@notes_line = OLE_QA::Framework::OLEFS::Notes_Line.new(@ole, 1
|
23
|
-
@new_notes_line = OLE_QA::Framework::OLEFS::New_Notes_Line.new(@ole, 1, 0)
|
22
|
+
@notes_line = OLE_QA::Framework::OLEFS::Notes_Line.new(@ole, 1)
|
24
23
|
end
|
25
24
|
|
26
25
|
after :all do
|
@@ -29,37 +28,26 @@ describe 'A notes line' do
|
|
29
28
|
|
30
29
|
it 'should create a new instance' do
|
31
30
|
@notes_line.class.should == OLE_QA::Framework::OLEFS::Notes_Line
|
32
|
-
@new_notes_line.class.should == OLE_QA::Framework::OLEFS::New_Notes_Line
|
33
31
|
end
|
34
32
|
|
35
33
|
it 'should be a subclass of subline object' do
|
36
34
|
@notes_line.class.superclass.should == OLE_QA::Framework::Subline_Object
|
37
|
-
@new_notes_line.class.superclass.should == OLE_QA::Framework::Subline_Object
|
38
35
|
end
|
39
36
|
|
40
37
|
it 'should have a browser accessor' do
|
41
38
|
@notes_line.browser.class.should == @ole.browser.class
|
42
|
-
@new_notes_line.browser.class.should == @ole.browser.class
|
43
39
|
end
|
44
40
|
|
45
41
|
it 'should have line number attributes' do
|
46
42
|
@notes_line.line_number.should == 1
|
47
|
-
@notes_line.subline_number.should == 1
|
48
43
|
end
|
49
44
|
|
50
45
|
it 'should have notes line elements' do
|
51
|
-
|
52
|
-
methods_array.include?(:note_type_selector).should be_true
|
53
|
-
methods_array.include?(:note_field).should be_true
|
54
|
-
methods_array.include?(:delete_button).should be_true
|
55
|
-
methods_array.include?(:closed_note_type_field).should be_true
|
56
|
-
methods_array.include?(:closed_note_field).should be_true
|
57
|
-
end
|
58
|
-
|
59
|
-
it 'should have new notes line elements' do
|
60
|
-
elements = @new_notes_line.methods
|
46
|
+
elements = @notes_line.elements
|
61
47
|
elements.include?(:note_type_selector).should be_true
|
62
48
|
elements.include?(:note_field).should be_true
|
63
|
-
elements.include?(:
|
49
|
+
elements.include?(:delete_button).should be_true
|
50
|
+
elements.include?(:closed_note_type_field).should be_true
|
51
|
+
elements.include?(:closed_note_field).should be_true
|
64
52
|
end
|
65
53
|
end
|
@@ -38,48 +38,6 @@ describe 'An OLEFS Payment Request page' do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
it 'should have payment request elements' do
|
41
|
-
elements = @preq.
|
42
|
-
elements.include?(:invoice_number_field).should be_true
|
43
|
-
elements.include?(:pay_date_field).should be_true
|
44
|
-
elements.include?(:invoice_date_field).should be_true
|
45
|
-
elements.include?(:immediate_pay_checkbox).should be_true
|
46
|
-
elements.include?(:payment_attachment_checkbox).should be_true
|
47
|
-
elements.include?(:invoice_type_field).should be_true
|
48
|
-
elements.include?(:invoice_subtype_field).should be_true
|
49
|
-
elements.include?(:payment_method_selector).should be_true
|
50
|
-
elements.include?(:grand_total_field).should be_true
|
51
|
-
elements.include?(:additional_charges_toggle).should be_true
|
52
|
-
elements.include?(:freight_extended_cost_field).should be_true
|
53
|
-
elements.include?(:freight_description_field).should be_true
|
54
|
-
elements.include?(:shipping_handling_extended_cost_field).should be_true
|
55
|
-
elements.include?(:shipping_handling_description_field).should be_true
|
56
|
-
elements.include?(:minimum_order_extended_cost_field).should be_true
|
57
|
-
elements.include?(:minimum_order_description_field).should be_true
|
58
|
-
elements.include?(:misc_overhead_extended_cost_field).should be_true
|
59
|
-
elements.include?(:misc_overhead_description_field).should be_true
|
60
|
-
elements.include?(:prorate_by_quantity_checkbox).should be_true
|
61
|
-
elements.include?(:prorate_by_dollar_checkbox).should be_true
|
62
|
-
elements.include?(:prorate_manual_checkbox).should be_true
|
63
|
-
elements.include?(:close_po_checkbox).should be_true
|
64
|
-
end
|
65
|
-
|
66
|
-
it 'should have a new line item' do
|
67
|
-
@preq.methods.include?(:new_line_item).should be_true
|
68
|
-
@preq.new_line_item.class.should == OLE_QA::Framework::OLEFS::New_PREQ_Line_Item
|
69
|
-
end
|
70
|
-
|
71
|
-
it 'should create a line item' do
|
72
|
-
@preq.create_line_item(1)
|
73
|
-
@preq.methods.include?(:line_item_1).should be_true
|
74
|
-
@preq.line_item_1.class.should == OLE_QA::Framework::OLEFS::PREQ_Line_Item
|
75
|
-
end
|
76
|
-
|
77
|
-
it 'should remove a line item' do
|
78
|
-
@preq.remove_line_item(1)
|
79
|
-
@preq.methods.include?(:line_item_1).should be_false
|
80
|
-
end
|
81
|
-
|
82
|
-
it 'should raise an error when asked to remove a line item which does not exist' do
|
83
|
-
lambda {@preq.remove_line_item(1)}.should raise_error
|
41
|
+
elements = @preq.elements
|
84
42
|
end
|
85
43
|
end
|
@@ -20,7 +20,8 @@ describe 'An OLEFS Processing Line object' do
|
|
20
20
|
before :all do
|
21
21
|
@ole = OLE_QA::Framework::Session.new
|
22
22
|
@browser = @ole.browser
|
23
|
-
@
|
23
|
+
@rcv_line = OLE_QA::Framework::OLEFS::Receiving_Line.new(@ole, 1)
|
24
|
+
@processing_line = OLE_QA::Framework::OLEFS::Processing_Line.new(@ole, @rcv_line, 1)
|
24
25
|
end
|
25
26
|
|
26
27
|
after :all do
|
@@ -37,8 +38,8 @@ describe 'An OLEFS Processing Line object' do
|
|
37
38
|
end
|
38
39
|
|
39
40
|
it 'should have processing line elements' do
|
40
|
-
|
41
|
-
|
42
|
-
|
41
|
+
elements = @processing_line.elements
|
42
|
+
elements.include?(:note_field).should be_true
|
43
|
+
elements.include?(:acknowledge_checkbox).should be_true
|
43
44
|
end
|
44
45
|
end
|
@@ -32,7 +32,7 @@ describe 'An OLEFS Purap Document page' do
|
|
32
32
|
end
|
33
33
|
|
34
34
|
it 'should have PURAP document elements' do
|
35
|
-
elements = @purap_document.
|
35
|
+
elements = @purap_document.elements
|
36
36
|
elements.include?(:view_related_tab_toggle).should be_true
|
37
37
|
elements.include?(:view_related_po_link).should be_true
|
38
38
|
elements.include?(:view_related_requisition_link).should be_true
|
@@ -55,4 +55,26 @@ describe 'An OLEFS Purap Document page' do
|
|
55
55
|
elements.include?(:vendor_tab_toggle).should be_true
|
56
56
|
elements.include?(:closed_vendor_name_field).should be_true
|
57
57
|
end
|
58
|
+
|
59
|
+
it 'should have new line item elements' do
|
60
|
+
elements = @purap_document.elements
|
61
|
+
elements.should include(:new_bib_option)
|
62
|
+
elements.should include(:existing_bib_option)
|
63
|
+
elements.should include(:new_bib_button)
|
64
|
+
elements.should include(:existing_bib_button)
|
65
|
+
elements.should include(:item_type_selector)
|
66
|
+
elements.should include(:copies_field)
|
67
|
+
elements.should include(:parts_field)
|
68
|
+
elements.should include(:list_price_field)
|
69
|
+
elements.should include(:public_view_checkbox)
|
70
|
+
elements.should include(:item_price_source_selector)
|
71
|
+
elements.should include(:request_source_selector)
|
72
|
+
elements.should include(:format_selector)
|
73
|
+
elements.should include(:category_selector)
|
74
|
+
elements.should include(:route_to_requestor_checkbox)
|
75
|
+
elements.should include(:discount_field)
|
76
|
+
elements.should include(:discount_type_selector)
|
77
|
+
elements.should include(:add_button)
|
78
|
+
elements.should include(:location_selector)
|
79
|
+
end
|
58
80
|
end
|
@@ -32,7 +32,7 @@ describe 'An OLEFS Purchase Order' do
|
|
32
32
|
end
|
33
33
|
|
34
34
|
it 'should have purchase order elements' do
|
35
|
-
elements = @purchase_order.
|
35
|
+
elements = @purchase_order.elements
|
36
36
|
elements.include?(:additional_info_tab_toggle).should be_true
|
37
37
|
elements.include?(:additional_info_phone_number_field).should be_true
|
38
38
|
elements.include?(:delivery_tab_toggle).should be_true
|
@@ -56,22 +56,8 @@ describe 'An OLEFS Purchase Order' do
|
|
56
56
|
elements.include?(:send_ad_hoc_button).should be_true
|
57
57
|
end
|
58
58
|
|
59
|
-
it 'should have a
|
60
|
-
@purchase_order.
|
61
|
-
|
62
|
-
|
63
|
-
it 'should create a line item' do
|
64
|
-
@purchase_order.create_line_item(1)
|
65
|
-
@purchase_order.methods.include?(:line_item_1).should be_true
|
66
|
-
@purchase_order.line_item_1.class.should == OLE_QA::Framework::OLEFS::Line_Item
|
67
|
-
end
|
68
|
-
|
69
|
-
it 'should delete a line item' do
|
70
|
-
@purchase_order.remove_line_item(1)
|
71
|
-
@purchase_order.methods.include?(:line_item_1).should be_false
|
72
|
-
end
|
73
|
-
|
74
|
-
it 'should not delete a line item which does not exist' do
|
75
|
-
lambda {@purchase_order.remove_line_item(1)}.should raise_error
|
59
|
+
it 'should have a line item' do
|
60
|
+
@purchase_order.lines.include?(:line_item).should be_true
|
61
|
+
@purchase_order.line_item.should be_an_instance_of(OLE_QA::Framework::OLEFS::Line_Item)
|
76
62
|
end
|
77
63
|
end
|
@@ -20,8 +20,8 @@ describe 'An OLEFS Receipt Notes Line object' do
|
|
20
20
|
before :all do
|
21
21
|
@ole = OLE_QA::Framework::Session.new
|
22
22
|
@browser = @ole.browser
|
23
|
-
@
|
24
|
-
@
|
23
|
+
@rcv_line = OLE_QA::Framework::OLEFS::Receiving_Line.new(@ole)
|
24
|
+
@receipt_notes_line = OLE_QA::Framework::OLEFS::Receipt_Notes_Line.new(@ole, @rcv_line, 1)
|
25
25
|
end
|
26
26
|
|
27
27
|
after :all do
|
@@ -31,24 +31,15 @@ describe 'An OLEFS Receipt Notes Line object' do
|
|
31
31
|
it 'should create a new instance' do
|
32
32
|
@receipt_notes_line.class.should == OLE_QA::Framework::OLEFS::Receipt_Notes_Line
|
33
33
|
@receipt_notes_line.class.superclass.should == OLE_QA::Framework::Subline_Object
|
34
|
-
@new_receipt_notes_line.class.should == OLE_QA::Framework::OLEFS::New_Receipt_Notes_Line
|
35
|
-
@new_receipt_notes_line.class.superclass.should == OLE_QA::Framework::Subline_Object
|
36
34
|
end
|
37
35
|
|
38
36
|
it 'should have a browser accessor' do
|
39
37
|
@receipt_notes_line.browser.class.should == @ole.browser.class
|
40
|
-
@new_receipt_notes_line.browser.class.should == @ole.browser.class
|
41
38
|
end
|
42
39
|
|
43
40
|
it 'should have receipt notes elements' do
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
end
|
48
|
-
|
49
|
-
it 'should have new receipt notes elements' do
|
50
|
-
methods = @new_receipt_notes_line.methods
|
51
|
-
methods.include?(:note_type_selector).should be_true
|
52
|
-
methods.include?(:note_field).should be_true
|
41
|
+
elements = @receipt_notes_line.elements
|
42
|
+
elements.include?(:note_type_selector).should be_true
|
43
|
+
elements.include?(:note_field).should be_true
|
53
44
|
end
|
54
45
|
end
|
data/spec/olefs/receive_spec.rb
CHANGED
@@ -37,7 +37,7 @@ describe 'An OLEFS Receiving Document page' do
|
|
37
37
|
end
|
38
38
|
|
39
39
|
it 'should have receiving document elements' do
|
40
|
-
elements = @rcv.
|
40
|
+
elements = @rcv.elements
|
41
41
|
elements.include?(:date_received_field).should be_true
|
42
42
|
elements.include?(:packing_slip_number_field).should be_true
|
43
43
|
elements.include?(:bill_of_lading_number_field).should be_true
|
@@ -45,22 +45,7 @@ describe 'An OLEFS Receiving Document page' do
|
|
45
45
|
elements.include?(:carrier_selector).should be_true
|
46
46
|
end
|
47
47
|
|
48
|
-
it 'should have a
|
49
|
-
@rcv.
|
50
|
-
end
|
51
|
-
|
52
|
-
it 'should create a receiving line' do
|
53
|
-
@rcv.create_receiving_line(1)
|
54
|
-
@rcv.methods.include?(:receiving_line_1).should be_true
|
55
|
-
@rcv.receiving_line_1.class.should == OLE_QA::Framework::OLEFS::Receiving_Line
|
56
|
-
end
|
57
|
-
|
58
|
-
it 'should delete a receiving line' do
|
59
|
-
@rcv.remove_receiving_line(1)
|
60
|
-
@rcv.methods.include?(:receiving_line_1).should be_false
|
61
|
-
end
|
62
|
-
|
63
|
-
it 'should not delete a receiving line which does not exist' do
|
64
|
-
lambda {@rcv.remove_receiving_line(1)}.should raise_error
|
48
|
+
it 'should have a receiving line' do
|
49
|
+
@rcv.lines.include?(:receiving_line).should be_true
|
65
50
|
end
|
66
51
|
end
|
@@ -20,9 +20,7 @@ describe 'An OLEFS Receiving Line object' do
|
|
20
20
|
before :all do
|
21
21
|
@ole = OLE_QA::Framework::Session.new
|
22
22
|
@browser = @ole.browser
|
23
|
-
@
|
24
|
-
@rcv_line = OLE_QA::Framework::OLEFS::Receiving_Line.new(@ole, @line_number)
|
25
|
-
@new_rcv_line = OLE_QA::Framework::OLEFS::New_Receiving_Line.new(@ole, @line_number)
|
23
|
+
@rcv_line = OLE_QA::Framework::OLEFS::Receiving_Line.new(@ole, 1)
|
26
24
|
end
|
27
25
|
|
28
26
|
after :all do
|
@@ -31,95 +29,58 @@ describe 'An OLEFS Receiving Line object' do
|
|
31
29
|
|
32
30
|
it 'should create a new instance' do
|
33
31
|
@rcv_line.class.should == OLE_QA::Framework::OLEFS::Receiving_Line
|
34
|
-
@rcv_line.class.superclass.should == OLE_QA::Framework::
|
35
|
-
@new_rcv_line.class.should == OLE_QA::Framework::OLEFS::New_Receiving_Line
|
36
|
-
@new_rcv_line.class.superclass.should == OLE_QA::Framework::OLEFS::Line_Object
|
32
|
+
@rcv_line.class.superclass.should == OLE_QA::Framework::Line_Object
|
37
33
|
end
|
38
34
|
|
39
35
|
it 'should have a browser accessor' do
|
40
36
|
@rcv_line.browser.class.should == @ole.browser.class
|
41
|
-
@new_rcv_line.browser.class.should == @ole.browser.class
|
42
37
|
end
|
43
38
|
|
44
39
|
it 'should have a line number' do
|
45
40
|
@rcv_line.line_number.should == 1
|
46
|
-
@new_rcv_line.line_number.should == 0
|
47
41
|
end
|
48
42
|
|
49
43
|
it 'should have receiving line elements' do
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
methods.include?(:item_received_quantity_field).should be_true
|
59
|
-
methods.include?(:item_received_parts_field).should be_true
|
60
|
-
methods.include?(:item_returned_quantity_field).should be_true
|
61
|
-
methods.include?(:item_returned_parts_field).should be_true
|
62
|
-
methods.include?(:item_damaged_quantity_field).should be_true
|
63
|
-
methods.include?(:item_damaged_parts_field).should be_true
|
64
|
-
methods.include?(:available_to_public_checkbox).should be_true
|
65
|
-
methods.include?(:public_view_checkbox).should be_true
|
66
|
-
methods.include?(:exception_notes_toggle).should be_true
|
67
|
-
methods.include?(:receipt_notes_toggle).should be_true
|
68
|
-
methods.include?(:special_processing_instructions_toggle).should be_true
|
69
|
-
end
|
70
|
-
|
71
|
-
it 'should have subline objects' do
|
72
|
-
@rcv_line.methods.include?(:new_exception_notes_line).should be_true
|
73
|
-
@rcv_line.methods.include?(:new_receipt_notes_line).should be_true
|
74
|
-
@rcv_line.methods.include?(:new_copies_line).should be_true
|
75
|
-
end
|
76
|
-
|
77
|
-
it 'should add sublines' do
|
78
|
-
@rcv_line.create_exception_notes_line(1)
|
79
|
-
@rcv_line.methods.include?(:exception_notes_line_1).should be_true
|
80
|
-
@rcv_line.exception_notes_line_1.class.should == OLE_QA::Framework::OLEFS::Exception_Notes_Line
|
81
|
-
@rcv_line.create_receipt_notes_line(1)
|
82
|
-
@rcv_line.methods.include?(:receipt_notes_line_1).should be_true
|
83
|
-
@rcv_line.receipt_notes_line_1.class.should == OLE_QA::Framework::OLEFS::Receipt_Notes_Line
|
84
|
-
@rcv_line.create_copies_line(1)
|
85
|
-
@rcv_line.methods.include?(:copies_line_1).should be_true
|
86
|
-
@rcv_line.copies_line_1.class.should == OLE_QA::Framework::OLEFS::Copies_Line
|
87
|
-
@rcv_line.create_processing_line(1)
|
88
|
-
@rcv_line.methods.include?(:processing_line_1).should be_true
|
89
|
-
@rcv_line.processing_line_1.class.should == OLE_QA::Framework::OLEFS::Processing_Line
|
90
|
-
end
|
91
|
-
|
92
|
-
it 'should remove sublines' do
|
93
|
-
@rcv_line.remove_exception_notes_line(1)
|
94
|
-
@rcv_line.remove_receipt_notes_line(1)
|
95
|
-
@rcv_line.remove_copies_line(1)
|
96
|
-
@rcv_line.remove_processing_line(1)
|
97
|
-
@rcv_line.methods.include?(:exception_notes_line_1).should be_false
|
98
|
-
@rcv_line.methods.include?(:receipt_notes_line_1).should be_false
|
99
|
-
@rcv_line.methods.include?(:copies_line_1).should be_false
|
100
|
-
@rcv_line.methods.include?(:processing_line_1).should be_false
|
101
|
-
end
|
102
|
-
|
103
|
-
it 'should raise an error when asked to remove sublines which do not exist' do
|
104
|
-
lambda {@rcv_line.remove_exception_notes_line(1)}.should raise_error
|
105
|
-
lambda {@rcv_line.remove_receipt_notes_line(1)}.should raise_error
|
106
|
-
lambda {@rcv_line.remove_copies_line(1)}.should raise_error
|
107
|
-
lambda {@rcv_line.remove_processing_line(1)}.should raise_error
|
108
|
-
end
|
109
|
-
|
110
|
-
it 'should have new receiving line elements' do
|
111
|
-
elements = @new_rcv_line.methods
|
112
|
-
elements.include?(:vendor_item_identifier_field).should be_true
|
113
|
-
elements.include?(:format_selector).should be_true
|
44
|
+
elements = @rcv_line.elements
|
45
|
+
elements.include?(:description_field).should be_true
|
46
|
+
elements.include?(:quantity_ordered_field).should be_true
|
47
|
+
elements.include?(:parts_ordered_field).should be_true
|
48
|
+
elements.include?(:prior_quantity_received_field).should be_true
|
49
|
+
elements.include?(:prior_parts_received_field).should be_true
|
50
|
+
elements.include?(:quantity_to_be_received_field).should be_true
|
51
|
+
elements.include?(:parts_to_be_received_field).should be_true
|
114
52
|
elements.include?(:item_received_quantity_field).should be_true
|
115
53
|
elements.include?(:item_received_parts_field).should be_true
|
116
54
|
elements.include?(:item_returned_quantity_field).should be_true
|
117
55
|
elements.include?(:item_returned_parts_field).should be_true
|
118
56
|
elements.include?(:item_damaged_quantity_field).should be_true
|
119
57
|
elements.include?(:item_damaged_parts_field).should be_true
|
120
|
-
elements.include?(:addition_reason_selector).should be_true
|
121
58
|
elements.include?(:available_to_public_checkbox).should be_true
|
122
59
|
elements.include?(:public_view_checkbox).should be_true
|
123
|
-
elements.include?(:
|
60
|
+
elements.include?(:exception_notes_toggle).should be_true
|
61
|
+
elements.include?(:receipt_notes_toggle).should be_true
|
62
|
+
elements.include?(:special_processing_instructions_toggle).should be_true
|
63
|
+
end
|
64
|
+
|
65
|
+
it 'should have receipt notes elements' do
|
66
|
+
elements = @rcv_line.elements
|
67
|
+
elements.include?(:receipt_note_type_selector).should be_true
|
68
|
+
elements.include?(:receipt_note_field).should be_true
|
69
|
+
elements.include?(:add_receipt_note_button).should be_true
|
70
|
+
end
|
71
|
+
|
72
|
+
it 'should have exception notes elements' do
|
73
|
+
elements = @rcv_line.elements
|
74
|
+
elements.include?(:exception_note_type_selector)
|
75
|
+
elements.include?(:exception_note_field)
|
76
|
+
elements.include?(:add_exception_note_button)
|
77
|
+
end
|
78
|
+
|
79
|
+
it 'should have sublines' do
|
80
|
+
sublines = @rcv_line.sublines
|
81
|
+
sublines.include?(:exception_notes_line).should be_true
|
82
|
+
sublines.include?(:receipt_notes_line).should be_true
|
83
|
+
sublines.include?(:copies_line).should be_true
|
84
|
+
sublines.include?(:processing_line).should be_true
|
124
85
|
end
|
125
86
|
end
|