ole-qa-framework 3.10.0 → 3.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 495f2e94f44e8ed676158fdb3fc8199a800e4298
4
- data.tar.gz: ba4a3e40ac0beb64192386cff9d1f15266da78ca
3
+ metadata.gz: f8565445abbd1d524b3a5e1208cce2257cbda4b8
4
+ data.tar.gz: 905ed936b29f6327e68ce250d12c9070c2e528a2
5
5
  SHA512:
6
- metadata.gz: 56a8033be9b1b96cc5ba9ef22606c02d0e31085380903f1700409faa238eb8283be28d77c188716e2a2bdbf6a3e40d9cf9d683ce99568ba0456ec9f5d864becd
7
- data.tar.gz: f828a22be7e5e29e6135df7694930a457c857f354aa43321be04cb26b03b50bcde135edbd82dc6fbd9ab1df014b18c930853066b88c8aa2131a962ff0f6fb222
6
+ metadata.gz: ad948f5811a944cdc2f52223c0b29cdc56e6136c50f24c3a4b718ff8a429fdc6ff48da25b98272d8ecea39e7f507c7e4cd6e63a3092ce440acac37578248285e
7
+ data.tar.gz: 876ed052aa9764338057d133cc8b45c59ed025b1aaea4fe542c6dba132400f8888a560600441ec24cb2b24cecdee3f0ee69e8e953f4f98bd75ffbf5214255000
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### v3.11.0 - 2014/02/19
2
+
3
+ * Request Pages added in OLELS
4
+ * Request Lookup
5
+ * Request
6
+ * Patron Lookup
7
+ * Added .return_by_text() function
8
+
1
9
  ### v3.10.0 - 2014/02/18
2
10
 
3
11
  * Default Timeout Upgrade
@@ -15,6 +15,6 @@
15
15
  module OLE_QA
16
16
  module Framework
17
17
  # The version number for this project.
18
- VERSION = '3.10.0'
18
+ VERSION = '3.11.0'
19
19
  end
20
20
  end
@@ -53,6 +53,8 @@ module OLE_QA::Framework::OLELS
53
53
  function(:copy_by_text) {|which| b.a(:xpath => link_by_text('copy',which)) }
54
54
  # Return the delete link for a given text string in the search results.
55
55
  function(:delete_by_text) {|which| b.a(:xpath => link_by_text('delete',which)) }
56
+ # Return the 'return value' link for a line containing the given text in the search results.
57
+ function(:return_by_text) {|which| b.a(:xpath => "//tr[td/div/span[contains(text(),'#{which}')]]/td/div/fieldset/div/div/a[contains(text(),'return value')]")}
56
58
  end
57
59
 
58
60
  # Return the XPath to find a link with the given text on a line containing a search result with the given text.
