page-object 0.8.9 → 0.8.10

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: e9a92e6a236b6b469c1cbff99561bbb64b138012
4
- data.tar.gz: 6800ad5dcebd5badb018a7043f8492f2f137a5a1
3
+ metadata.gz: de3884dc88299dede9806d452ed929d3e2ba5fde
4
+ data.tar.gz: c4e6a39d2f9f0a9da473fc546c6f044ccd503763
5
5
  SHA512:
6
- metadata.gz: 18b84ca5fb874b7690b97599f5ca3c169486b0db609a37c2dc7ce91e1d8e7179915d6725c8740dcd1337efb29a4c700d87cf9442aea671eeb06ac53c6f64af51
7
- data.tar.gz: eff836a0fc7b3762b91b16f1eccaccad38e95ab906cd0fb28756e6cfa05d3c12c54221eb6143d4ea11da8fd214c6479bd7468a6e4d50ed6fb6cdcf9538033279
6
+ metadata.gz: 1c725dfe10c6760ea599efff3c99792732f7d49bcaab49f280eab18904e979cfdbe141fcb7f8afd810e285f927857b7fad3337f0ec87a6f0b18205f94d66cca9
7
+ data.tar.gz: 56db7861055dbb2a52d5d33fcc3b9ec9bd4b4a3ff6aa0d642ae1db11029453efe2f6d35f903d1866bd6a60ceff995ca6138d15b99485c1243c159b140ef8db9e
data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ === Version 0.8.10 / 2013-5-3
2
+ * Enhancements
3
+ * Updated populate_page_with to also check if the element is visible prior to setting value
4
+ * Updated to use the latest watir-webdriver 0.6.4
5
+
1
6
  === Version 0.8.9 / 2013-4-13
2
7
  * Enhancements
3
8
  * Updated to use the latest watir-webdriver 0.6.3
@@ -1,4 +1,3 @@
1
- @focus
2
1
  Feature: Gxt Table Extension
3
2
  As a Quality Engineer working on a Gxt or Gwt project
4
3
  In order to easily create test widgets to interact with application widgets
@@ -67,7 +67,8 @@ module PageObject
67
67
 
68
68
  def is_enabled?(key)
69
69
  return true if (self.send "#{key}_element").tag_name == "textarea"
70
- self.send("#{key}_element").enabled?
70
+ element = self.send("#{key}_element")
71
+ element.enabled? and element.visible?
71
72
  end
72
73
  end
73
74
  end
@@ -1,4 +1,4 @@
1
1
  module PageObject
2
2
  # @private
3
- VERSION = "0.8.9"
3
+ VERSION = "0.8.10"
4
4
  end
data/page-object.gemspec CHANGED
@@ -19,9 +19,9 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
21
 
22
- s.add_dependency 'watir-webdriver', '>= 0.6.3'
22
+ s.add_dependency 'watir-webdriver', '>= 0.6.4'
23
23
  s.add_dependency 'selenium-webdriver', '>= 2.32.1'
24
- s.add_dependency 'page_navigation', '>= 0.7'
24
+ s.add_dependency 'page_navigation', '>= 0.8'
25
25
 
26
26
  s.add_development_dependency 'rspec', '>= 2.12.0'
27
27
  s.add_development_dependency 'cucumber', '>= 1.2.0'
@@ -34,6 +34,15 @@ describe PageObject::PagePopulator do
34
34
  page_object.populate_page_with('tf' => true)
35
35
  end
36
36
 
37
+ it "should not populate a text field when it is not visible" do
38
+ page_object.should_not_receive(:tf=)
39
+ page_object.should_receive(:tf_element).twice.and_return(browser)
40
+ browser.should_receive(:enabled?).and_return(true)
41
+ browser.should_receive(:visible?).and_return(false)
42
+ browser.should_receive(:tag_name).and_return('input')
43
+ page_object.populate_page_with('tf' => true)
44
+ end
45
+
37
46
  it "should set a value in a text area" do
38
47
  page_object.should_receive(:ta=).with('value')
39
48
  page_object.should_receive(:ta_element).and_return(browser)
@@ -85,6 +94,15 @@ describe PageObject::PagePopulator do
85
94
  page_object.populate_page_with('cb' => true)
86
95
  end
87
96
 
97
+ it "should not populate a checkbox if it is not visible" do
98
+ page_object.should_not_receive(:check_cb)
99
+ page_object.should_receive(:cb_element).twice.and_return(browser)
100
+ browser.should_receive(:enabled?).and_return(true)
101
+ browser.should_receive(:visible?).and_return(false)
102
+ browser.should_receive(:tag_name).and_return('input')
103
+ page_object.populate_page_with('cb' => true)
104
+ end
105
+
88
106
  it "should not populate a radio button when it is disabled" do
89
107
  page_object.should_not_receive(:select_rb)
90
108
  page_object.should_receive(:rb_element).twice.and_return(browser)
@@ -93,4 +111,12 @@ describe PageObject::PagePopulator do
93
111
  page_object.populate_page_with('rb' => true)
94
112
  end
95
113
 
114
+ it "should not populate a radio button when it is not visible" do
115
+ page_object.should_not_receive(:select_rb)
116
+ page_object.should_receive(:rb_element).twice.and_return(browser)
117
+ browser.should_receive(:enabled?).and_return(true)
118
+ browser.should_receive(:visible?).and_return(false)
119
+ browser.should_receive(:tag_name).and_return('input')
120
+ page_object.populate_page_with('rb' => true)
121
+ end
96
122
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: page-object
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.9
4
+ version: 0.8.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Morgan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-13 00:00:00.000000000 Z
11
+ date: 2013-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: watir-webdriver
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.6.3
19
+ version: 0.6.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.6.3
26
+ version: 0.6.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: selenium-webdriver
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - '>='
46
46
  - !ruby/object:Gem::Version
47
- version: '0.7'
47
+ version: '0.8'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '>='
53
53
  - !ruby/object:Gem::Version
54
- version: '0.7'
54
+ version: '0.8'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement