ole-qa-framework 3.4.6 → 3.5.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 +8 -8
- data/CHANGELOG.md +10 -0
- data/lib/config/alt/dev_env.yml +1 -0
- data/lib/config/alt/test_env.yml +1 -0
- data/lib/config/default_options.yml +1 -0
- data/lib/docstore/common/results.rb +54 -0
- data/lib/docstore/pages/marc_results.rb +40 -0
- data/lib/docstore/pages/search.rb +74 -0
- data/lib/ole-qa-framework.rb +18 -5
- data/lib/ole_qa_framework/VERSION.rb +1 -1
- metadata +5 -3
- data/lib/docstore/docstore.rb +0 -13
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODlmZmJiYmUwYjkzMzg1MzAyODk1MzA5OTMzYjYwYzhhODJiNTE5Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTBlNTAzMzI4NTIzMTQwNjAxY2FjODgyOTBjNjVhOGMzNTdmNjdlZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWIwNGQ1NjFkYzQyNDE5OTM2MjU5OTZkYTk3ZmIxNjk2NDY0YTAyMmQwY2Qx
|
10
|
+
ZjE3NjZiNzAyZGUxNzFiMTAxZmI0ZjA1N2ZkMDljYTI4YjMyMmNlMGIwZDZh
|
11
|
+
NmIyZTRlNzYzOGQzOWI4MmQxZDc5NDQ1MjUwOWEzZjUzMDE3Nzc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzM2YTFkMDViYmU3OTQwMjg3N2M1NjhlY2E0MjcxM2VjZjU5YzNjMTVjNjUy
|
14
|
+
YjkzZmJhZWUwNjYwMzFlZDRhMDM3OTcxY2EwYmE3MGRhM2M1NGJmN2I1MjI5
|
15
|
+
MDI0YzVlOWUxN2NmMGJhM2ZkNTk3YWMzZGQ4OWM1MjY2YjMyNGY=
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
### v3.5.0 - 2013/12/09
|
2
|
+
|
3
|
+
* Docstore
|
4
|
+
* Added .docstore_url (.docstore) method to Session
|
5
|
+
* Added :docstore_url: to all config files
|
6
|
+
* Added Pages:
|
7
|
+
* Search
|
8
|
+
* Search Results
|
9
|
+
* Marc Search Results
|
10
|
+
|
1
11
|
### v3.4.6 - 2013/12/05
|
2
12
|
|
3
13
|
* OLEFS Invoice
|
data/lib/config/alt/dev_env.yml
CHANGED
data/lib/config/alt/test_env.yml
CHANGED
@@ -0,0 +1,54 @@
|
|
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::DocStore
|
16
|
+
# The base page object for a given set of DocStore search results.
|
17
|
+
# @note Elements in the search results will be vastly different depending on the
|
18
|
+
# type of search performed. If it matters, then be sure to use the subclass
|
19
|
+
# for the type of search results you are expecting.
|
20
|
+
class Results < OLE_QA::Framework::Page
|
21
|
+
def initialize(ole_session)
|
22
|
+
url = ole_session.docstore_url + 'discovery.do'
|
23
|
+
super(ole_session, url)
|
24
|
+
end
|
25
|
+
|
26
|
+
def set_elements
|
27
|
+
super
|
28
|
+
element(:revise_search_button) {b.button(:id => 'Back')}
|
29
|
+
element(:new_search_button) {b.button(:name => 'newSearch')}
|
30
|
+
element(:page_field) {b.text_field(:id => 'pageSpinner')}
|
31
|
+
element(:go_to_page_button) {b.button(:id => 'gotoPage')}
|
32
|
+
element(:page_list) {b.div(:id => 'pageList').b}
|
33
|
+
element(:no_results) {b.div(:id => 'demo2').b(:text => /^([Nn]o).*(results)/)}
|
34
|
+
end
|
35
|
+
|
36
|
+
def wait_for_elements
|
37
|
+
super
|
38
|
+
@wait_on << :revise_search_button
|
39
|
+
end
|
40
|
+
|
41
|
+
def set_functions
|
42
|
+
super
|
43
|
+
# Title bar for a given record, ordered by appearance on the screen (1-based).
|
44
|
+
# @note Not reliable as a source of textual information! If there is any highlighting
|
45
|
+
# on this element, the text will be broken up by a <span></span> wherever the
|
46
|
+
# highlighting is applied.
|
47
|
+
function(:title_bar) { |which| which -= 1 ; b.h3(:class => 'expand', :index => "#{which}").a(:title => 'Expand/Collapse')}
|
48
|
+
# Check if results are present and return true or false.
|
49
|
+
function(:any_results?) { no_results.present? ? false : true}
|
50
|
+
# Check if there is more than one page of results listed and return true or false.
|
51
|
+
function(:multiple_pages?) { page_field.present? }
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,40 @@
|
|
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::DocStore
|
16
|
+
# OLE Document Store Search Results for a Marc Bibliographic Record search.
|
17
|
+
class Marc_Results < Results
|
18
|
+
|
19
|
+
def set_elements
|
20
|
+
super
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
def set_functions
|
25
|
+
super
|
26
|
+
# Return a 'view' button by a given (1-based) numerical value.
|
27
|
+
function(:view_button) { |which = 1| which -= 1 ; b.button(:value => /View/, :index => which)}
|
28
|
+
# Return an 'edit' button by a given (1-based) numerical value.
|
29
|
+
function(:edit_button) { |which = 1| which -= 1 ; b.button(:name => 'Edit', :index => which)}
|
30
|
+
# Return an 'instance' link by a given (1-based) numerical value.
|
31
|
+
function(:instance_link) { |which = 1| which -= 1 ; b.b(:text => /Instance/, :index => which).parent}
|
32
|
+
# Return a field value (other than title) in the results.
|
33
|
+
# @note This just returns the object for the value. Interrogate that object with .present? to confirm
|
34
|
+
# its existence in the search results.
|
35
|
+
function(:value_in_results) { |which| b.dd(:text => /#{which}/) }
|
36
|
+
# Return an instance link containing the given text.
|
37
|
+
function(:instance_text) { |which| b.b(:text => /#{which}/).parent }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,74 @@
|
|
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::DocStore
|
16
|
+
# The search page for the OLE Document Store.
|
17
|
+
class Search < OLE_QA::Framework::Page
|
18
|
+
def initialize(ole_session)
|
19
|
+
url = ole_session.docstore_url + 'discovery.do?searchType=newSearch'
|
20
|
+
super(ole_session, url)
|
21
|
+
end
|
22
|
+
|
23
|
+
def set_elements
|
24
|
+
super
|
25
|
+
element(:category_selector) {b.select_list(:id => 'documentCategory')}
|
26
|
+
element(:type_selector) {b.select_list(:id => 'documentType')}
|
27
|
+
element(:format_selector) {b.select_list(:id => 'documentFormat')}
|
28
|
+
element(:sort_selector) {b.select_list(:id => 'sorting_order')}
|
29
|
+
element(:search_field_1) {b.text_field(:name => 'st')}
|
30
|
+
element(:search_field_2) {b.text_field(:name => 'st1')}
|
31
|
+
element(:search_field_3) {b.text_field(:name => 'st2')}
|
32
|
+
element(:search_field_4) {b.text_field(:name => 'st3')}
|
33
|
+
element(:search_field_5) {b.text_field(:name => 'st4')}
|
34
|
+
element(:scope_selector_1) {b.select_list(:name => 'searchScope')}
|
35
|
+
element(:scope_selector_2) {b.select_list(:name => 'searchScope1')}
|
36
|
+
element(:scope_selector_3) {b.select_list(:name => 'searchScope2')}
|
37
|
+
element(:scope_selector_4) {b.select_list(:name => 'searchScope3')}
|
38
|
+
element(:scope_selector_5) {b.select_list(:name => 'searchScope4')}
|
39
|
+
element(:field_selector_1) {b.select_list(:name => 'searchField')}
|
40
|
+
element(:field_selector_2) {b.select_list(:name => 'searchField1')}
|
41
|
+
element(:field_selector_3) {b.select_list(:name => 'searchField2')}
|
42
|
+
element(:field_selector_4) {b.select_list(:name => 'searchField3')}
|
43
|
+
element(:field_selector_5) {b.select_list(:name => 'searchField4')}
|
44
|
+
element(:search_button) {b.button(:class => 'searchButton')}
|
45
|
+
element(:clear_button) {b.button(:name => 'Clear')}
|
46
|
+
end
|
47
|
+
|
48
|
+
def wait_for_elements
|
49
|
+
super
|
50
|
+
@wait_on << :search_field_1
|
51
|
+
@wait_on << :search_field_5
|
52
|
+
@wait_on << :search_button
|
53
|
+
end
|
54
|
+
|
55
|
+
def set_functions
|
56
|
+
super
|
57
|
+
# The 'AND' join operator option for a given search line.
|
58
|
+
# @note Integer should be between 1 and 3, corresponding to the operator line.
|
59
|
+
# Each operator line affects the next search query line in sequence,
|
60
|
+
# (i.e., .and_option(1) affects search_field_2)
|
61
|
+
function(:and_option) { |which = 1| which -= 1 ; b.radio(:name => "operator#{which}", :index => 0)}
|
62
|
+
|
63
|
+
# The 'OR' join operator option for a given search line.
|
64
|
+
# Each operator line affects the next search query line in sequence,
|
65
|
+
# (i.e., .or_option(1) affects search_field_2)
|
66
|
+
function(:or_option) { |which = 1| which -= 1 ; b.radio(:name => "operator#{which}", :index => 1)}
|
67
|
+
|
68
|
+
# The 'NOT' join operator option for a given search line.
|
69
|
+
# Each operator line affects the next search query line in sequence,
|
70
|
+
# (i.e., .not_option(1) affects search_field_2)
|
71
|
+
function(:not_option) { |which = 1| which -= 1 ; b.radio(:name => "operator#{which}", :index => 2)}
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
data/lib/ole-qa-framework.rb
CHANGED
@@ -61,16 +61,18 @@ module OLE_QA
|
|
61
61
|
# If pages or elements need to be inherited by subclasses, put them in a (foo)/common/ directory.
|
62
62
|
# Subobject directories (foo)/subobjects/ should be loaded before object directories (foo)/objects/ for inheritance.
|
63
63
|
load_libs("/common/")
|
64
|
+
load_libs("/docstore/common/")
|
64
65
|
load_libs("/olefs/common/")
|
65
66
|
load_libs("/olels/common/")
|
66
67
|
load_libs("/olefs/subobjects/")
|
67
68
|
load_libs("/olels/subobjects/")
|
68
69
|
load_libs("/olefs/objects/")
|
69
70
|
load_libs("/olels/objects/")
|
71
|
+
load_libs("/docstore/pages/")
|
70
72
|
load_libs("/olefs/pages/")
|
71
73
|
load_libs("/olels/pages/")
|
72
74
|
|
73
|
-
|
75
|
+
|
74
76
|
|
75
77
|
# Initialize wait variables to 0 for now. They will be set programatically in {OLE_QA::Framework::Session}.
|
76
78
|
@explicit_wait = 0
|
@@ -91,13 +93,18 @@ module OLE_QA
|
|
91
93
|
class Session
|
92
94
|
|
93
95
|
# OLE Installation Base URL
|
94
|
-
# (e.g. http://ole.your-site.edu)
|
96
|
+
# (e.g. http://ole.your-site.edu/)
|
95
97
|
attr_reader :url
|
96
98
|
# @deprecated Included for backwards compatibility. Unnecessary after 1.0.0 unification (milestone m2-r13245).
|
97
99
|
alias :fs_url :url
|
98
100
|
alias :base_url :url
|
99
101
|
alias :ls_url :url
|
100
102
|
|
103
|
+
# OLE Document Store Installation Base URL
|
104
|
+
# (e.g. http://docstore.ole.your-site.edu/)
|
105
|
+
attr_reader :docstore_url
|
106
|
+
alias :docstore :docstore_url
|
107
|
+
|
101
108
|
# Wait period (in seconds) used by OLE QAF Web Element functions
|
102
109
|
attr_accessor :explicit_wait
|
103
110
|
|
@@ -107,6 +114,8 @@ module OLE_QA
|
|
107
114
|
# Options hash keys:
|
108
115
|
# :url => "http://tst.ole.kuali.org/"
|
109
116
|
# (URL for OLE Installation)
|
117
|
+
# :docstore_url => 'http://tst.docstore.ole.kuali.org/'
|
118
|
+
# (URL for OLE DocStore Installation)
|
110
119
|
# :headless => true/false
|
111
120
|
# (Use Headless gem to handle XVFB session)
|
112
121
|
# :implicit_wait => NN
|
@@ -133,10 +142,14 @@ module OLE_QA
|
|
133
142
|
@headless.start
|
134
143
|
end
|
135
144
|
|
145
|
+
# Set trailing slash on URLs for consistency if not set.
|
146
|
+
add_slash = ->(which) { which =~ /\/$/ ? which : which + '/' }
|
147
|
+
|
136
148
|
# Globalize options to accessors
|
137
|
-
@url
|
138
|
-
@
|
139
|
-
@
|
149
|
+
@url = add_slash.call(@options[:url])
|
150
|
+
@docstore_url = add_slash.call(@options[:docstore_url])
|
151
|
+
@explicit_wait = @options[:explicit_wait]
|
152
|
+
@doc_wait = @options[:doc_wait]
|
140
153
|
|
141
154
|
# Pass explicit_wait to a module accessor for use with OLE_QA::Tools
|
142
155
|
OLE_QA::Framework.instance_variable_set(:@explicit_wait,@options[:explicit_wait])
|
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.5.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: 2013-12-
|
11
|
+
date: 2013-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -121,7 +121,9 @@ files:
|
|
121
121
|
- lib/data_factory/account_factory.rb
|
122
122
|
- lib/data_factory/bib_factory.rb
|
123
123
|
- lib/data_factory/string_factory.rb
|
124
|
-
- lib/docstore/
|
124
|
+
- lib/docstore/common/results.rb
|
125
|
+
- lib/docstore/pages/marc_results.rb
|
126
|
+
- lib/docstore/pages/search.rb
|
125
127
|
- lib/module/qa_data_helpers.rb
|
126
128
|
- lib/module/qa_helpers.rb
|
127
129
|
- lib/module/qa_page_helpers.rb
|
data/lib/docstore/docstore.rb
DELETED
@@ -1,13 +0,0 @@
|
|
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.
|