ae_page_objects 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 21bb3ce2ec7cab7d29ee0c2d1f820351283fa949
|
4
|
+
data.tar.gz: 25d73f3965d7e6fe0ef3c9997b96c3cdd1414299
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fb4b1ad7f3389aa64a2cdc8e3215a345af964a015d6394d1d6db2734ecdaae88344e878e6e86530ddd0f6729aea1ea8bfd3b26aec77c3fe0e3648d9f2a8690e3
|
7
|
+
data.tar.gz: 737667a88d09c4d8c8447b36c28d0d4ad214c6b65d2e7e6334edd4fb002f06c53cf73e654cb9b81d6d5e3a255d44b43249ed9bdfb2dcf8fe75df7d39393bdabb
|
data/lib/ae_page_objects.rb
CHANGED
@@ -16,6 +16,7 @@ module AePageObjects
|
|
16
16
|
autoload :InternalHelpers, 'ae_page_objects/util/internal_helpers'
|
17
17
|
autoload :HashSymbolizer, 'ae_page_objects/util/hash_symbolizer'
|
18
18
|
autoload :Inflector, 'ae_page_objects/util/inflector'
|
19
|
+
autoload :Waiter, 'ae_page_objects/util/waiter'
|
19
20
|
|
20
21
|
module Concerns
|
21
22
|
autoload :LoadEnsuring, 'ae_page_objects/concerns/load_ensuring'
|
@@ -9,10 +9,10 @@ module AePageObjects
|
|
9
9
|
private
|
10
10
|
|
11
11
|
def ensure_loaded!
|
12
|
-
unless self.class.can_load_from_current_url?
|
12
|
+
unless Waiter.wait_for { self.class.can_load_from_current_url? }
|
13
13
|
raise LoadingFailed, "#{self.class.name} cannot be loaded with url '#{current_url_without_params}'"
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
super
|
17
17
|
end
|
18
18
|
|
@@ -19,14 +19,14 @@ module AePageObjects
|
|
19
19
|
# Provided so that visible? can be asked without
|
20
20
|
# an explicit check for present? first.
|
21
21
|
def visible?
|
22
|
-
wait_for do
|
22
|
+
Waiter.wait_for do
|
23
23
|
inst = presence
|
24
24
|
!! inst && inst.visible?
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
28
|
def not_visible?
|
29
|
-
wait_for do
|
29
|
+
Waiter.wait_for do
|
30
30
|
inst = presence
|
31
31
|
inst.nil? || ! inst.visible?
|
32
32
|
end
|
@@ -37,7 +37,7 @@ module AePageObjects
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def not_present?
|
40
|
-
wait_for do
|
40
|
+
Waiter.wait_for do
|
41
41
|
! present?
|
42
42
|
end
|
43
43
|
end
|
@@ -70,15 +70,6 @@ module AePageObjects
|
|
70
70
|
|
71
71
|
private
|
72
72
|
|
73
|
-
def wait_for(&block)
|
74
|
-
Timeout.timeout(Capybara.default_wait_time) do
|
75
|
-
sleep(0.05) until value = Capybara.using_wait_time(0, &block)
|
76
|
-
value
|
77
|
-
end
|
78
|
-
rescue Timeout::Error
|
79
|
-
false
|
80
|
-
end
|
81
|
-
|
82
73
|
def element
|
83
74
|
@element ||= @element_class.new(*@args)
|
84
75
|
end
|
metadata
CHANGED
@@ -1,22 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ae_page_objects
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Donnie Tognazzini
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-
|
11
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: capybara
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '1.1'
|
22
20
|
- - <
|
@@ -25,9 +23,8 @@ dependencies:
|
|
25
23
|
type: :runtime
|
26
24
|
prerelease: false
|
27
25
|
version_requirements: !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
29
26
|
requirements:
|
30
|
-
- -
|
27
|
+
- - '>='
|
31
28
|
- !ruby/object:Gem::Version
|
32
29
|
version: '1.1'
|
33
30
|
- - <
|
@@ -64,34 +61,31 @@ files:
|
|
64
61
|
- lib/ae_page_objects/util/inflector.rb
|
65
62
|
- lib/ae_page_objects/util/internal_helpers.rb
|
66
63
|
- lib/ae_page_objects/util/singleton.rb
|
64
|
+
- lib/ae_page_objects/util/waiter.rb
|
67
65
|
- lib/ae_page_objects/version.rb
|
68
66
|
- lib/ae_page_objects/window.rb
|
69
67
|
homepage: http://github.com/appfolio/ae_page_objects
|
70
68
|
licenses:
|
71
69
|
- MIT
|
70
|
+
metadata: {}
|
72
71
|
post_install_message:
|
73
72
|
rdoc_options: []
|
74
73
|
require_paths:
|
75
74
|
- lib
|
76
75
|
required_ruby_version: !ruby/object:Gem::Requirement
|
77
|
-
none: false
|
78
76
|
requirements:
|
79
|
-
- -
|
77
|
+
- - '>='
|
80
78
|
- !ruby/object:Gem::Version
|
81
79
|
version: '0'
|
82
|
-
segments:
|
83
|
-
- 0
|
84
|
-
hash: 472038393023831036
|
85
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
-
none: false
|
87
81
|
requirements:
|
88
|
-
- -
|
82
|
+
- - '>='
|
89
83
|
- !ruby/object:Gem::Version
|
90
84
|
version: '0'
|
91
85
|
requirements: []
|
92
86
|
rubyforge_project:
|
93
|
-
rubygems_version: 1.
|
87
|
+
rubygems_version: 2.1.11
|
94
88
|
signing_key:
|
95
|
-
specification_version:
|
89
|
+
specification_version: 4
|
96
90
|
summary: Capybara Page Objects pattern
|
97
91
|
test_files: []
|