page-object 0.9.6 → 0.9.7

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: b4427749437df9f9b92f059425594d069c769766
4
- data.tar.gz: 4da711511069744d4412b5c68fc1ad531144eb22
3
+ metadata.gz: 1156a7970aead05123219c89c803265b667a78dd
4
+ data.tar.gz: b3c0e0f5b3aca905ecf086e075ed69d3fef38407
5
5
  SHA512:
6
- metadata.gz: c1cb457f915d76893f24078e0f28f329a428c85df32c2e4b8161504fa53366d24fce799a6c5e104670c8d3864dda6813a94b8a6eb23de10186fa7eb17441582e
7
- data.tar.gz: 6501e40f5db81abc012c9cea21dbc274a8118fe453150ff5f716a026baae9754180ba8222a541c678dd900403923eb31376608ee615dbdeef7e5ad5fcc323c12
6
+ metadata.gz: 03fb39890fda2a007e2f4938f54f62354c9af1bc5935dd7678a1fe33122c826b1cedc13c38391121904d9d0f2466a7bd41a233051a1a2024ea29f074260c0d25
7
+ data.tar.gz: 4c6a7007c11534fa43c3e57218accdbe23000db35da0d772017965c54d82fa4dc2b234bb075d260d97cf0a4bcf1d537c8687635cf4a569cfcd356f846b3f0c81
data/ChangeLog CHANGED
@@ -1,3 +1,10 @@
1
+ === Version 0.9.7 / 2014-2-26
2
+ * Enhancements
3
+ * Table now supports exists?
4
+ * super called when factory method invoked with non PageObject class
5
+ * Updated to use the latest watir-webdriver 0.6.8
6
+ * Updated to use the latest selenium-webdriver 2.40.0
7
+
1
8
  === Version 0.9.6 / 2014-2-4
2
9
  * Enhancements
3
10
  * Updated to use the latest watir-webdriver 0.6.7
@@ -10,7 +10,6 @@ Feature: Table
10
10
  When I retrieve a table element
11
11
  Then I should know it is visible
12
12
 
13
- @watir_only
14
13
  Scenario: Determine if a table exists
15
14
  When I retrieve a table element
16
15
  Then I should know it exists
@@ -68,6 +68,7 @@ module PageObject
68
68
  #
69
69
  def on_page(page_class, params={:using_params => {}}, visit=false, &block)
70
70
  page_class = class_from_string(page_class) if page_class.is_a? String
71
+ return super(page_class, params, visit, &block) unless page_class.ancestors.include? PageObject
71
72
  merged = page_class.params.merge(params[:using_params])
72
73
  page_class.instance_variable_set("@merged_params", merged) unless merged.empty?
73
74
  @current_page = page_class.new(@browser, visit)
@@ -24,14 +24,6 @@ module PageObject
24
24
  table_rows.size
25
25
  end
26
26
 
27
- #
28
- # override PageObject::Platforms::SeleniumElement because exists? is not
29
- # available on a table element in Selenium.
30
- #
31
- def exists?
32
- raise "exists? not available on table element"
33
- end
34
-
35
27
  private
36
28
 
37
29
  def find_index_by_title(row_title, eles)
@@ -1,4 +1,4 @@
1
1
  module PageObject
2
2
  # @private
3
- VERSION = "0.9.6"
3
+ VERSION = "0.9.7"
4
4
  end
@@ -20,8 +20,8 @@ Gem::Specification.new do |s|
20
20
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
21
21
  s.require_paths = ["lib"]
22
22
 
23
- s.add_dependency 'watir-webdriver', '>= 0.6.7'
24
- s.add_dependency 'selenium-webdriver', '>= 2.39.0'
23
+ s.add_dependency 'watir-webdriver', '>= 0.6.8'
24
+ s.add_dependency 'selenium-webdriver', '>= 2.40.0'
25
25
  s.add_dependency 'page_navigation', '>= 0.9'
26
26
 
27
27
  s.add_development_dependency 'rspec', '>= 2.14.0'
@@ -20,13 +20,21 @@ class YetAnotherPage
20
20
  end
21
21
 
22
22
  module ContainingModule
23
- class PageInsideModule
24
- include PageObject
25
- page_url "http://google.co.uk"
26
- end
23
+ class PageInsideModule
24
+ include PageObject
25
+ page_url "http://google.co.uk"
26
+ end
27
+ end
28
+
29
+ class WorldSuper
30
+ attr_reader :super_called
31
+ def on_page(cls, params={}, visit=false, &block)
32
+ @super_called = true
33
+ end
27
34
  end
28
35
 
29
- class TestWorld
36
+
37
+ class TestWorld < WorldSuper
30
38
  include PageObject::PageFactory
31
39
  attr_accessor :browser
32
40
  attr_accessor :current_page
@@ -38,6 +46,13 @@ describe PageObject::PageFactory do
38
46
  @world.browser = mock_watir_browser
39
47
  end
40
48
 
49
+ it "should call super when non page-object class passed " do
50
+ class NoPO
51
+ end
52
+ @world.on(NoPO)
53
+ @world.super_called.should be_true
54
+ end
55
+
41
56
  it "should create a new page object and execute a block" do
42
57
  @world.browser.should_not_receive(:goto)
43
58
  @world.on_page FactoryTestPage do |page|
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.9.6
4
+ version: 0.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Morgan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-05 00:00:00.000000000 Z
11
+ date: 2014-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: watir-webdriver
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.6.7
19
+ version: 0.6.8
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.7
26
+ version: 0.6.8
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: selenium-webdriver
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '>='
32
32
  - !ruby/object:Gem::Version
33
- version: 2.39.0
33
+ version: 2.40.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '>='
39
39
  - !ruby/object:Gem::Version
40
- version: 2.39.0
40
+ version: 2.40.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: page_navigation
43
43
  requirement: !ruby/object:Gem::Requirement