site_prism 2.7 → 2.8
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.
- checksums.yaml +4 -4
- data/README.md +4 -2
- data/lib/site_prism.rb +4 -4
- data/lib/site_prism/element_container.rb +5 -5
- data/lib/site_prism/exceptions.rb +1 -1
- data/lib/site_prism/page.rb +1 -1
- data/lib/site_prism/section.rb +2 -1
- data/lib/site_prism/version.rb +1 -1
- data/lib/site_prism/waiter.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55a6ce7e56d5856c12b9e656a157e69a23d88fb1
|
4
|
+
data.tar.gz: 3394ad1adb32985236d96080bcc181610538c5f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29a2257b42cb9eb23e552706b0dfdc2a92ee4ef07cf6e41aa42bf3ea4638bfe2880828e23a8aea95e0c8bb8fc2efdc7c671891d9c50bd473415fedf4fe0b05b8
|
7
|
+
data.tar.gz: 825df856fa2537ba9f7019eb9d03c65a42793966ec218507ce132d761a6a9c92c96d1429f757ff7540a9ab0cb3c10d2ab792efeae1542c594a786b6cbc61ffc3
|
data/README.md
CHANGED
@@ -7,6 +7,8 @@ Find the pretty documentation here: http://rdoc.info/gems/site_prism/frames
|
|
7
7
|
|
8
8
|
[](https://travis-ci.org/natritmeyer/site_prism)
|
9
9
|
|
10
|
+
Make sure to add your project/company to https://github.com/natritmeyer/site_prism/wiki/Who-is-using-SitePrism
|
11
|
+
|
10
12
|
## Synopsis
|
11
13
|
|
12
14
|
Here's an overview of how SitePrism is designed to be used:
|
@@ -1385,8 +1387,8 @@ SitePrism::Page that represents the iframe's contents. For example:
|
|
1385
1387
|
```ruby
|
1386
1388
|
# SitePrism::Page representing the iframe
|
1387
1389
|
class Login < SitePrism::Page
|
1388
|
-
element :username "input.username"
|
1389
|
-
element :password "input.password"
|
1390
|
+
element :username, "input.username"
|
1391
|
+
element :password, "input.password"
|
1390
1392
|
end
|
1391
1393
|
|
1392
1394
|
# SitePrism::Page representing the page that contains the iframe
|
data/lib/site_prism.rb
CHANGED
@@ -2,10 +2,10 @@ require 'site_prism/exceptions'
|
|
2
2
|
require 'addressable/template'
|
3
3
|
|
4
4
|
module SitePrism
|
5
|
-
autoload :ElementContainer,
|
6
|
-
autoload :ElementChecker,
|
7
|
-
autoload :Page,
|
8
|
-
autoload :Section,
|
5
|
+
autoload :ElementContainer, 'site_prism/element_container'
|
6
|
+
autoload :ElementChecker, 'site_prism/element_checker'
|
7
|
+
autoload :Page, 'site_prism/page'
|
8
|
+
autoload :Section, 'site_prism/section'
|
9
9
|
autoload :Waiter, 'site_prism/waiter'
|
10
10
|
autoload :AddressableUrlMatcher, 'site_prism/addressable_url_matcher'
|
11
11
|
|
@@ -99,7 +99,7 @@ module SitePrism
|
|
99
99
|
method_name = "has_#{element_name}?"
|
100
100
|
create_helper_method method_name, *find_args do
|
101
101
|
define_method method_name do |*runtime_args|
|
102
|
-
wait_time = SitePrism.use_implicit_waits ?
|
102
|
+
wait_time = SitePrism.use_implicit_waits ? Waiter.default_wait_time : 0
|
103
103
|
Capybara.using_wait_time wait_time do
|
104
104
|
element_exists?(*find_args, *runtime_args)
|
105
105
|
end
|
@@ -111,7 +111,7 @@ module SitePrism
|
|
111
111
|
method_name = "has_no_#{element_name}?"
|
112
112
|
create_helper_method method_name, *find_args do
|
113
113
|
define_method method_name do |*runtime_args|
|
114
|
-
wait_time = SitePrism.use_implicit_waits ?
|
114
|
+
wait_time = SitePrism.use_implicit_waits ? Waiter.default_wait_time : 0
|
115
115
|
Capybara.using_wait_time wait_time do
|
116
116
|
element_does_not_exist?(*find_args, *runtime_args)
|
117
117
|
end
|
@@ -123,7 +123,7 @@ module SitePrism
|
|
123
123
|
method_name = "wait_for_#{element_name}"
|
124
124
|
create_helper_method method_name, *find_args do
|
125
125
|
define_method method_name do |timeout = nil, *runtime_args|
|
126
|
-
timeout = timeout.nil? ?
|
126
|
+
timeout = timeout.nil? ? Waiter.default_wait_time : timeout
|
127
127
|
Capybara.using_wait_time timeout do
|
128
128
|
element_exists?(*find_args, *runtime_args)
|
129
129
|
end
|
@@ -134,7 +134,7 @@ module SitePrism
|
|
134
134
|
def create_visibility_waiter(element_name, *find_args)
|
135
135
|
method_name = "wait_until_#{element_name}_visible"
|
136
136
|
create_helper_method method_name, *find_args do
|
137
|
-
define_method method_name do |timeout =
|
137
|
+
define_method method_name do |timeout = Waiter.default_wait_time, *runtime_args|
|
138
138
|
Timeout.timeout timeout, SitePrism::TimeOutWaitingForElementVisibility do
|
139
139
|
Capybara.using_wait_time 0 do
|
140
140
|
sleep 0.05 until element_exists?(*find_args, *runtime_args, visible: true)
|
@@ -147,7 +147,7 @@ module SitePrism
|
|
147
147
|
def create_invisibility_waiter(element_name, *find_args)
|
148
148
|
method_name = "wait_until_#{element_name}_invisible"
|
149
149
|
create_helper_method method_name, *find_args do
|
150
|
-
define_method method_name do |timeout =
|
150
|
+
define_method method_name do |timeout = Waiter.default_wait_time, *runtime_args|
|
151
151
|
Timeout.timeout timeout, SitePrism::TimeOutWaitingForElementInvisibility do
|
152
152
|
Capybara.using_wait_time 0 do
|
153
153
|
sleep 0.05 while element_exists?(*find_args, *runtime_args, visible: true)
|
@@ -6,5 +6,5 @@ module SitePrism
|
|
6
6
|
class TimeoutException < StandardError; end
|
7
7
|
class TimeOutWaitingForElementVisibility < StandardError; end
|
8
8
|
class TimeOutWaitingForElementInvisibility < StandardError; end
|
9
|
-
class UnsupportedBlock < StandardError;
|
9
|
+
class UnsupportedBlock < StandardError; end
|
10
10
|
end
|
data/lib/site_prism/page.rb
CHANGED
data/lib/site_prism/section.rb
CHANGED
data/lib/site_prism/version.rb
CHANGED
data/lib/site_prism/waiter.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: site_prism
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '2.
|
4
|
+
version: '2.8'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nat Ritmeyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -86,7 +86,7 @@ homepage: http://github.com/natritmeyer/site_prism
|
|
86
86
|
licenses:
|
87
87
|
- BSD3
|
88
88
|
metadata: {}
|
89
|
-
post_install_message:
|
89
|
+
post_install_message:
|
90
90
|
rdoc_options: []
|
91
91
|
require_paths:
|
92
92
|
- lib
|