ole-qa-framework 2.1.0 → 2.1.1

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.
@@ -1,3 +1,13 @@
1
+ ### v2.1.1 - 2013/07/16
2
+
3
+ * Fix Bib Editor
4
+ * update control field IDs for compatibility with M1-r12784
5
+ * Fix Editor base Class
6
+ * move message to Bib Editor, span ID is not universal across editor types
7
+ * update element definitions
8
+ * Helper Modules
9
+ * don't add element or function to array when force=true
10
+
1
11
  ### v2.1.0 - 2013/07/10
2
12
 
3
13
  * Login/Logout
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ole-qa-framework (2.1.0)
4
+ ole-qa-framework (2.1.1)
5
5
  headless
6
6
  rspec
7
7
  watir-webdriver
@@ -1,7 +1,8 @@
1
+ # Default options for using development environment.
1
2
  ---
2
- :base_url: http://tst.ole.kuali.org/
3
- :ls_url: http://tst.rice2.ole.kuali.org/
3
+ :base_url: http://dev.ole.kuali.org/
4
+ :ls_url: http://dev.rice2.ole.kuali.org/
4
5
  :headless?: true
5
6
  :implicit_wait: 0
6
7
  :explicit_wait: 15
7
- :doc_wait: 45
8
+ :doc_wait: 60
@@ -0,0 +1,8 @@
1
+ # Default options for non-development use.
2
+ ---
3
+ :base_url: http://tst.ole.kuali.org/
4
+ :ls_url: http://tst.rice2.ole.kuali.org/
5
+ :headless?: true
6
+ :implicit_wait: 0
7
+ :explicit_wait: 15
8
+ :doc_wait: 45
@@ -0,0 +1,8 @@
1
+ # Default options for using development environment.
2
+ ---
3
+ :base_url: http://dev.ole.kuali.org/
4
+ :ls_url: http://dev.rice2.ole.kuali.org/
5
+ :headless?: true
6
+ :implicit_wait: 0
7
+ :explicit_wait: 15
8
+ :doc_wait: 60
@@ -103,7 +103,7 @@ module OLE_QA::Framework::Helpers
103
103
  yield self
104
104
  end
105
105
  end
106
- @elements << name
106
+ @elements << name unless force
107
107
  end
108
108
  alias_method(:element, :set_element)
109
109
 
@@ -132,7 +132,7 @@ module OLE_QA::Framework::Helpers
132
132
  yield *arg
133
133
  end
134
134
  end
135
- @functions << name
135
+ @functions << name unless force
136
136
  end
137
137
  alias_method(:function,:set_function)
138
138
 
@@ -15,6 +15,6 @@
15
15
  module OLE_QA
16
16
  module Framework
17
17
  # The most recent version of OLE with which this framework is compatible.
18
- OLE_VERSION = '0.8.0 - 1.0.0-M1-r12784 2013-07-03'
18
+ OLE_VERSION = '0.8.0 - 1.0.0-M2-r12961 :: 2013-07-11'
19
19
  end
20
20
  end
@@ -15,6 +15,6 @@
15
15
  module OLE_QA
16
16
  module Framework
17
17
  # The version number for this project.
18
- VERSION = '2.1.0'
18
+ VERSION = '2.1.1'
19
19
  end
20
20
  end
@@ -44,21 +44,19 @@ module OLE_QA::Framework::OLELS
44
44
  # despite their commonality.
45
45
  def set_elements
46
46
  super
47
- element(:title) {b.h2(:class => "uif-headerText").span}
48
- element(:submit_button) {b.button(:id => "submitEditor")}
49
- element(:cancel_button) {b.button(:id => "cancelEditor")}
50
- element(:close_button) {b.button(:id => "closeEditor")}
51
- element(:return_to_search_button) {b.button(:id => "returnToSearch_button")}
52
- element(:message) {b.span(:id => "workMessageSection_span")}
47
+ element(:title) {b.h2(:class => "uif-headerText").span}
48
+ element(:submit_button) {b.button(:id => "submitEditor")}
49
+ element(:cancel_button) {b.button(:id => "cancelEditor")}
50
+ element(:close_button) {b.button(:id => "closeEditor")}
51
+ element(:return_to_search_button) {b.button(:id => "returnToSearch_button")}
53
52
  # Navigation Area Elements
54
53
  # TODO Check on necessity of plurality for add instance button once it is functioning again. (see OLE-4294)
