ole-qa-framework 2.6.0 → 2.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +9 -0
- data/lib/ole_qa_framework/VERSION.rb +1 -1
- data/lib/olels/objects/control_006_line.rb +29 -0
- data/lib/olels/objects/control_007_line.rb +29 -0
- data/lib/olels/pages/bib_editor.rb +31 -5
- data/spec/olels/bib_editor_spec.rb +37 -4
- data/spec/olels/control_006_line_spec.rb +41 -0
- data/spec/olels/control_007_line_spec.rb +41 -0
- metadata +7 -1
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
### v2.6.1 - 2013/08/23
|
2
|
+
|
3
|
+
* Updated Bib Editor definitions
|
4
|
+
* Control Field 008 definition reset to original format
|
5
|
+
* Control Field 006 definitions updated
|
6
|
+
* Control Field 006 line object added
|
7
|
+
* Control Field 007 definitions updated
|
8
|
+
* Control Field 007 line object added
|
9
|
+
|
1
10
|
### v2.6.0 - 2013/08/23
|
2
11
|
|
3
12
|
* Finished Describe Workbench Screen
|
@@ -0,0 +1,29 @@
|
|
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
|
+
|
17
|
+
# Represents a Marc control field 006 line in the OLELS Bib Editor.
|
18
|
+
class Control_006_Line < OLE_QA::Framework::OLELS::Line_Object
|
19
|
+
|
20
|
+
# Set Marc data line elements.
|
21
|
+
def set_elements
|
22
|
+
element(:field) {b.text_field(:id => "Control_Field_006_line#{@line_id}_control")}
|
23
|
+
element(:add_button) {b.button(:id => "Control_Field_006_addTagButton_id_line#{@line_id}")}
|
24
|
+
element(:edit_button) {b.button(:id => "Control_Field_006_EditTagButton_id_line#{@line_id}")}
|
25
|
+
element(:remove_button) {b.button(:id => "Control_Field_006_removeTagButton_id_line#{@line_id}")}
|
26
|
+
element(:clear_button) {b.button(:id => "Control_Field_006_clearTagButton_id_line#{@line_id}")}
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,29 @@
|
|
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
|
+
|
17
|
+
# Represents a Marc control field 006 line in the OLELS Bib Editor.
|
18
|
+
class Control_007_Line < OLE_QA::Framework::OLELS::Line_Object
|
19
|
+
|
20
|
+
# Set Marc data line elements.
|
21
|
+
def set_elements
|
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
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -36,15 +36,13 @@ module OLE_QA::Framework::OLELS
|
|
36
36
|
element(:control_001_field) {b.text_field(:id => "Control_Field_001_control")}
|
37
37
|
element(:control_003_field) {b.text_field(:id => "Control_Field_003_control")}
|
38
38
|
element(:control_005_field) {b.text_field(:id => "Control_Field_005_control")}
|
39
|
-
element(:control_006_field) {b.text_field(:id => "006Field_control")}
|
40
39
|
element(:control_006_format_selector) {b.select_list(:id => "006Field_0_control")}
|
41
40
|
element(:control_006_set_button) {b.button(:id => "ControlField_Set_button")}
|
42
|
-
element(:
|
43
|
-
element(:control_007_field) {b.text_field(:id => "007Field_control")}
|
41
|
+
element(:control_006_clear_button) {b.button(:id => "ControlField_Reset_button")}
|
44
42
|
element(:control_007_catmtrl_selector) {b.select_list(:id => "007Field_0_control")}
|
45
43
|
element(:control_007_set_button) {b.button(:id => "ControlField007_Set_button")}
|
46
|
-
element(:
|
47
|
-
element(:control_008_field) {b.text_field(:id =>
|
44
|
+
element(:control_007_clear_button) {b.button(:id => "ControlField007_Clear_button ")}
|
45
|
+
element(:control_008_field) {b.text_field(:id => 'Control_Field_008_control')}
|
48
46
|
end
|
49
47
|
|
50
48
|
def set_functions
|
@@ -56,9 +54,23 @@ module OLE_QA::Framework::OLELS
|
|
56
54
|
# @note There will always be at least one Marc Data Line on a newly-opened record,
|
57
55
|
# whether newly-created or previously extant.
|
58
56
|
def set_lines
|
57
|
+
create_006_line(1)
|
58
|
+
create_007_line(1)
|
59
59
|
create_data_line(1)
|
60
60
|
end
|
61
|
+
|
62
|
+
# Add a control field 006 line to the editor page model.
|
63
|
+
def create_006_line(which = 1)
|
64
|
+
create_line("control_006_line_#{which}", "Control_006_Line", which)
|
65
|
+
end
|
66
|
+
alias_method(:add_006_line, :create_006_line)
|
61
67
|
|
68
|
+
# Add a control field 007 line to the editor page model.
|
69
|
+
def create_007_line(which = 1)
|
70
|
+
create_line("control_007_line_#{which}", "Control_007_Line", which)
|
71
|
+
end
|
72
|
+
alias_method(:add_007_line, :create_007_line)
|
73
|
+
|
62
74
|
# Add a Marc data line to the editor page model.
|
63
75
|
def create_data_line(which = 1)
|
64
76
|
create_line("data_line_#{which}","Data_Line", which)
|
@@ -70,5 +82,19 @@ module OLE_QA::Framework::OLELS
|
|
70
82
|
remove_line("data_line_#{which}")
|
71
83
|
end
|
72
84
|
alias_method(:delete_data_line,:remove_data_line)
|
85
|
+
|
86
|
+
# Remove a control 006 line from the editor page model.
|
87
|
+
def remove_006_line(which = 1)
|
88
|
+
remove_line("control_006_line_#{which}")
|
89
|
+
end
|
90
|
+
alias_method(:delete_006_line,:remove_006_line)
|
91
|
+
|
92
|
+
# Remove a control 007 line from the editor page model.
|
93
|
+
def remove_007_line(which = 1)
|
94
|
+
remove_line("control_007_line_#{which}")
|
95
|
+
end
|
96
|
+
alias_method(:delete_007_line,:remove_007_line)
|
97
|
+
|
98
|
+
|
73
99
|
end
|
74
100
|
end
|
@@ -46,14 +46,12 @@ describe 'The Bib Editor' do
|
|
46
46
|
elements.include?(:control_001_field).should be_true
|
47
47
|
elements.include?(:control_003_field).should be_true
|
48
48
|
elements.include?(:control_005_field).should be_true
|
49
|
-
elements.include?(:control_006_field).should be_true
|
50
49
|
elements.include?(:control_006_format_selector).should be_true
|
51
50
|
elements.include?(:control_006_set_button).should be_true
|
52
|
-
elements.include?(:
|
53
|
-
elements.include?(:control_007_field).should be_true
|
51
|
+
elements.include?(:control_006_clear_button).should be_true
|
54
52
|
elements.include?(:control_007_catmtrl_selector).should be_true
|
55
53
|
elements.include?(:control_007_set_button).should be_true
|
56
|
-
elements.include?(:
|
54
|
+
elements.include?(:control_007_clear_button).should be_true
|
57
55
|
elements.include?(:control_008_field).should be_true
|
58
56
|
end
|
59
57
|
|
@@ -83,4 +81,39 @@ describe 'The Bib Editor' do
|
|
83
81
|
it 'should not delete a data line which does not exist' do
|
84
82
|
lambda {@bib_editor.delete_data_line(2)}.should raise_error
|
85
83
|
end
|
84
|
+
|
85
|
+
it 'should start with one 006 line' do
|
86
|
+
@bib_editor.control_006_line_1.should be_a(OLE_QA::Framework::OLELS::Control_006_Line)
|
87
|
+
end
|
88
|
+
|
89
|
+
it 'should start with one 007 line' do
|
90
|
+
@bib_editor.control_007_line_1.should be_a(OLE_QA::Framework::OLELS::Control_007_Line)
|
91
|
+
end
|
92
|
+
|
93
|
+
it 'should add an 006 line' do
|
94
|
+
@bib_editor.add_006_line(2)
|
95
|
+
@bib_editor.methods.include?(:control_006_line_2).should be_true
|
96
|
+
@bib_editor.control_006_line_2.should be_a(OLE_QA::Framework::OLELS::Control_006_Line)
|
97
|
+
end
|
98
|
+
|
99
|
+
it 'should add an 007 line' do
|
100
|
+
@bib_editor.add_007_line(2)
|
101
|
+
@bib_editor.methods.include?(:control_007_line_2).should be_true
|
102
|
+
@bib_editor.control_007_line_2.should be_a(OLE_QA::Framework::OLELS::Control_007_Line)
|
103
|
+
end
|
104
|
+
|
105
|
+
it 'should delete an 006 line' do
|
106
|
+
@bib_editor.remove_006_line(2)
|
107
|
+
@bib_editor.methods.should_not include(:control_006_line_2)
|
108
|
+
end
|
109
|
+
|
110
|
+
it 'should delete an 007 line' do
|
111
|
+
@bib_editor.remove_007_line(2)
|
112
|
+
@bib_editor.methods.should_not include(:control_007_line_2)
|
113
|
+
end
|
114
|
+
|
115
|
+
it 'should not remove control lines which do not exist' do
|
116
|
+
lambda {@bib_editor.remove_006_line(2)}.should raise_error
|
117
|
+
lambda {@bib_editor.remove_007_line(2)}.should raise_error
|
118
|
+
end
|
86
119
|
end
|
@@ -0,0 +1,41 @@
|
|
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
|
+
describe 'An OLELS Control Field 006 line object' do
|
19
|
+
|
20
|
+
before :all do
|
21
|
+
@ole = OLE_QA::Framework::Session.new
|
22
|
+
@line = OLE_QA::Framework::OLELS::Control_006_Line.new(@ole,1)
|
23
|
+
end
|
24
|
+
|
25
|
+
after :all do
|
26
|
+
@ole.quit
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'should create a new instance' do
|
30
|
+
@line.should be_a(OLE_QA::Framework::OLELS::Control_006_Line)
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'should have control field 006 line elements' do
|
34
|
+
elements = @line.elements
|
35
|
+
elements.should include(:field)
|
36
|
+
elements.should include(:add_button)
|
37
|
+
elements.should include(:edit_button)
|
38
|
+
elements.should include(:remove_button)
|
39
|
+
elements.should include(:clear_button)
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,41 @@
|
|
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
|
+
describe 'An OLELS Control Field 007 line object' do
|
19
|
+
|
20
|
+
before :all do
|
21
|
+
@ole = OLE_QA::Framework::Session.new
|
22
|
+
@line = OLE_QA::Framework::OLELS::Control_007_Line.new(@ole,1)
|
23
|
+
end
|
24
|
+
|
25
|
+
after :all do
|
26
|
+
@ole.quit
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'should create a new instance' do
|
30
|
+
@line.should be_a(OLE_QA::Framework::OLELS::Control_007_Line)
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'should have control field 007 line elements' do
|
34
|
+
elements = @line.elements
|
35
|
+
elements.should include(:field)
|
36
|
+
elements.should include(:add_button)
|
37
|
+
elements.should include(:edit_button)
|
38
|
+
elements.should include(:remove_button)
|
39
|
+
elements.should include(:clear_button)
|
40
|
+
end
|
41
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ole-qa-framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -178,6 +178,8 @@ files:
|
|
178
178
|
- lib/olels/common/line_object.rb
|
179
179
|
- lib/olels/common/lookup.rb
|
180
180
|
- lib/olels/objects/access_info_line.rb
|
181
|
+
- lib/olels/objects/control_006_line.rb
|
182
|
+
- lib/olels/objects/control_007_line.rb
|
181
183
|
- lib/olels/objects/data_line.rb
|
182
184
|
- lib/olels/objects/editor_note.rb
|
183
185
|
- lib/olels/objects/holdings_note.rb
|
@@ -229,6 +231,8 @@ files:
|
|
229
231
|
- spec/olefs/vendor_lookup_spec.rb
|
230
232
|
- spec/olels/access_info_line_spec.rb
|
231
233
|
- spec/olels/bib_editor_spec.rb
|
234
|
+
- spec/olels/control_006_line_spec.rb
|
235
|
+
- spec/olels/control_007_line_spec.rb
|
232
236
|
- spec/olels/data_line_spec.rb
|
233
237
|
- spec/olels/describe_workbench_spec.rb
|
234
238
|
- spec/olels/editor_spec.rb
|
@@ -308,6 +312,8 @@ test_files:
|
|
308
312
|
- spec/olefs/vendor_lookup_spec.rb
|
309
313
|
- spec/olels/access_info_line_spec.rb
|
310
314
|
- spec/olels/bib_editor_spec.rb
|
315
|
+
- spec/olels/control_006_line_spec.rb
|
316
|
+
- spec/olels/control_007_line_spec.rb
|
311
317
|
- spec/olels/data_line_spec.rb
|
312
318
|
- spec/olels/describe_workbench_spec.rb
|
313
319
|
- spec/olels/editor_spec.rb
|