tapestry 0.2.0 → 0.3.0
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/.hound.yml +4 -0
- data/Rakefile +3 -3
- data/lib/tapestry/element.rb +1 -1
- data/lib/tapestry/extensions/data_setter.rb +1 -0
- data/lib/tapestry/extensions/dom_observer.rb +26 -20
- data/lib/tapestry/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97071b0620b77a712b23f55c7cc963490c44a1f2
|
4
|
+
data.tar.gz: 4638ffbd0eca52923e7c317daecf832fd8c9d307
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96a87aeb47a636fc773324ad9ce9dd021819d3117a18afb1ee46c8ef5aaebf0954b493dc3e452b24046e8f30964694e765bfdfb67f17eeec9c6f7f3acd1f55f6
|
7
|
+
data.tar.gz: ea2fb3473c7ba52f15126039d44adf2670c610ca5f21be1a316507b134eb707ba059273cef2ad71562cca7479b05b6579ae82e62fcbb1301cb9205acbce0d53d
|
data/.hound.yml
CHANGED
data/Rakefile
CHANGED
@@ -32,9 +32,9 @@ namespace :spec do
|
|
32
32
|
end
|
33
33
|
|
34
34
|
RSpec::Core::RakeTask.new(all: :clean) do |config|
|
35
|
-
options = %w
|
36
|
-
options += %w
|
37
|
-
options += %w
|
35
|
+
options = %w[--color]
|
36
|
+
options += %w[--format documentation]
|
37
|
+
options += %w[--format html --out spec/reports/unit-test-report.html]
|
38
38
|
|
39
39
|
config.rspec_opts = options
|
40
40
|
end
|
data/lib/tapestry/element.rb
CHANGED
@@ -44,26 +44,32 @@ module Watir
|
|
44
44
|
# to set your own value, which can be useful for particular sensitivities
|
45
45
|
# in the application you are testing.
|
46
46
|
def dom_updated?(delay: 1.1)
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
47
|
+
element_call do
|
48
|
+
begin
|
49
|
+
driver.manage.timeouts.script_timeout = delay + 1
|
50
|
+
driver.execute_async_script(DOM_OBSERVER, wd, delay)
|
51
|
+
rescue Selenium::WebDriver::Error::StaleElementReferenceError
|
52
|
+
# This situation can occur when the DOM changes between two calls to
|
53
|
+
# some element or aspect of the page. In this case, we are expecting
|
54
|
+
# the DOM to be different so what's being handled here are those hard
|
55
|
+
# to anticipate race conditions when "weird things happen" and DOM
|
56
|
+
# updating plus script execution get interleaved.
|
57
|
+
retry
|
58
|
+
rescue Selenium::WebDriver::Error::JavascriptError => e
|
59
|
+
# This situation can occur if the script execution has started before
|
60
|
+
# a new page is fully loaded. The specific error being checked for
|
61
|
+
# here is one that occurs when a new page is loaded as that page is
|
62
|
+
# trying to execute a JavaScript function.
|
63
|
+
retry if e.message.include?(
|
64
|
+
'document unloaded while waiting for result'
|
65
|
+
)
|
66
|
+
raise
|
67
|
+
ensure
|
68
|
+
# Note that this setting here means any user-defined timeout would
|
69
|
+
# effectively be overwritten.
|
70
|
+
driver.manage.timeouts.script_timeout = 1
|
71
|
+
end
|
72
|
+
end
|
67
73
|
end
|
68
74
|
|
69
75
|
alias dom_has_updated? dom_updated?
|
data/lib/tapestry/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tapestry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Nyman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -151,7 +151,7 @@ licenses:
|
|
151
151
|
- MIT
|
152
152
|
metadata: {}
|
153
153
|
post_install_message: "\n(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n
|
154
|
-
\ Tapestry 0.
|
154
|
+
\ Tapestry 0.3.0 has been installed.\n(::) (::) (::) (::) (::) (::) (::) (::) (::)
|
155
155
|
(::) (::) (::)\n "
|
156
156
|
rdoc_options: []
|
157
157
|
require_paths:
|
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
170
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.6.
|
171
|
+
rubygems_version: 2.6.11
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: Weaving a semantic DSL to construct fluent interfaces for test execution
|