ole-qa-framework 2.5.2 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +16 -0
- data/lib/ole_qa_framework/VERSION.rb +1 -1
- data/lib/olefs/objects/new_line_item.rb +3 -0
- data/lib/olefs/pages/requisition.rb +2 -0
- data/lib/olels/pages/describe_workbench.rb +55 -2
- data/spec/olefs/line_item_spec.rb +57 -54
- data/spec/olefs/requisition_spec.rb +2 -0
- data/spec/olels/describe_workbench_spec.rb +27 -0
- metadata +2 -2
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
### v2.6.0 - 2013/08/23
|
2
|
+
|
3
|
+
* Finished Describe Workbench Screen
|
4
|
+
* used for describe workbench tests
|
5
|
+
* used for requisition existing bib record search tests
|
6
|
+
|
7
|
+
### v2.5.3 - 2013/08/22
|
8
|
+
|
9
|
+
* Requisition Interface Updated
|
10
|
+
* added vendor alias search elements
|
11
|
+
* added new line item definitions for:
|
12
|
+
* new bib option
|
13
|
+
* new bib button
|
14
|
+
* existing bib option
|
15
|
+
* existing bib button
|
16
|
+
|
1
17
|
### v2.5.2 - 2013/08/15
|
2
18
|
|
3
19
|
* Editor Fixes
|
@@ -25,6 +25,9 @@ module OLE_QA::Framework::OLEFS
|
|
25
25
|
# one new line item on an OLEFS PURAP E-Document.
|
26
26
|
def set_elements
|
27
27
|
super
|
28
|
+
element(:new_bib_option) {b.radio(:name => 'AttachBib', :index => 0)}
|
29
|
+
element(:existing_bib_option) {b.radio(:name => 'AttachBib', :index => 1)}
|
30
|
+
element(:existing_bib_button) {b.input(:id => 'bibSelectExistingItemButton')}
|
28
31
|
element(:new_bib_button) {b.input(:id => "bibCreateCurrentItemButton")}
|
29
32
|
element(:item_type_selector) {b.select_list(:id => "newPurchasingItemLine.itemTypeDescription")}
|
30
33
|
element(:copies_field) {b.text_field(:id => "newPurchasingItemLine.oleItemQuantity")}
|
@@ -43,6 +43,8 @@ module OLE_QA::Framework::OLEFS
|
|
43
43
|
element(:delivery_phone_number_field) {b.text_field(:id => "document.deliveryToPhoneNumber")}
|
44
44
|
# Vendor Tab
|
45
45
|
element(:vendor_name_field) {b.text_field(:id => "document.vendorName")}
|
46
|
+
element(:vendor_alias_field) {b.text_field(:id => 'document.vendorAliasName')}
|
47
|
+
element(:select_vendor_button) {b.input(:alt => 'select vendor')}
|
46
48
|
element(:vendor_search_icon) {b.input(:xpath => "//input[@id='document.vendorName']/following-sibling::input[1]")}
|
47
49
|
# Titles Tab
|
48
50
|
element(:grand_total_field) {b.b(:xpath => "//div[@id='tab-Titles-div']/descendant::th[div[contains(text(),'Grand Total')]]/following-sibling::td/div/b")}
|
@@ -25,18 +25,71 @@ module OLE_QA::Framework::OLELS
|
|
25
25
|
# Set OLELS Describe Workbench page elements.
|
26
26
|
def set_elements
|
27
27
|
super
|
28
|
-
#
|
28
|
+
# Search Control Elements
|
29
29
|
element(:search_button) {b.button(:id => "search_button")}
|
30
30
|
element(:clear_button) {b.button(:id => "clear_button")}
|
31
|
+
element(:doc_type_bib) {b.radio(:id => 'SearchPanel-docTypeSection_control_0')}
|
32
|
+
element(:doc_type_holdings) {b.radio(:id => 'SearchPanel-docTypeSection_control_1')}
|
33
|
+
element(:doc_type_item) {b.radio(:id => 'SearchPanel-docTypeSection_control_2')}
|
34
|
+
element(:doc_type_e_holdings) {b.radio(:id => 'SearchPanel-docTypeSection_control_3')}
|
35
|
+
element(:link_to_order_button) {b.button(:id => 'submit_button')}
|
36
|
+
element(:export_to_xml_button) {b.button(:id => 'export_button1')}
|
37
|
+
element(:close_button) {b.button(:id => 'cancel_button')}
|
31
38
|
# Search Fields
|
32
|
-
element(:search_field_1) {b.
|
39
|
+
element(:search_field_1) {b.text_field(:id => "searchText_id_line0_control")}
|
33
40
|
element(:search_which_selector_1) {b.select_list(:id => "operator_id_line0_control")}
|
34
41
|
element(:search_field_selector_1) {b.select_list(:id => "docField_id_line0_control")}
|
42
|
+
element(:search_scope_1_and) {b.radio(:id => 'searchScope_id_line0_control_0')}
|
43
|
+
element(:search_scope_1_or) {b.radio(:id => 'searchScope_id_line0_control_1')}
|
44
|
+
element(:search_scope_1_not) {b.radio(:id => 'searchScope_id_line0_control_2')}
|
45
|
+
element(:search_field_2) {b.text_field(:id => 'searchText_id_line1_control')}
|
46
|
+
element(:search_which_selector_2) {b.select_list(:id => 'operator_id_line1_control')}
|
47
|
+
element(:search_field_selector_2) {b.select_list(:id => 'docField_id_line1_control')}
|
48
|
+
element(:search_scope_2_and) {b.radio(:id => 'searchScope_id_line1_control_0')}
|
49
|
+
element(:search_scope_2_or) {b.radio(:id => 'searchScope_id_line1_control_1')}
|
50
|
+
element(:search_scope_2_not) {b.radio(:id => 'searchScope_id_line1_control_2')}
|
51
|
+
# Search Results Elements
|
52
|
+
element(:next_link) {b.a(:text => 'Next')}
|
53
|
+
element(:previous_link) {b.a(:text => 'Previous')}
|
35
54
|
end
|
36
55
|
|
37
56
|
def wait_for_elements
|
38
57
|
super
|
39
58
|
@wait_on << :search_button
|
40
59
|
end
|
60
|
+
|
61
|
+
def set_functions
|
62
|
+
super
|
63
|
+
# Return the checkbox for the results line containing the given text.
|
64
|
+
# Usage:
|
65
|
+
# workbench.select_by_text("Foo").set(true|false)
|
66
|
+
# - Searches both link text (for Local ID element) and regular text in span (for all other fields).
|
67
|
+
# - Returns nil if element not found.
|
68
|
+
function(:select_by_text) {|str| element = b.checkbox(:xpath => "//table/tbody/tr[td[div/*[contains(text(),\"#{str}\")]]]/td[1]/div/input[@type='checkbox']") ; if element.present? then element else nil end}
|
69
|
+
# Return the 'view' link for the results line containing the given text.
|
70
|
+
# Usage:
|
71
|
+
# workbench.view_by_text.click
|
72
|
+
# - Searches both link text (for Local ID element) and regular text in span (for all other fields).
|
73
|
+
# - Returns nil if element not found.
|
74
|
+
function(:view_by_text) {|str| element = b.a(:xpath => "//table/tbody/tr[td[div/*[contains(text(),\"#{str}\")]]]/td/div/fieldset/div/div/a[contains(text(),'View')]") ; if element.present? then element else nil end}
|
75
|
+
# Return the 'view' link for the results line containing the given text.
|
76
|
+
# Usage:
|
77
|
+
# workbench.view_by_text.click
|
78
|
+
# - Searches both link text (for Local ID element) and regular text in span (for all other fields).
|
79
|
+
# - Returns nil if element not found.
|
80
|
+
function(:edit_by_text) {|str| element = b.a(:xpath => "//table/tbody/tr[td[div/*[contains(text(),\"#{str}\")]]]/td/div/fieldset/div/div/a[contains(text(),'Edit')]") ; if element.present? then element else nil end}
|
81
|
+
# Return the 'overlay' link for the results line containing the given text.
|
82
|
+
# Usage:
|
83
|
+
# workbench.overlay_by_text.click
|
84
|
+
# - Searches both link text (for Local ID element) and regular text in span (for all other fields).
|
85
|
+
# - Returns nil if element not found.
|
86
|
+
function(:overlay_by_text) {|str| element = b.a(:xpath => "//table/tbody/tr[td[div/*[contains(text(),\"#{str}\")]]]/td/div/fieldset/div/div/a[contains(text(),'OverLay')]") ; if element.present? then element else nil end}
|
87
|
+
# Return the 'create instance' link for the results line containing the given text.
|
88
|
+
# Usage:
|
89
|
+
# workbench.create_instance_by_text.click
|
90
|
+
# - Searches both link text (for Local ID element) and regular text in span (for all other fields).
|
91
|
+
# - Returns nil if element not found.
|
92
|
+
function(:create_instance_by_text) {|str| element = b.a(:xpath => "//table/tbody/tr[td[div/*[contains(text(),\"#{str}\")]]]/td/div/fieldset/div/div/a[contains(text(),'Create Instance')]") ; if element.present? then element else nil end}
|
93
|
+
end
|
41
94
|
end
|
42
95
|
end
|
@@ -50,47 +50,47 @@ describe 'An OLEFS line item' do
|
|
50
50
|
end
|
51
51
|
|
52
52
|
it 'should have line item elements' do
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
53
|
+
elements = @line_item.elements
|
54
|
+
elements.should include(:copies_field)
|
55
|
+
elements.should include(:parts_field)
|
56
|
+
elements.should include(:list_price_field)
|
57
|
+
elements.should include(:discount_field)
|
58
|
+
elements.should include(:item_price_source_selector)
|
59
|
+
elements.should include(:request_source_selector)
|
60
|
+
elements.should include(:item_type_selector)
|
61
|
+
elements.should include(:format_selector)
|
62
|
+
elements.should include(:category_selector)
|
63
|
+
elements.should include(:discount_type_selector)
|
64
|
+
elements.should include(:delete_button)
|
65
|
+
elements.should include(:route_to_requestor_checkbox)
|
66
|
+
elements.should include(:public_view_checkbox)
|
67
|
+
elements.should include(:accounting_lines_toggle)
|
68
|
+
elements.should include(:description_field)
|
69
|
+
elements.should include(:item_type_field)
|
70
|
+
elements.should include(:extended_cost_field)
|
71
|
+
elements.should include(:receipt_status_field)
|
72
|
+
elements.should include(:closed_description_field)
|
73
|
+
elements.should include(:closed_item_type_field)
|
74
|
+
elements.should include(:closed_extended_cost_field)
|
75
|
+
elements.should include(:closed_list_price_field)
|
76
|
+
elements.should include(:closed_copies_field)
|
77
|
+
elements.should include(:closed_parts_field)
|
78
|
+
elements.should include(:closed_receipt_status_field)
|
79
|
+
elements.should include(:closed_copies_received_field)
|
80
|
+
elements.should include(:closed_parts_received_field)
|
81
|
+
elements.should include(:closed_item_price_source_field)
|
82
|
+
elements.should include(:closed_request_source_field)
|
83
|
+
elements.should include(:closed_format_field)
|
84
|
+
elements.should include(:closed_category_field)
|
85
|
+
elements.should include(:closed_vendor_item_id_field)
|
86
|
+
elements.should include(:closed_requestor_field)
|
87
|
+
elements.should include(:closed_route_to_requestor_field)
|
88
|
+
elements.should include(:closed_unit_cost_field)
|
89
|
+
elements.should include(:closed_discount_field)
|
90
|
+
elements.should include(:closed_discount_type_field)
|
91
91
|
#TODO add the methods below when OLE-4329 is fixed.
|
92
|
-
#
|
93
|
-
# methods_array.include(:copies_toggle)
|
92
|
+
# elements.should include(:notes_toggle)
|
93
|
+
# methods_array.include(:copies_toggle)
|
94
94
|
end
|
95
95
|
|
96
96
|
it 'should have subline objects' do
|
@@ -102,20 +102,23 @@ describe 'An OLEFS line item' do
|
|
102
102
|
|
103
103
|
it 'should have new line item elements' do
|
104
104
|
elements = @new_line_item.methods
|
105
|
-
elements.include
|
106
|
-
elements.include
|
107
|
-
elements.include
|
108
|
-
elements.include
|
109
|
-
elements.include
|
110
|
-
elements.include
|
111
|
-
elements.include
|
112
|
-
elements.include
|
113
|
-
elements.include
|
114
|
-
elements.include
|
115
|
-
elements.include
|
116
|
-
elements.include
|
117
|
-
elements.include
|
118
|
-
elements.include
|
105
|
+
elements.should include(:new_bib_option)
|
106
|
+
elements.should include(:existing_bib_option)
|
107
|
+
elements.should include(:bib_search_button)
|
108
|
+
elements.should include(:new_bib_button)
|
109
|
+
elements.should include(:item_type_selector)
|
110
|
+
elements.should include(:copies_field)
|
111
|
+
elements.should include(:parts_field)
|
112
|
+
elements.should include(:list_price_field)
|
113
|
+
elements.should include(:public_view_checkbox)
|
114
|
+
elements.should include(:item_price_source_selector)
|
115
|
+
elements.should include(:request_source_selector)
|
116
|
+
elements.should include(:format_selector)
|
117
|
+
elements.should include(:category_selector)
|
118
|
+
elements.should include(:route_to_requestor_checkbox)
|
119
|
+
elements.should include(:discount_field)
|
120
|
+
elements.should include(:discount_type_selector)
|
121
|
+
elements.should include(:add_button)
|
119
122
|
end
|
120
123
|
|
121
124
|
it 'should create an accounting line' do
|
@@ -57,6 +57,8 @@ describe 'A purap_requisition document' do
|
|
57
57
|
elements.include?(:delivery_phone_number_field).should be_true
|
58
58
|
elements.include?(:vendor_tab_toggle).should be_true
|
59
59
|
elements.include?(:vendor_name_field).should be_true
|
60
|
+
elements.should include(:vendor_alias_field)
|
61
|
+
elements.should include(:select_vendor_button)
|
60
62
|
elements.include?(:closed_vendor_name_field).should be_true
|
61
63
|
elements.include?(:vendor_search_icon).should be_true
|
62
64
|
elements.include?(:grand_total_field).should be_true
|
@@ -44,5 +44,32 @@ describe 'An OLELS Describe Workbench page' do
|
|
44
44
|
elements.include?(:search_field_1).should be_true
|
45
45
|
elements.include?(:search_which_selector_1).should be_true
|
46
46
|
elements.include?(:search_field_selector_1).should be_true
|
47
|
+
elements.should include(:search_scope_1_and)
|
48
|
+
elements.should include(:search_scope_1_or)
|
49
|
+
elements.should include(:search_scope_1_not)
|
50
|
+
elements.should include(:search_field_2)
|
51
|
+
elements.should include(:search_which_selector_2)
|
52
|
+
elements.should include(:search_field_selector_2)
|
53
|
+
elements.should include(:search_scope_2_and)
|
54
|
+
elements.should include(:search_scope_2_or)
|
55
|
+
elements.should include(:search_scope_2_not)
|
56
|
+
elements.should include(:doc_type_bib)
|
57
|
+
elements.should include(:doc_type_holdings)
|
58
|
+
elements.should include(:doc_type_item)
|
59
|
+
elements.should include(:doc_type_e_holdings)
|
60
|
+
elements.should include(:export_to_xml_button)
|
61
|
+
elements.should include(:link_to_order_button)
|
62
|
+
elements.should include(:close_button)
|
63
|
+
elements.should include(:previous_link)
|
64
|
+
elements.should include(:next_link)
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'should have describe workbench functions' do
|
68
|
+
functions = @workbench.functions
|
69
|
+
functions.should include(:select_by_text)
|
70
|
+
functions.should include(:view_by_text)
|
71
|
+
functions.should include(:edit_by_text)
|
72
|
+
functions.should include(:overlay_by_text)
|
73
|
+
functions.should include(:create_instance_by_text)
|
47
74
|
end
|
48
75
|
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.
|
4
|
+
version: 2.6.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-08-
|
12
|
+
date: 2013-08-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|