ole-qa-framework 3.12.5 → 3.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/ole_qa_framework/COMPATIBILITY.rb +1 -1
- data/lib/ole_qa_framework/VERSION.rb +1 -1
- data/lib/olels/objects/workbench_line.rb +48 -0
- data/lib/olels/pages/describe_workbench.rb +27 -71
- data/lib/olels/pages/old_describe_workbench.rb +102 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57816afd7f068013dcab475670e17d3319af7413
|
4
|
+
data.tar.gz: 2bc84c5482e52d3da6cdef797c91c008cdd6d324
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf34baf134f4aaa6acd51e750781ed7019b57e89019fd26210e04907680248a07a70017950cc5ebb8f86e445b9b3194b88fb33ae012bd5a11db4da04452197e4
|
7
|
+
data.tar.gz: a8058831fe968bc0105bdedcd2ec8cd478d6bbf7aac985817d323ed6fa8288cc2140a95f14c6a85738aac8dd1e078c8456652000bf733f4f04d7c51fde0699b5
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,48 @@
|
|
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
|
+
# A search line on the OLE Library System Describe Workbench page.
|
17
|
+
class Workbench_Line < OLE_QA::Framework::Line_Object
|
18
|
+
def set_elements
|
19
|
+
super
|
20
|
+
element(:search_field) {(line_id == 0) ?
|
21
|
+
id_str = 'SearchConditions_SearchText_id_add_control' :
|
22
|
+
id_str = "SearchConditions_SearchText_id_line#{line_id - 1}_control"
|
23
|
+
b.text_field(:id => id_str)}
|
24
|
+
element(:search_scope_selector) {(line_id == 0) ?
|
25
|
+
id_str = 'SearchConditions_Operator_id_add_control' :
|
26
|
+
id_str = "SearchConditions_Operator_id_line#{line_id - 1}_control"
|
27
|
+
b.select_list(:id => id_str)}
|
28
|
+
element(:field_selector) {(line_id == 0) ?
|
29
|
+
id_str = 'SearchConditions_DocField_id_add_control' :
|
30
|
+
id_str = "SearchConditions_DocField_id_line#{line_id - 1}_control"
|
31
|
+
b.select_list(:id => id_str)}
|
32
|
+
element(:join_and) {(line_id == 0) ?
|
33
|
+
id_str = 'SearchConditions_SearchScope_id_add_control_0' :
|
34
|
+
id_str = "SearchConditions_SearchScope_id_line#{line_id - 1}_control_0"
|
35
|
+
b.radio(:id => id_str)}
|
36
|
+
element(:join_or) {(line_id == 0) ?
|
37
|
+
id_str = 'SearchConditions_SearchScope_id_add_control_1' :
|
38
|
+
id_str = "SearchConditions_SearchScope_id_line#{line_id - 1}_control_1"
|
39
|
+
b.radio(:id => id_str)}
|
40
|
+
element(:join_not) {(line_id == 0) ?
|
41
|
+
id_str = 'SearchConditions_SearchScope_id_add_control_2' :
|
42
|
+
id_str = "SearchConditions_SearchScope_id_line#{line_id - 1}_control_2"
|
43
|
+
b.radio(:id => id_str)}
|
44
|
+
element(:add_button) {b.button(:id => 'SearchConditionsSection_add')}
|
45
|
+
element(:delete_button) {b.button(:id => "SearchConditionsSection_del_line#{line_id - 1}")}
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -13,90 +13,46 @@
|
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
15
|
module OLE_QA::Framework::OLELS
|
16
|
-
# The OLE Library System Describe Workbench
|
16
|
+
# The OLE Library System Describe Workbench screen (implemented in 1.5.0-M2-r18095, 2014-03-20)
|
17
17
|
class Describe_Workbench < Lookup
|
18
|
-
# Set URL
|
19
18
|
def initialize(ole_session)
|
20
|
-
url = ole_session.url + 'portal.do?channelTitle=Describe
|
21
|
-
url += ole_session.url + 'ole-kr-krad/
|
22
|
-
super(ole_session,
|
19
|
+
url = ole_session.url + 'portal.do?channelTitle=Describe%20Workbench&channelUrl='
|
20
|
+
url += ole_session.url + 'ole-kr-krad/olesearchcontroller?viewId=OLESearchView&methodToCall=start'
|
21
|
+
super(ole_session,url)
|
23
22
|
end
|
24
23
|
|
25
|
-
# Set OLELS Describe Workbench page elements.
|
26
24
|
def set_elements
|
27
25
|
super
|
28
|
-
|
29
|
-
element(:
|
30
|
-
element(:
|
31
|
-
element(:
|
32
|
-
element(:
|
33
|
-
element(:
|
34
|
-
element(:
|
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')}
|
38
|
-
# Search Fields
|
39
|
-
element(:search_field_1) {b.text_field(:id => "searchText_id_line0_control")}
|
40
|
-
element(:search_which_selector_1) {b.select_list(:id => "operator_id_line0_control")}
|
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')}
|
26
|
+
element(:document_type_selector) {b.select_list(:id => 'DocumentAndSearchSelectionType_DocType_control')}
|
27
|
+
element(:search_type_selector) {b.select_list(:id => 'DocumentAndSearchSelectionType_SearchType_control')}
|
28
|
+
element(:search_button) {b.button(:id => 'SearchButton')}
|
29
|
+
element(:clear_button) {b.button(:id => 'ClearButton')}
|
30
|
+
element(:new_search_button) {b.button(:id => 'StartSearchButton')}
|
31
|
+
element(:next) {b.a(:text => /[Nn]ext/)}
|
32
|
+
element(:previous) {b.a(:text => /[Pp]revious/)}
|
54
33
|
end
|
55
34
|
|
56
35
|
def wait_for_elements
|
57
36
|
super
|
58
|
-
@wait_on << :search_button
|
37
|
+
@wait_on << :document_type_selector << :search_button
|
59
38
|
end
|
60
39
|
|
61
40
|
def set_functions
|
62
41
|
super
|
63
|
-
# Check
|
64
|
-
|
65
|
-
function(:
|
66
|
-
#
|
67
|
-
function(:
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
#
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
# Usage:
|
78
|
-
# workbench.view_by_text.click
|
79
|
-
# - Searches both link text (for Local ID element) and regular text in span (for all other fields).
|
80
|
-
# - Returns nil if element not found.
|
81
|
-
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}
|
82
|
-
# Return the 'view' link for the results line containing the given text.
|
83
|
-
# Usage:
|
84
|
-
# workbench.view_by_text.click
|
85
|
-
# - Searches both link text (for Local ID element) and regular text in span (for all other fields).
|
86
|
-
# - Returns nil if element not found.
|
87
|
-
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}
|
88
|
-
# Return the 'overlay' link for the results line containing the given text.
|
89
|
-
# Usage:
|
90
|
-
# workbench.overlay_by_text.click
|
91
|
-
# - Searches both link text (for Local ID element) and regular text in span (for all other fields).
|
92
|
-
# - Returns nil if element not found.
|
93
|
-
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}
|
94
|
-
# Return the 'create instance' link for the results line containing the given text.
|
95
|
-
# Usage:
|
96
|
-
# workbench.create_instance_by_text.click
|
97
|
-
# - Searches both link text (for Local ID element) and regular text in span (for all other fields).
|
98
|
-
# - Returns nil if element not found.
|
99
|
-
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}
|
42
|
+
# Check if text is present in results. (Will not search titles.)
|
43
|
+
function(:text_in_results) {|which| b.span(:class => 'uif-readOnlyContent', :text => /#{which}/)}
|
44
|
+
function(:text_in_results?) {|which| text_in_results(which).present?}
|
45
|
+
# Check if title is present in results.
|
46
|
+
function(:title_in_results) {|which| b.a(:class => 'uif-link',:text => /#{which}/)}
|
47
|
+
function(:title_in_results?) {|which| title_in_results(which).present?}
|
48
|
+
# Return the select checkbox for a line in the search results containing the given text. (Will not work with titles.)
|
49
|
+
function(:select_by_text) {|which| text_in_results(which).parent.parent.parent.td(:index => 0).div(:class => 'uif-inputField').checkbox(:class => 'uif-checkboxControl')}
|
50
|
+
# Return the select checkbox for a line in the search results containing the given text.
|
51
|
+
function(:select_by_title) {|which| title_in_results(which).parent.parent.parent.td(:index => 0).div(:class => 'uif-inputField').checkbox(:class => 'uif-checkboxControl')}
|
52
|
+
end
|
53
|
+
|
54
|
+
def set_lines
|
55
|
+
set_line(:search_line, OLE_QA::Framework::OLELS::Workbench_Line)
|
100
56
|
end
|
101
57
|
end
|
102
|
-
end
|
58
|
+
end
|
@@ -0,0 +1,102 @@
|
|
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
|
+
# The OLE Library System Describe Workbench Screen (Deprecated as of 1.5.0-M2-r18095, 2014-03-20)
|
17
|
+
class Old_Describe_Workbench < Lookup
|
18
|
+
# Set URL
|
19
|
+
def initialize(ole_session)
|
20
|
+
url = ole_session.url + 'portal.do?channelTitle=Describe Workbench&channelUrl='
|
21
|
+
url += ole_session.url + 'ole-kr-krad/describeworkbenchcontroller?viewId=DescribeWorkBenchView&methodToCall=start'
|
22
|
+
super(ole_session, url)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Set OLELS Describe Workbench page elements.
|
26
|
+
def set_elements
|
27
|
+
super
|
28
|
+
# Search Control Elements
|
29
|
+
element(:search_button) {b.button(:id => "search_button")}
|
30
|
+
element(:clear_button) {b.button(:id => "clear_button")}
|
31
|
+
element(:doc_type_bib) {b.radio(:id => 'SearchPanel-docType-Section_control_0')}
|
32
|
+
element(:doc_type_holdings) {b.radio(:id => 'SearchPanel-docType-Section_control_1')}
|
33
|
+
element(:doc_type_item) {b.radio(:id => 'SearchPanel-docType-Section_control_2')}
|
34
|
+
element(:doc_type_e_holdings) {b.radio(:id => 'SearchPanel-docType-Section_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')}
|
38
|
+
# Search Fields
|
39
|
+
element(:search_field_1) {b.text_field(:id => "searchText_id_line0_control")}
|
40
|
+
element(:search_which_selector_1) {b.select_list(:id => "operator_id_line0_control")}
|
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')}
|
54
|
+
end
|
55
|
+
|
56
|
+
def wait_for_elements
|
57
|
+
super
|
58
|
+
@wait_on << :search_button
|
59
|
+
end
|
60
|
+
|
61
|
+
def set_functions
|
62
|
+
super
|
63
|
+
# Check whether the given text exists within the search results table.
|
64
|
+
# - Returns true or false based on whether the given string was found.
|
65
|
+
function(:result_present?) {|str| b.td(:xpath => "//table/tbody/tr/td[div/*[contains(text(),\"#{str}\")]]").present?}
|
66
|
+
# Return the TD element containing the given text, if it exists.
|
67
|
+
function(:text_in_results) {|text| b.td(:xpath => "//table/tbody/tr/td[div/*[contains(text(),\"#{text}\")]]")}
|
68
|
+
# Return true or false based on whether the given text exists in the search results.
|
69
|
+
function(:text_in_results?) {|text| text_in_results(text).present?}
|
70
|
+
# Return the checkbox for the results line containing the given text.
|
71
|
+
# Usage:
|
72
|
+
# workbench.select_by_text("Foo").set(true|false)
|
73
|
+
# - Searches both link text (for Local ID element) and regular text in span (for all other fields).
|
74
|
+
# - Returns nil if element not found.
|
75
|
+
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}
|
76
|
+
# Return the 'view' link for the results line containing the given text.
|
77
|
+
# Usage:
|
78
|
+
# workbench.view_by_text.click
|
79
|
+
# - Searches both link text (for Local ID element) and regular text in span (for all other fields).
|
80
|
+
# - Returns nil if element not found.
|
81
|
+
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}
|
82
|
+
# Return the 'view' link for the results line containing the given text.
|
83
|
+
# Usage:
|
84
|
+
# workbench.view_by_text.click
|
85
|
+
# - Searches both link text (for Local ID element) and regular text in span (for all other fields).
|
86
|
+
# - Returns nil if element not found.
|
87
|
+
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}
|
88
|
+
# Return the 'overlay' link for the results line containing the given text.
|
89
|
+
# Usage:
|
90
|
+
# workbench.overlay_by_text.click
|
91
|
+
# - Searches both link text (for Local ID element) and regular text in span (for all other fields).
|
92
|
+
# - Returns nil if element not found.
|
93
|
+
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}
|
94
|
+
# Return the 'create instance' link for the results line containing the given text.
|
95
|
+
# Usage:
|
96
|
+
# workbench.create_instance_by_text.click
|
97
|
+
# - Searches both link text (for Local ID element) and regular text in span (for all other fields).
|
98
|
+
# - Returns nil if element not found.
|
99
|
+
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}
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ole-qa-framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jain Waldrip
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -182,6 +182,7 @@ files:
|
|
182
182
|
- lib/olels/objects/patron_address_line.rb
|
183
183
|
- lib/olels/objects/patron_email_line.rb
|
184
184
|
- lib/olels/objects/patron_phone_line.rb
|
185
|
+
- lib/olels/objects/workbench_line.rb
|
185
186
|
- lib/olels/pages/batch_export_profile.rb
|
186
187
|
- lib/olels/pages/batch_import_profile.rb
|
187
188
|
- lib/olels/pages/batch_job_details.rb
|
@@ -199,6 +200,7 @@ files:
|
|
199
200
|
- lib/olels/pages/location_level_lookup.rb
|
200
201
|
- lib/olels/pages/location_lookup.rb
|
201
202
|
- lib/olels/pages/main_menu.rb
|
203
|
+
- lib/olels/pages/old_describe_workbench.rb
|
202
204
|
- lib/olels/pages/patron.rb
|
203
205
|
- lib/olels/pages/patron_lookup.rb
|
204
206
|
- lib/olels/pages/request.rb
|