ole-qa-framework 3.14.1 → 3.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +30 -0
- data/LICENSE.md +1 -1
- data/README.md +93 -1
- data/Rakefile.rb +38 -12
- data/config/options.yml +11 -0
- data/data/circulation.yml +10 -0
- data/data/country.yml +3 -0
- data/lib/common/common_object.rb +1 -1
- data/lib/common/data_object.rb +1 -2
- data/lib/common/line_object.rb +1 -1
- data/lib/common/page.rb +27 -3
- data/lib/common/subline_object.rb +1 -1
- data/lib/data_factory/account_factory.rb +3 -3
- data/lib/data_factory/bib_factory.rb +14 -4
- data/lib/data_factory/metadata_factory.rb +4 -3
- data/lib/data_factory/patron_factory.rb +10 -5
- data/lib/data_factory/string_factory.rb +2 -2
- data/lib/docstore/common/results.rb +1 -1
- data/lib/docstore/pages/marc_results.rb +1 -1
- data/lib/docstore/pages/search.rb +1 -1
- data/lib/module/factory_helpers.rb +1 -1
- data/lib/module/qa_helpers.rb +1 -1
- data/lib/ole-qa-framework.rb +17 -16
- data/lib/ole_qa_framework/COMPATIBILITY.rb +1 -1
- data/lib/ole_qa_framework/VERSION.rb +2 -2
- data/lib/olefs/common/e_doc.rb +1 -1
- data/lib/olefs/common/lookup.rb +1 -1
- data/lib/olefs/common/purap_document.rb +1 -1
- data/lib/olefs/objects/invoice_current_item.rb +1 -1
- data/lib/olefs/objects/invoice_line.rb +1 -1
- data/lib/olefs/objects/line_item.rb +1 -1
- data/lib/olefs/objects/receiving_line.rb +1 -1
- data/lib/olefs/pages/building_lookup.rb +1 -1
- data/lib/olefs/pages/invoice.rb +1 -1
- data/lib/olefs/pages/load_report.rb +1 -1
- data/lib/olefs/pages/load_summary_lookup.rb +1 -1
- data/lib/olefs/pages/main_menu.rb +1 -1
- data/lib/olefs/pages/payment_request.rb +1 -1
- data/lib/olefs/pages/purchase_order.rb +1 -1
- data/lib/olefs/pages/receiving_document.rb +1 -1
- data/lib/olefs/pages/requisition.rb +1 -1
- data/lib/olefs/pages/vendor_lookup.rb +1 -1
- data/lib/olefs/subobjects/accounting_line.rb +1 -1
- data/lib/olefs/subobjects/copies_line.rb +1 -1
- data/lib/olefs/subobjects/exception_notes_line.rb +1 -1
- data/lib/olefs/subobjects/invoice_line_item.rb +1 -1
- data/lib/olefs/subobjects/notes_line.rb +1 -1
- data/lib/olefs/subobjects/processing_line.rb +1 -1
- data/lib/olefs/subobjects/receipt_notes_line.rb +1 -1
- data/lib/olels/common/batch_profile.rb +1 -1
- data/lib/olels/common/e_doc.rb +1 -1
- data/lib/olels/common/editor.rb +1 -1
- data/lib/olels/common/lookup.rb +1 -1
- data/lib/olels/objects/access_info_line.rb +1 -1
- data/lib/olels/objects/batch_data_mapping_line.rb +1 -1
- data/lib/olels/objects/batch_delete_field_line.rb +1 -1
- data/lib/olels/objects/batch_rename_field_line.rb +1 -1
- data/lib/olels/objects/control_006_line.rb +1 -1
- data/lib/olels/objects/control_007_line.rb +1 -1
- data/lib/olels/objects/data_line.rb +1 -1
- data/lib/olels/objects/editor_note.rb +1 -1
- data/lib/olels/objects/export_filter_line.rb +1 -1
- data/lib/olels/objects/holdings_note.rb +1 -1
- data/lib/olels/objects/import_defaults_line.rb +1 -1
- data/lib/olels/objects/import_match_line.rb +1 -1
- data/lib/olels/objects/import_pf_line.rb +1 -1
- data/lib/olels/objects/item_note.rb +1 -1
- data/lib/olels/objects/ownership_extent_line.rb +1 -1
- data/lib/olels/objects/patron_address_line.rb +1 -1
- data/lib/olels/objects/patron_email_line.rb +1 -1
- data/lib/olels/objects/patron_phone_line.rb +1 -1
- data/lib/olels/objects/workbench_line.rb +1 -1
- data/lib/olels/pages/batch_export_profile.rb +1 -1
- data/lib/olels/pages/batch_import_profile.rb +1 -1
- data/lib/olels/pages/batch_job_details.rb +1 -1
- data/lib/olels/pages/batch_job_report.rb +1 -1
- data/lib/olels/pages/batch_process.rb +1 -1
- data/lib/olels/pages/batch_profile_lookup.rb +1 -1
- data/lib/olels/pages/batch_type_lookup.rb +1 -1
- data/lib/olels/pages/bib_editor.rb +1 -1
- data/lib/olels/pages/describe_workbench.rb +1 -1
- data/lib/olels/pages/instance_editor.rb +1 -1
- data/lib/olels/pages/item_editor.rb +1 -1
- data/lib/olels/pages/item_lookup.rb +1 -1
- data/lib/olels/pages/loan.rb +1 -1
- data/lib/olels/pages/location.rb +1 -1
- data/lib/olels/pages/location_level_lookup.rb +1 -1
- data/lib/olels/pages/location_lookup.rb +1 -1
- data/lib/olels/pages/main_menu.rb +1 -1
- data/lib/olels/pages/old_describe_workbench.rb +1 -1
- data/lib/olels/pages/patron.rb +1 -1
- data/lib/olels/pages/patron_lookup.rb +1 -1
- data/lib/olels/pages/renewal.rb +1 -1
- data/lib/olels/pages/request.rb +1 -1
- data/lib/olels/pages/request_lookup.rb +1 -1
- data/lib/olels/pages/return.rb +1 -1
- data/lib/olels/pages/staff_upload.rb +1 -1
- data/lib/olels/subobjects/ownership_note.rb +1 -1
- data/spec/common/browser_spec.rb +2 -2
- data/spec/common/data_object_spec.rb +2 -2
- data/spec/common/line_object_spec.rb +2 -2
- data/spec/common/page_spec.rb +2 -2
- data/spec/common/session_spec.rb +62 -0
- data/spec/common/subline_object_spec.rb +2 -2
- data/spec/data_factory/account_factory_spec.rb +1 -1
- data/spec/data_factory/bib_factory_spec.rb +17 -1
- data/spec/data_factory/patron_factory_spec.rb +6 -1
- data/spec/data_factory/string_factory_spec.rb +1 -1
- data/spec/modules/qa_helpers_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- metadata +7 -9
- data/lib/config/alt/dev_env.yml +0 -8
- data/lib/config/alt/test_env.yml +0 -8
- data/lib/config/default_options.yml +0 -8
- data/lib/module/qa_data_helpers.rb +0 -17
- data/lib/module/qa_page_helpers.rb +0 -41
- data/spec/modules/qa_page_helpers_spec.rb +0 -54
data/lib/olels/pages/loan.rb
CHANGED
data/lib/olels/pages/location.rb
CHANGED
data/lib/olels/pages/patron.rb
CHANGED
data/lib/olels/pages/renewal.rb
CHANGED
data/lib/olels/pages/request.rb
CHANGED
data/lib/olels/pages/return.rb
CHANGED
data/spec/common/browser_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2005-
|
1
|
+
# Copyright 2005-2014 The Kuali Foundation
|
2
2
|
#
|
3
3
|
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -23,7 +23,7 @@ describe "The Watir Webdriver" do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
after :all do
|
26
|
-
@ole.quit
|
26
|
+
@ole.quit unless @ole.nil?
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'should create an instance of Watir Webdriver' do
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2005-
|
1
|
+
# Copyright 2005-2014 The Kuali Foundation
|
2
2
|
#
|
3
3
|
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -24,7 +24,7 @@ describe 'A Data Object' do
|
|
24
24
|
end
|
25
25
|
|
26
26
|
after :all do
|
27
|
-
@ole.quit
|
27
|
+
@ole.quit unless @ole.nil?
|
28
28
|
end
|
29
29
|
|
30
30
|
it 'should create a new instance' do
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2005-
|
1
|
+
# Copyright 2005-2014 The Kuali Foundation
|
2
2
|
#
|
3
3
|
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -29,7 +29,7 @@ describe 'A Line Object' do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
after :all do
|
32
|
-
@ole.quit
|
32
|
+
@ole.quit unless @ole.nil?
|
33
33
|
end
|
34
34
|
|
35
35
|
it 'should create a new instance of line object' do
|
data/spec/common/page_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2005-
|
1
|
+
# Copyright 2005-2014 The Kuali Foundation
|
2
2
|
#
|
3
3
|
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -45,7 +45,7 @@ describe "A Page" do
|
|
45
45
|
end
|
46
46
|
|
47
47
|
after :all do
|
48
|
-
@ole.quit
|
48
|
+
@ole.quit unless @ole.nil?
|
49
49
|
end
|
50
50
|
|
51
51
|
it "should open via url" do
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# Copyright 2005-2014 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
|
+
describe 'An OLE QA Framework Session' do
|
19
|
+
|
20
|
+
before :all do
|
21
|
+
@ole = OLE_QA::Framework::Session.new(:headless? => false)
|
22
|
+
@headless_ole = OLE_QA::Framework::Session.new(:headless? => true)
|
23
|
+
end
|
24
|
+
|
25
|
+
after :all do
|
26
|
+
@ole.quit unless @ole.nil?
|
27
|
+
@headless_ole.quit unless @ole.nil?
|
28
|
+
end
|
29
|
+
|
30
|
+
context 'should start' do
|
31
|
+
it 'normally' do
|
32
|
+
expect(@ole).to be_an(OLE_QA::Framework::Session)
|
33
|
+
expect(@ole.options[:headless?]).to be_false
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'headlessly' do
|
37
|
+
expect(@headless_ole).to be_an(OLE_QA::Framework::Session)
|
38
|
+
expect(@headless_ole.options[:headless?]).to be_true
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'with a URL reader attribute' do
|
42
|
+
expect(@ole.url).to be_a(String)
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'with a docstore URL reader attribute' do
|
46
|
+
expect(@ole.docstore_url).to be_a(String)
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'should accept a predefined Watir-Webdriver session' do
|
50
|
+
browser = Watir::Browser.new :firefox
|
51
|
+
ole = OLE_QA::Framework::Session.new(:browser => browser)
|
52
|
+
expect(ole.browser).to eq(browser)
|
53
|
+
browser.quit
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
context 'with options' do
|
58
|
+
it 'in a reader attribute' do
|
59
|
+
expect(@ole.options).to be_a(Hash)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2005-
|
1
|
+
# Copyright 2005-2014 The Kuali Foundation
|
2
2
|
#
|
3
3
|
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -24,7 +24,7 @@ describe 'A Subline Object' do
|
|
24
24
|
end
|
25
25
|
|
26
26
|
after :all do
|
27
|
-
@ole.quit
|
27
|
+
@ole.quit unless @ole.nil?
|
28
28
|
end
|
29
29
|
|
30
30
|
it 'should create a new instance' do
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2005-
|
1
|
+
# Copyright 2005-2014 The Kuali Foundation
|
2
2
|
#
|
3
3
|
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -45,4 +45,20 @@ describe 'The Bib Record Factory' do
|
|
45
45
|
specific_author = OLE_QA::Framework::Bib_Factory.author(4,8)
|
46
46
|
specific_author.should =~ /[A-Z][a-z]{3} [A-Z][a-z]{7}/
|
47
47
|
end
|
48
|
+
|
49
|
+
it 'should return a circulation info hash' do
|
50
|
+
circ_info = OLE_QA::Framework::Bib_Factory.circulation_info
|
51
|
+
circ_info[:code].should be_a(String)
|
52
|
+
circ_info[:locations].should be_an(Array)
|
53
|
+
end
|
54
|
+
|
55
|
+
it 'should select a circulation info hash by desk code' do
|
56
|
+
circ_info = OLE_QA::Framework::Bib_Factory.circulation_info('BL_EDUC')
|
57
|
+
circ_info[:code].should be_a(String)
|
58
|
+
circ_info[:locations].should be_an(Array)
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'should raise an error if asked for a desk code that does not exist' do
|
62
|
+
lambda {OLE_QA::Framework::Bib_Factory.circulation_info('Plugh')}.should raise_error(OLE_QA::Framework::Error,'No circulation desk found. Given: Plugh')
|
63
|
+
end
|
48
64
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2005-
|
1
|
+
# Copyright 2005-2014 The Kuali Foundation
|
2
2
|
#
|
3
3
|
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -35,6 +35,10 @@ describe 'The Patron Factory' do
|
|
35
35
|
OLE_QA::Framework::Patron_Factory.states.should be_an(Array)
|
36
36
|
end
|
37
37
|
|
38
|
+
it 'should have a country string' do
|
39
|
+
OLE_QA::Framework::Patron_Factory.country.should be_a(String)
|
40
|
+
end
|
41
|
+
|
38
42
|
it 'should return a new patron' do
|
39
43
|
patron = OLE_QA::Framework::Patron_Factory.new_patron
|
40
44
|
patron.should be_a(Hash)
|
@@ -48,5 +52,6 @@ describe 'The Patron Factory' do
|
|
48
52
|
patron[:postal_code].should =~ /[0-9]{5}/
|
49
53
|
patron[:phone].should =~ /[0-9]{3}\-[0-9]{3}\-[0-9]{4}/
|
50
54
|
patron[:email].should =~ /[A-Z,a-z]+\@[a-z]+\.[a-z]{3}/
|
55
|
+
patron[:country].should =~ /[w\s]+/
|
51
56
|
end
|
52
57
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2005-
|
1
|
+
# Copyright 2005-2014 The Kuali Foundation
|
2
2
|
#
|
3
3
|
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -39,7 +39,7 @@ describe 'The Helpers module' do
|
|
39
39
|
end
|
40
40
|
|
41
41
|
after :all do
|
42
|
-
@ole.quit
|
42
|
+
@ole.quit unless @ole.nil?
|
43
43
|
end
|
44
44
|
|
45
45
|
it 'should do create an accessor attribute' do
|