ole-qa-framework 2.2.0 → 2.3.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.
- data/CHANGELOG.md +16 -0
- data/lib/config/default_options.yml +4 -4
- data/lib/ole_qa_framework/VERSION.rb +1 -1
- data/lib/olefs/common/lookup.rb +7 -0
- data/lib/olefs/pages/load_report.rb +67 -0
- data/lib/olefs/pages/load_summary_lookup.rb +42 -0
- data/spec/olefs/load_report_spec.rb +52 -0
- data/spec/olefs/load_summary_lookup_spec.rb +49 -0
- data/spec/olefs/lookup_spec.rb +6 -0
- metadata +8 -2
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
### v2.3.0 - 2013/07/??
|
2
|
+
|
3
|
+
* Pages Added
|
4
|
+
* OLEFS
|
5
|
+
* Load Summary Lookup (for Staff Upload load reports)
|
6
|
+
* Functions Added
|
7
|
+
* OLEFS
|
8
|
+
* Lookup
|
9
|
+
* row_by_td_text, row_by_text
|
10
|
+
* Return a search results row by the text of a td element in that row.
|
11
|
+
* Load Summary Lookup
|
12
|
+
* doc_link_by_text
|
13
|
+
* Return the link to a load report document by the text found in any td
|
14
|
+
element in that row.
|
15
|
+
|
16
|
+
|
1
17
|
### v2.2.0 - 2013/07/22
|
2
18
|
|
3
19
|
* Staff Upload
|
@@ -1,8 +1,8 @@
|
|
1
|
-
# Default options for
|
1
|
+
# Default options for non-development use.
|
2
2
|
---
|
3
|
-
:base_url: http://
|
4
|
-
:ls_url: http://
|
3
|
+
:base_url: http://tst.ole.kuali.org/
|
4
|
+
:ls_url: http://tst.rice2.ole.kuali.org/
|
5
5
|
:headless?: true
|
6
6
|
:implicit_wait: 0
|
7
7
|
:explicit_wait: 15
|
8
|
-
:doc_wait:
|
8
|
+
:doc_wait: 45
|
data/lib/olefs/common/lookup.rb
CHANGED
@@ -26,5 +26,12 @@ module OLE_QA::Framework::OLEFS
|
|
26
26
|
element(:clear_button) {b.input(:title => "clear")}
|
27
27
|
element(:cancel_button) {b.input(:title => "cancel")}
|
28
28
|
end
|
29
|
+
|
30
|
+
# Set commonly-used lookup page functions.
|
31
|
+
def set_functions
|
32
|
+
# Return a search results row by searching on the text in a given table cell.
|
33
|
+
function(:row_by_td_text) {|which| b.td(:xpath => "//table[@id='row']/descendant::td[contains(text(),'#{which}')]").parent}
|
34
|
+
function(:row_by_text) {|which| b.td(:xpath => "//table[@id='row']/descendant::td[contains(text(),'#{which}')]").parent}
|
35
|
+
end
|
29
36
|
end
|
30
37
|
end
|
@@ -0,0 +1,67 @@
|
|
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::OLEFS
|
16
|
+
# An OLE Financial System staff upload load report.
|
17
|
+
class Load_Report < E_Doc
|
18
|
+
# Initializes with Load Summary Lookup URL.
|
19
|
+
# (Requires document ID number to retrieve by URL.)
|
20
|
+
def initialize(ole_session)
|
21
|
+
url = ole_session.fs_url + 'portal.do?channelTitle=Load%20Reports&channelUrl=batchlookup.do?methodToCall=start&businessObjectClassName=org.kuali.ole.select.businessobject.OleLoadSumRecords&docFormKey=88888888&returnLocation='
|
22
|
+
url += ole_session.fs_url + 'portal.do&hideReturnLink=true'
|
23
|
+
super(ole_session, url)
|
24
|
+
end
|
25
|
+
|
26
|
+
# Set load report screen elements.
|
27
|
+
def set_elements
|
28
|
+
super
|
29
|
+
element(:profile_name) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'Name Of Load Profile')]]/following-sibling::td")}
|
30
|
+
element(:user_id) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'User ID')]]/following-sibling::td")}
|
31
|
+
element(:counts) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'Counts')]]/following-sibling::td")}
|
32
|
+
element(:file_name) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'Name Of File')]]/following-sibling::td")}
|
33
|
+
element(:number_of_pos) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'No. Of POs Created')]]/following-sibling::td")}
|
34
|
+
element(:number_of_bibs) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'No. Of Bibs Created')]]/following-sibling::td")}
|
35
|
+
element(:po_link) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'List Of All POs')]]/following-sibling::td").a}
|
36
|
+
element(:bib_link) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'List Of All Bibs')]]/following-sibling::td").a}
|
37
|
+
element(:upload_description) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'Description')]]/following-sibling::td")}
|
38
|
+
element(:upload_date) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'Date Of Load')]]/following-sibling::td")}
|
39
|
+
end
|
40
|
+
|
41
|
+
def wait_for_elements
|
42
|
+
super
|
43
|
+
@wait_on << :counts
|
44
|
+
@wait_on << :upload_description
|
45
|
+
@wait_on << :upload_date
|
46
|
+
end
|
47
|
+
|
48
|
+
def set_functions
|
49
|
+
super
|
50
|
+
# Total Count from 'Counts' cell.
|
51
|
+
# @return [String] The total number of records uploaded.
|
52
|
+
function(:total_count) {counts.text.match(/(?<=TOTAL\: )\d+(?=\s)/).to_s}
|
53
|
+
# Success Count from 'Counts' cell.
|
54
|
+
# @return [String] The total number of records successfully processed.
|
55
|
+
function(:success_count) {counts.text.match(/(?<=SUCCESS\: )\d+(?=\s)/).to_s}
|
56
|
+
# Failure Count from 'Counts' cell.
|
57
|
+
# @return [String] The total number of records unsuccessfully processed.
|
58
|
+
function(:failure_count) {counts.text.match(/(?<=FAILED\: )\d+(?=$)/).to_s}
|
59
|
+
# Use a regular expression to return the year/month/day value in the upload date field.
|
60
|
+
# @return [String] The upload date, in MM/DD/YYYY format.
|
61
|
+
function(:upload_date_ymd) {upload_date.text.match(/\d{2}\/\d{2}\/\d{4}/)}
|
62
|
+
# Use a regular expression to return the time-of-day value in the upload date field.
|
63
|
+
# @return [String] The upload time, in HH:MM AM/PM format.
|
64
|
+
function(:upload_date_tod) {upload_date.text.match(/\d{2}\:\d{2}\s+[AP]M/)}
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,42 @@
|
|
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::OLEFS
|
16
|
+
# An OLE Financial System Load Summary Lookup page.
|
17
|
+
class Load_Summary_Lookup < Lookup
|
18
|
+
def initialize(ole_session)
|
19
|
+
url = ole_session.fs_url + 'portal.do?channelTitle=Load%20Reports&channelUrl=batchlookup.do?methodToCall=start&businessObjectClassName=org.kuali.ole.select.businessobject.OleLoadSumRecords&docFormKey=88888888&returnLocation='
|
20
|
+
url += ole_session.fs_url + 'portal.do&hideReturnLink=true'
|
21
|
+
super(ole_session, url)
|
22
|
+
end
|
23
|
+
|
24
|
+
# Define Load Summary Lookup screen elements.
|
25
|
+
def set_elements
|
26
|
+
super
|
27
|
+
element(:description_field) {b.text_field(:id => 'acqLoadDescription')}
|
28
|
+
element(:filename_field) {b.text_field(:id => 'fileName')}
|
29
|
+
element(:user_id_field) {b.text_field(:id => 'principalId')}
|
30
|
+
element(:load_profile_selector) {b.select_list(:id => 'profileId')}
|
31
|
+
element(:date_from_field) {b.text_field(:name => 'rangeLowerBoundKeyPrefix_loadCreatedDate')}
|
32
|
+
element(:date_to_field) {b.text_field(:id => 'loadCreatedDate')}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Define commonly used functions for Load Summary Lookup screen.
|
36
|
+
def set_functions
|
37
|
+
super
|
38
|
+
# Return the link to a document by any text in the row.
|
39
|
+
function(:doc_link_by_text) {|which| b.td(:xpath => "//table[@id='row']/descendant::td[contains(text(),'#{which}')]").parent.td(:index => 0).a}
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,52 @@
|
|
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 'My behaviour' do
|
19
|
+
|
20
|
+
before :all do
|
21
|
+
@ole = OLE_QA::Framework::Session.new
|
22
|
+
@page = OLE_QA::Framework::OLEFS::Load_Report.new(@ole)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should create a new instance' do
|
26
|
+
@page.should be_an_instance_of(OLE_QA::Framework::OLEFS::Load_Report)
|
27
|
+
@page.class.superclass.should == OLE_QA::Framework::OLEFS::E_Doc
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'should have load report elements' do
|
31
|
+
elements = @page.elements
|
32
|
+
elements.should include(:profile_name)
|
33
|
+
elements.should include(:user_id)
|
34
|
+
elements.should include(:counts)
|
35
|
+
elements.should include(:file_name)
|
36
|
+
elements.should include(:number_of_pos)
|
37
|
+
elements.should include(:number_of_bibs)
|
38
|
+
elements.should include(:po_link)
|
39
|
+
elements.should include(:bib_link)
|
40
|
+
elements.should include(:upload_description)
|
41
|
+
elements.should include(:upload_date)
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'should have load report functions' do
|
45
|
+
functions = @page.functions
|
46
|
+
functions.should include(:total_count)
|
47
|
+
functions.should include(:success_count)
|
48
|
+
functions.should include(:failure_count)
|
49
|
+
functions.should include(:upload_date_ymd)
|
50
|
+
functions.should include(:upload_date_tod)
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,49 @@
|
|
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 OLEFS Load Summary Lookup page' do
|
19
|
+
|
20
|
+
before :all do
|
21
|
+
@ole = OLE_QA::Framework::Session.new
|
22
|
+
@page = OLE_QA::Framework::OLEFS::Load_Summary_Lookup.new(@ole)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should create a new instance' do
|
26
|
+
@page.should be_an_instance_of(OLE_QA::Framework::OLEFS::Load_Summary_Lookup)
|
27
|
+
@page.class.superclass.should == OLE_QA::Framework::OLEFS::Lookup
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'should have load summary lookup elements' do
|
31
|
+
elements = @page.elements
|
32
|
+
elements.should include(:description_field)
|
33
|
+
elements.should include(:filename_field)
|
34
|
+
elements.should include(:user_id_field)
|
35
|
+
elements.should include(:load_profile_selector)
|
36
|
+
elements.should include(:date_from_field)
|
37
|
+
elements.should include(:date_to_field)
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'should have load summary functions' do
|
41
|
+
functions = @page.functions
|
42
|
+
functions.should include(:doc_link_by_text)
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'should open the load summary lookup screen via URL' do
|
46
|
+
@page.open
|
47
|
+
@page.title.text.strip.should == 'Load Summary Lookup'
|
48
|
+
end
|
49
|
+
end
|
data/spec/olefs/lookup_spec.rb
CHANGED
@@ -41,4 +41,10 @@ describe 'An OLEFS Lookup page' do
|
|
41
41
|
methods.include?(:clear_button).should be_true
|
42
42
|
methods.include?(:cancel_button).should be_true
|
43
43
|
end
|
44
|
+
|
45
|
+
it 'should have lookup page functions' do
|
46
|
+
functions = @lookup.functions
|
47
|
+
functions.should include(:row_by_td_text)
|
48
|
+
functions.should include(:row_by_text)
|
49
|
+
end
|
44
50
|
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.3.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-07-
|
12
|
+
date: 2013-07-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -151,6 +151,8 @@ files:
|
|
151
151
|
- lib/olefs/objects/preq_line_item.rb
|
152
152
|
- lib/olefs/objects/receiving_line.rb
|
153
153
|
- lib/olefs/pages/building_lookup.rb
|
154
|
+
- lib/olefs/pages/load_report.rb
|
155
|
+
- lib/olefs/pages/load_summary_lookup.rb
|
154
156
|
- lib/olefs/pages/main_menu.rb
|
155
157
|
- lib/olefs/pages/payment_request.rb
|
156
158
|
- lib/olefs/pages/payment_request_creation.rb
|
@@ -206,6 +208,8 @@ files:
|
|
206
208
|
- spec/olefs/exception_notes_line_spec.rb
|
207
209
|
- spec/olefs/invoice_notes_line_spec.rb
|
208
210
|
- spec/olefs/line_item_spec.rb
|
211
|
+
- spec/olefs/load_report_spec.rb
|
212
|
+
- spec/olefs/load_summary_lookup_spec.rb
|
209
213
|
- spec/olefs/lookup_spec.rb
|
210
214
|
- spec/olefs/main_menu_spec.rb
|
211
215
|
- spec/olefs/notes_line_spec.rb
|
@@ -280,6 +284,8 @@ test_files:
|
|
280
284
|
- spec/olefs/exception_notes_line_spec.rb
|
281
285
|
- spec/olefs/invoice_notes_line_spec.rb
|
282
286
|
- spec/olefs/line_item_spec.rb
|
287
|
+
- spec/olefs/load_report_spec.rb
|
288
|
+
- spec/olefs/load_summary_lookup_spec.rb
|
283
289
|
- spec/olefs/lookup_spec.rb
|
284
290
|
- spec/olefs/main_menu_spec.rb
|
285
291
|
- spec/olefs/notes_line_spec.rb
|