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 +4 -4
- data/ChangeLog +7 -0
- data/features/table.feature +0 -1
- data/lib/page-object/page_factory.rb +1 -0
- data/lib/page-object/platforms/selenium_webdriver/table.rb +0 -8
- data/lib/page-object/version.rb +1 -1
- data/page-object.gemspec +2 -2
- data/spec/page-object/page_factory_spec.rb +20 -5
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1156a7970aead05123219c89c803265b667a78dd
|
4
|
+
data.tar.gz: b3c0e0f5b3aca905ecf086e075ed69d3fef38407
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/features/table.feature
CHANGED
@@ -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)
|
data/lib/page-object/version.rb
CHANGED
data/page-object.gemspec
CHANGED
@@ -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.
|
24
|
-
s.add_dependency 'selenium-webdriver', '>= 2.
|
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
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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
|
-
|
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.
|
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-
|
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.
|
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.
|
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.
|
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.
|
40
|
+
version: 2.40.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: page_navigation
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|