55
- element(:delete_bib_button) {b.img(:xpath => "//img[@class='deleteBib']")}
56
- element(:holdings_links) {b.divs(:class => "holdingIdentifierClass")}
57
- element(:item_links) {b.divs(:class => "itemIdentifierClass")}
58
- element(:add_instance_buttons) {b.imgs(:class => "addInstance")}
59
- element(:delete_instance_buttons) {b.imgs(:title => "Delete Instance")}
60
- element(:add_item_buttons) {b.imgs(:title => "Add Item")}
61
- element(:delete_item_buttons) {b.imgs(:title => "Delete Item")}
54
+ element(:delete_bib_button) {b.div(:id => 'bibLevelActionSection').div(:index => 2).input(:title => "Delete Bib")}
55
+ element(:add_instance_button) {b.div(:id => 'bibLevelActionSection').div(:index => 2).input(:title => "Add Instance")}
56
+ element(:delete_instance_button) {b.div(:id => 'vakata-contextmenu').ul.li(:index => 0).a(:rel => "Delete")}
57
+ # FIXME - Redefine these elements.
58
+ # element(:add_item_button) {b.imgs(:title => "Add Item")}
59
+ # element(:delete_item_button) {b.imgs(:title => "Delete Item")}
62
60
  end
63
61
 
64
62
  # Designate elements always expected to be present once the editor has finished loading.
@@ -71,6 +69,13 @@ module OLE_QA::Framework::OLELS
71
69
  super
72
70
  # Click the submit button, wait until a message appears, and return the message text.
73
71
  function(:save_record) {submit_button.click ; message.wait_until_present ; message.text.strip}
72
+ # Links for Holdings and Item Records - Pass a human-readable (1-based) variable to determine which instance of each link should be used.
73
+ # e.g., holdings_link(1) will return the first holdings link, holdings_link(2) will return the second.
74
+ function(:holdings_link) {|which = 1| b.span(:xpath => "//div[@id='holdingsItemTree_tree']/ul[@class='jstree-no-icons']/li[#{which}]/a/span[@class='uif-message']")}
75
+ function(:holdings_icon) {|which = 1| b.ins(:xpath => "//div[@id='holdingsItemTree_tree']/ul[@class='jstree-no-icons']/li[#{which}]/ins")}
76
+ # This function takes two arguments - the first is the holdings element to which it belongs, and the second is its position.
77
+ # e.g., item_link(1,1) will return the first item under the first holdings link, item_link(2,2) will return the second item under the second holdings link.
78
+ function(:item_link) {|which_holdings = 1, which_item = 1| b.a(:xpath => "//div[@id='holdingsItemTree_tree']/ul[@class='jstree-no-icons']/li[#{which_holdings}]/ul/li[#{which_item}]/a")}
74
79
  end
75
80
 
76
81
  # Create a Line Object on an Editor page.
@@ -20,6 +20,7 @@ module OLE_QA::Framework::OLELS
20
20
  # {OLE_QA::Framework::OLELS::Data_Line}
21
21
  def set_elements
22
22
  super
23
+ element(:message) {b.span(:id => "workMessageSection_span")}
23
24
  element(:leader_field) {b.text_field(:id => "LeaderTextInputField_control")}
24
25
  element(:bib_record_status_selector) {b.select_list(:id => "StatusFieldSection_control")}
25
26
  element(:set_button) {b.button(:id => "set_button")}
@@ -32,13 +33,19 @@ module OLE_QA::Framework::OLELS
32
33
  element(:control_009_link) {b.a(:id => "009FieldLink")}
33
34
  # Control Fields & Related Elements
34
35
  # (NB - Dependent on links & leader field state!)
36
+ # TODO - Update when OLE-4431 is resolved. {https://jira.kuali.org/browse/OLE-4431}
37
+ element(:control_001_field) {b.text_field(:id => "Control_Field_001_control")}
35
38
  element(:control_003_field) {b.text_field(:id => "Control_Field_003_control")}
36
39
  element(:control_005_field) {b.text_field(:id => "Control_Field_005_control")}
37
- element(:control_006_field) {b.text_field(:id => "Control_Field_006_control")}
40
+ element(:control_006_field) {b.text_field(:id => "006Field_control")}
38
41
  element(:control_006_format_selector) {b.select_list(:id => "006Field_0_control")}
39
42
  element(:control_006_set_button) {b.button(:id => "ControlField_Set_button")}
40
43
  element(:control_006_reset_button) {b.button(:id => "ControlField_Reset_button")}
41
- element(:control_008_field) {b.text_field(:id => "Control_Field_008_control")}
44
+ element(:control_007_field) {b.text_field(:id => "007Field_control")}
45
+ element(:control_007_catmtrl_selector) {b.select_list(:id => "007Field_0_control")}
46
+ element(:control_007_set_button) {b.button(:id => "ControlField007_Set_button")}
47
+ element(:control_007_reset_button) {b.button(:id => "ControlField007_Reset_button")}
48
+ element(:control_008_field) {b.text_field(:id => "008Field_control")}
42
49
  end
