ole-qa-framework 3.0.1 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +6 -0
- data/lib/ole_qa_framework/VERSION.rb +1 -1
- data/lib/olefs/objects/line_item.rb +5 -7
- data/lib/olefs/objects/receiving_line.rb +2 -1
- data/lib/olefs/subobjects/copies_line.rb +6 -9
- data/spec/olefs/copies_line_spec.rb +9 -8
- data/spec/olefs/line_item_spec.rb +2 -2
- data/spec/olefs/receiving_line_spec.rb +1 -0
- metadata +2 -2
data/CHANGELOG.md
CHANGED
@@ -69,10 +69,8 @@ module OLE_QA::Framework::OLEFS
|
|
69
69
|
element(:closed_discount_type_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[5]/td[4]")}
|
70
70
|
# Subtab Toggle Buttons # Matches all of type, then selects by index = line_id (i.e. if @line_num is 1, index is 0)
|
71
71
|
element(:accounting_lines_toggle) {b.input(:id => /tab-AccountingLines[0-9]+-imageToggle/, :index => line_id)}
|
72
|
-
|
73
|
-
|
74
|
-
#element(:copies_toggle) # There is no reliable way of knowing which index either should have without being state-aware.
|
75
|
-
# FIXME Move new_(X)_line elements to line item as their definitions are static in this context.
|
72
|
+
element(:notes_toggle) {b.input(:id => /tab-Notes[0-9]+-imageToggle/, :index => line_id)}
|
73
|
+
element(:copies_toggle) {b.input(:id => /tab-Copies[0-9]+-imageToggle/, :index => line_id)}
|
76
74
|
# New Accounting Line Elements
|
77
75
|
element(:account_number_field) {b.text_field(:id => "document.item[#{line_id}].newSourceLine.accountNumber")}
|
78
76
|
element(:chart_selector) {b.select_list(:id => "document.item[#{line_id}].newSourceLine.chartOfAccountsCode")}
|
@@ -89,11 +87,11 @@ module OLE_QA::Framework::OLEFS
|
|
89
87
|
element(:note_field) {b.text_field(:id => "document.item[#{line_id}].note")}
|
90
88
|
element(:add_note_button) {b.input(:name => "methodToCall.addNote.line#{line_id}")}
|
91
89
|
# New Copies Line Elements
|
92
|
-
|
93
|
-
element(:num_copies_field) {b.text_field(:id => "document.item[#{line_id}].itemCopies")}
|
94
|
-
element(:num_parts_field) {b.text_field(:id => "")}
|
90
|
+
element(:copies_line_copies_field) {b.text_field(:id => "document.item[#{line_id}].itemCopies")}
|
95
91
|
element(:location_copies_selector) {b.select_list(:id => "document.item[#{line_id}].locationCopies")}
|
96
92
|
element(:starting_copy_field) {b.text_field(:id => "document.item[#{line_id}].startingCopyNumber")}
|
93
|
+
element(:caption_field) {b.text_field(:id => "document.item[#{line_id}].caption")}
|
94
|
+
element(:volume_number_field) {b.text_field(:id => "document.item[#{line_id}].volumeNumber")}
|
97
95
|
element(:add_copy_button) {b.input(:name => "methodToCall.addCopy.line#{line_id}")}
|
98
96
|
end
|
99
97
|
end
|
@@ -26,6 +26,7 @@ module OLE_QA::Framework::OLEFS
|
|
26
26
|
# Set receiving line elements.
|
27
27
|
def set_elements
|
28
28
|
super
|
29
|
+
element(:receive_button) {b.button(:id => '')}
|
29
30
|
element(:description_field) {b.td(:xpath => "//table[@summary='Items Section']/tbody/tr/td[1][b[contains(text(),'#{@line_number}')]]/following-sibling::td[2]")}
|
30
31
|
element(:quantity_ordered_field) {b.td(:xpath => "//table[@summary='Items Section']/tbody/tr/td[1][b[contains(text(),'#{@line_number}')]]/following-sibling::td[4]")}
|
31
32
|
element(:parts_ordered_field) {b.td(:xpath => "//table[@summary='Items Section']/tbody/tr/td[1][b[contains(text(),'#{@line_number}')]]/following-sibling::td[5]")}
|
@@ -44,7 +45,7 @@ module OLE_QA::Framework::OLEFS
|
|
44
45
|
element(:exception_notes_toggle) {b.input(:xpath => "//tr[td/b[contains(text(),'#{@line_number}')]]/following-sibling::tr[2]/td[1]/table/tbody/tr[1]/th/div/input")}
|
45
46
|
element(:receipt_notes_toggle) {b.input(:xpath => "//tr[td/b[contains(text(),'#{@line_number}')]]/following-sibling::tr[3]/td[1]/table/tbody/tr[1]/th/div/input")}
|
46
47
|
element(:special_processing_instructions_toggle) {b.input(:xpath => "//tr[td/b[contains(text(),'#{@line_number}')]]/following-sibling::tr[4]/td[1]/table/tbody/tr[1]/th/div/input")}
|
47
|
-
|
48
|
+
element(:copies_line_toggle)
|
48
49
|
# New Receipt Note Elements
|
49
50
|
element(:receipt_note_type_selector) {b.select_list(:id => "document.item[#{line_id}].noteTypeId")}
|
50
51
|
element(:receipt_note_field) {b.text_field(:id => "document.item[#{line_id}].receiptNotes")}
|
@@ -19,16 +19,13 @@ module OLE_QA::Framework::OLEFS
|
|
19
19
|
def set_elements
|
20
20
|
super
|
21
21
|
element(:location_copies_selector) {b.select_list(:id => "document.item[#{@parent_line.line_id}].copies[#{line_id}].location_copies")}
|
22
|
+
element(:copies) {b.div(:id => "document.item[#{@parent_line.line_id}].copies[#{line_id}].itemCopies")}
|
23
|
+
element(:parts) {b.div(:id => "document.item[#{@parent_line.line_id}].copies[#{line_id}].parts")}
|
24
|
+
element(:starting_copy_field) {b.text_field(:id => "document.item[#{@parent_line.line_id}].copies[#{line_id}.startingCopyNumber")}
|
25
|
+
element(:caption_field) {b.text_field(:id => "document.item[#{@parent_line.line_id}].copies[#{line_id}.caption")}
|
26
|
+
element(:volume_number_field) {b.text_field(:id => "document.item[#{@parent_line.line_id}].copies[#{line_id}.volumeNumber")}
|
22
27
|
element(:delete_button) {b.input(:name => "methodToCall.deleteCopy.line#{@parent_line.line_id}:#{line_id}")}
|
23
|
-
|
24
|
-
# Use these for closed, uneditable fields as on a purchase order.
|
25
|
-
# FIXME Add open fields to match the new copies line fields on OLEFS Line Item
|
26
|
-
# FIXME Redefine closed fields
|
27
|
-
element(:closed_copies_field) {b.div(:xpath => "//tr[td[@class='subhead'][contains(text(),'Copies #{line_number}')]]/following-sibling::tr[1]/td[1]/div")}
|
28
|
-
element(:closed_location_copies_field) {b.div(:xpath => "//tr[td[@class='subhead'][contains(text(),'Copies #{line_number}')]]/following-sibling::tr[1]/td[2]/div")}
|
29
|
-
element(:closed_parts_field) {b.div(:xpath => "//tr[td[@class='subhead'][contains(text(),'Copies #{line_number}')]]/following-sibling::tr[1]/td[3]/div")}
|
30
|
-
element(:closed_part_enumeration_field) {b.div(:xpath => "//tr[td[@class='subhead'][contains(text(),'Copies #{line_number}')]]/following-sibling::tr[1]/td[4]/div")}
|
31
|
-
element(:closed_starting_copy_field) {b.div(:xpath => "//tr[td[@class='subhead'][contains(text(),'Copies #{line_number}')]]/following-sibling::tr[1]/td[5]/div")}
|
28
|
+
element(:receive_button) {b.input(:name => "methodToCall.receiveCopy.line#{@parent_line.line_id}:#{line_id}")}
|
32
29
|
end
|
33
30
|
end
|
34
31
|
end
|
@@ -43,13 +43,14 @@ describe 'A copies line' do
|
|
43
43
|
end
|
44
44
|
|
45
45
|
it 'should have copies line elements' do
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
46
|
+
elements = @copies_line.elements
|
47
|
+
elements.include?(:location_copies_selector).should be_true
|
48
|
+
elements.include?(:copies).should be_true
|
49
|
+
elements.include?(:parts).should be_true
|
50
|
+
elements.include?(:starting_copy_field).should be_true
|
51
|
+
elements.include?(:caption_field).should be_true
|
52
|
+
elements.include?(:volume_number_field).should be_true
|
53
|
+
elements.include?(:delete_button).should be_true
|
54
|
+
elements.include?(:receive_button).should be_true
|
54
55
|
end
|
55
56
|
end
|
@@ -113,8 +113,8 @@ describe 'An OLEFS line item' do
|
|
113
113
|
|
114
114
|
it 'should have new copies line elements' do
|
115
115
|
elements = @line_item.elements
|
116
|
-
elements.include?(:
|
117
|
-
elements.include?(:
|
116
|
+
elements.include?(:copies_line_copies_field).should be_true
|
117
|
+
elements.include?(:parts_field).should be_true
|
118
118
|
elements.include?(:location_copies_selector).should be_true
|
119
119
|
elements.include?(:starting_copy_field).should be_true
|
120
120
|
elements.include?(:add_copy_button).should be_true
|
@@ -42,6 +42,7 @@ describe 'An OLEFS Receiving Line object' do
|
|
42
42
|
|
43
43
|
it 'should have receiving line elements' do
|
44
44
|
elements = @rcv_line.elements
|
45
|
+
elements.include?(:receive_button).should be_true
|
45
46
|
elements.include?(:description_field).should be_true
|
46
47
|
elements.include?(:quantity_ordered_field).should be_true
|
47
48
|
elements.include?(:parts_ordered_field).should be_true
|
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: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|