@@ -0,0 +1,78 @@
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 Request in the OLE Library System.
17
+ class Request < OLE_QA::Framework::Page
18
+ def initialize(ole_session)
19
+ # Direct linking for a new request is not possible, so the URL is for Request_Lookup.
20
+ url = ole_session.url + 'portal.do?channelTitle=Request&channelUrl='
21
+ url += ole_session.url + 'ole-kr-krad/lookup?methodToCall=start&dataObjectClassName=org.kuali.ole.deliver.bo.OleDeliverRequestBo&returnLocation='
22
+ url += ole_session.url + 'portal.do&hideReturnLink=true&showMaintenanceLinks=true'
23
+ super(ole_session,url)
24
+ end
25
+
26
+ def set_elements
27
+ super
28
+ element(:title) {b.h1(:class => 'uif-headerText').span(:class => 'uif-headerText-span')}
29
+ element(:document_id) {b.div(:data_label => 'Document Number').span(:class => 'uif-readOnlyContent')}
30
+ element(:initiator_id) {b.div(:data_label => 'Initiator Network Id').span(:class => 'uif-readOnlyContent')}
31
+ element(:document_status) {b.div(:data_label => 'Document Status').span(:class => 'uif-readOnlyContent')}
32
+ element(:creation_timestamp) {b.div(:data_label => 'Creation Timestamp').span(:class => 'uif-readOnlyContent')}
33
+ element(:request_details_toggle) {b.a(:id => 'OleRequestDocument-MaintenanceView-selectRequestBorrower_toggle')}
34
+ element(:user_type_selector) {b.select_list(:id => 'selectRequestBorrower-MaintenanceView-requestCreators_control')}
35
+ element(:request_type_selector) {b.select_list(:id => 'selectRequestBorrower-MaintenanceView-requestTypeIds_control')}
36
+ element(:patron_barcode_field) {b.text_field(:id => 'selectRequestBorrower-MaintenanceView-borrowerBarcodes_control')}
37
+ element(:patron_barcode_icon) {b.fieldset(:id => 'selectRequestBorrower-MaintenanceView-borrowerBarcodes_fieldset').input(:class => 'uif-actionImage')}
38
+ element(:patron_name_field) {b.text_field(:id => 'selectRequestBorrower-MaintenanceView-borrowerNames_control')}
39
+ element(:submit_button) {b.button(:text => /[Ss]ubmit/)}
40
+ element(:save_button) {b.button(:text => /[Ss]ave/)}
41
+ element(:back_button) {b.button(:text => /[Bb]ack/)}
42
+ element(:cancel_button) {b.a(:text => /[Cc]ancel/)}
43
+ element(:error) {b.li(:class => 'uif-errorMessageItem')}
44
+ element(:message) {b.li(:class => 'uif-infoMessageItem')}
45
+ # The following fields only appear after a request type is selected.
46
+ # (Except request types 'Recall/Delivery Request 1' and 'Recall/Delivery Request 2')
47
+ element(:item_barcode_field) {b.text_field(:id => /itemId_control/)}
48
+ element(:item_title_field) {b.text_field(:id => /itemTitle_control/)}
49
+ element(:item_author_field) {b.text_field(:id => /author_control/)}
50
+ element(:item_location_field) {b.text_field(:id => /shelvingLocation_control/)}
51
+ element(:item_call_number_field) {b.text_field(:id => /callNumber_control/)}
52
+ element(:item_copy_number_field) {b.text_field(:id => /copyNumber_control/)}
53
+ element(:patron_queue_position_field) {b.text_field(:id => /borrowerQueuePosition_control/)}
54
+ element(:create_date_field) {b.text_field(:id => /createDate_control/)}
55
+ element(:expiry_date_field) {b.text_field(:id => /expirationDate_control/)}
56
+ # (Not present on request types 'Copy Request' or 'In Transit Request')
57
+ element(:pickup_location_selector) {b.select_list(:id => /pickupLocation_control/)}
58
+ element(:pickup_location_icon) {b.fieldset(:id => /pickupLocation_fieldset/).input(:class => 'uif-actionImage', :index => 0)}
59
+ # Request type-specific fields.
60
+ # Recall
61
+ element(:recall_notice_date) {b.div(:id => 'recallRequest-recallNoticeSentDate')}
62
+ # Hold
63
+ element(:hold_notice_date) {b.span(:id => 'onHoldRequest-onHoldNoticeSentDate_control')}
64
+ # Copy
65
+ element(:copy_format_field) {b.text_field(:id => 'copyRequest-copyFormat_control')}
66
+ element(:copy_pages_field) {b.text_field(:id => 'copyRequest-contentDescription_control')}
67
+ # In-Transit
68
+ element(:circulation_location_selector) {b.select_list(:id => 'inTransitReques-circulationLocationId_control')}
69
+ element(:checkin_note_field) {b.text_field(:id => 'inTransitRequest-checkInNote_control')}
70
+ end
71
+
72
+ def wait_for_elements
73
+ super
74
+ @wait_on << :document_id << :document_status
75
+ @wait_on << :request_details_toggle
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,60 @@
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 request lookup screen in the OLE Library System.
17
+ class Request_Lookup < OLE_QA::Framework::OLELS::Lookup
18
+ def initialize(ole_session)
19
+ url = ole_session.url + 'portal.do?channelTitle=Request&channelUrl='
20
+ url += ole_session.url + 'ole-kr-krad/lookup?methodToCall=start&dataObjectClassName=org.kuali.ole.deliver.bo.OleDeliverRequestBo&returnLocation='
21
+ url += ole_session.url + 'portal.do&hideReturnLink=true&showMaintenanceLinks=true'
22
+ super(ole_session,url)
23
+ end
24
+
25
+ def set_elements
26
+ super
27
+ element(:patron_barcode_field) {b.text_field(:id => 'olePatronBarcode_control')}
28
+ element(:patron_barcode_icon) {b.fieldset(:id => 'olePatronBarcode_fieldset').input(:class => 'uif-actionImage')}
29
+ element(:patron_first_name_field) {b.text_field(:id => 'olePatronFName_control')}
30
+ element(:patron_last_name_field) {b.text_field(:id => 'olePatronLName_control')}
31
+ element(:item_barcode_field) {b.text_field(:id => 'itemId_control')}
32
+ element(:item_barcode_icon) {b.fieldset(:id => 'itemId_fieldset').input(:class => 'uif-actionImage')}
33
+ element(:item_title_field) {b.text_field(:id => 'title_control')}
34
+ element(:search_button) {b.button(:id => 'searchReqBtn')}
35
+ element(:clear_button) {b.button(:id => 'clearReqBtn')}
36
+ element(:cancel_button) {b.button(:id => 'cancelReqBtn')}
37
+ element(:message) {b.li(:class => 'uif-infoMessageItem')}
38
+ end
39
+
40
+ def wait_for_elements
41
+ super
42
+ @wait_on << :patron_barcode_field << :patron_first_name_field << :patron_last_name_field
43
+ @wait_on << :item_barcode_field << :item_title_field
44
+ end
45
+
46
+ def set_functions
47
+ super
48
+ # Return the span element containing the given text, if it exists in the search results.
49
+ function(:text_in_results) {|which| b.span(:xpath => "//td/div/span[contains(text(),'#{which}')]")}
50
+ # Return whether the given text is found in the search results.
51
+ function(:text_in_results?) {|which| text_in_results(which).present?}
52
+ # Return the cancel request link for a line containing the given text in the search results.
53
+ function(:cancel_by_text) {|which| b.a(:xpath => "//tr/td[div/span[contains(text(),'#{which}')]]/preceding-sibling::td/div/fieldset/div/div/a[contains(text(),'cancel')]")}
54
+ # Return the edit request link for a line containing the given text in the search results.
55
+ function(:edit_by_text) {|which| b.a(:xpath => "//tr/td[div/span[contains(text(),'#{which}')]]/preceding-sibling::td/div/fieldset/div/div/a[contains(text(),'edit')]")}
56
+ # Return the text of the Queue Position entry for a line containing the given text.
57
+ function(:position_by_text) {|which| b.span(:xpath => "//tr/td[div/span[contains(text(),'#{which}')]]/preceding-sibling::td/div/span[starts-with(@id,'result-borrowerQueuePosition_line')]").text}
58
+ end
59
+ end
60
+ 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.10.0
4
+ version: 3.11.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-02-18 00:00:00.000000000 Z
11
+ date: 2014-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -200,6 +200,8 @@ files:
200
200
  - lib/olels/pages/main_menu.rb
201
201
  - lib/olels/pages/patron.rb
202
202
  - lib/olels/pages/patron_lookup.rb
203
+ - lib/olels/pages/request.rb
204
+ - lib/olels/pages/request_lookup.rb
203
205
  - lib/olels/pages/return.rb
204
206
  - lib/olels/pages/staff_upload.rb
205
207
  - lib/olels/subobjects/ownership_note.rb