43
50
 
44
51
  # Add the first Marc Data Line to a new Bib Editor record.
@@ -19,7 +19,7 @@ module OLE_QA::Framework::OLELS
19
19
  def set_elements
20
20
  super
21
21
  # Override :message element on Editor base class.
22
- element(:message, force = true) {b.span(:id => "workInstanceMessage_span")}
22
+ element(:message) {b.span(:id => "workInstanceMessage_span")}
23
23
  element(:location_toggle) {b.a(:id => "OleLocationInformationSection_toggle")}
24
24
  element(:location_field) {b.text_field(:id => "OleHoldingLocation_control")}
25
25
  element(:call_number_toggle) {b.a(:id => "OleCallNumberInformation_toggle")}
@@ -19,7 +19,7 @@ module OLE_QA::Framework::OLELS
19
19
  def set_elements
20
20
  super
21
21
  # Override message in Editor base class, add multi-message element.
22
- element(:message, true) {b.span(:id => "workItemMessage_span")}
22
+ element(:message) {b.span(:id => "workItemMessage_span")}
23
23
  element(:messages) {b.span(:id => "workItemMessage_span").font}
24
24
  # Holdings Location/Call Number Information
25
25
  element(:holdings_location_field) {b.span(:id => "OleHoldingLocationLevelName_control")}
@@ -33,7 +33,8 @@ describe 'The Bib Editor' do
33
33
  end
34
34
 
35
35
  it 'should have bib editor elements' do
36
- elements = @bib_editor.methods
36
+ elements = @bib_editor.elements
37
+ elements.include?(:message).should be_true
37
38
  elements.include?(:leader_field).should be_true
38
39
  elements.include?(:bib_record_status_selector).should be_true
39
40
  elements.include?(:set_button).should be_true
@@ -43,15 +44,21 @@ describe 'The Bib Editor' do
43
44
  elements.include?(:control_007_link).should be_true
44
45
  elements.include?(:control_008_link).should be_true
45
46
  elements.include?(:control_009_link).should be_true
47
+ elements.include?(:control_001_field).should be_true
46
48
  elements.include?(:control_003_field).should be_true
47
49
  elements.include?(:control_005_field).should be_true
48
50
  elements.include?(:control_006_field).should be_true
49
51
  elements.include?(:control_006_format_selector).should be_true
50
52
  elements.include?(:control_006_set_button).should be_true
51
53
  elements.include?(:control_006_reset_button).should be_true
54
+ elements.include?(:control_007_field).should be_true
55
+ elements.include?(:control_007_catmtrl_selector).should be_true
56
+ elements.include?(:control_007_set_button).should be_true
57
+ elements.include?(:control_007_reset_button).should be_true
52
58
  elements.include?(:control_008_field).should be_true
53
59
  elements.include?(:delete_bib_button).should be_true
54
- elements.include?(:holdings_links).should be_true
60
+ elements.include?(:holdings_link).should be_true
61
+ elements.include?(:holdings_icon).should be_true
55
62
  elements.include?(:item_links).should be_true
56
63
  elements.include?(:add_instance_buttons).should be_true
57
64
  elements.include?(:delete_instance_buttons).should be_true
@@ -47,7 +47,6 @@ describe 'The Editor base class' do
47
47
  elements.include?(:cancel_button).should be_true
48
48
  elements.include?(:close_button).should be_true
49
49
  elements.include?(:return_to_search_button).should be_true
50
- elements.include?(:message).should be_true
51
50
  end
52
51
 
53
52
  it 'should wait for a title to be present' do
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.1.0
4
+ version: 2.1.1
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-11 00:00:00.000000000 Z
12
+ date: 2013-07-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -117,6 +117,7 @@ extra_rdoc_files: []
117
117
  files:
118
118
  - README.md
119
119
  - ole-qa-framework.gemspec
120
+ - pkg/ole-qa-framework-2.1.1.gem
120
121
  - pkg/ole-qa-framework-2.1.0.gem
121
122
  - examples/purap_workflow_test.rb
122
123
  - examples/README.md
@@ -203,7 +204,9 @@ files:
203
204
  - lib/olefs/pages/payment_request.rb
204
205
  - lib/olefs/pages/building_lookup.rb
205
206
  - lib/ole-qa-framework.rb
207
+ - lib/config/dev_options.yml
206
208
  - lib/config/default_options.yml
209
+ - lib/config/defaults.yml
207
210
  - lib/ole_qa_framework/COMPATIBILITY.rb
208
211
  - lib/ole_qa_framework/VERSION.rb
209
212
  - lib/docstore/docstore.rb