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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c86a3e97f5b536ef792a2f328ab1c89730dba52
4
- data.tar.gz: 05868d9a03e465878d552706e4fb1edf9d7b0c54
3
+ metadata.gz: 97071b0620b77a712b23f55c7cc963490c44a1f2
4
+ data.tar.gz: 4638ffbd0eca52923e7c317daecf832fd8c9d307
5
5
  SHA512:
6
- metadata.gz: cde8c77355467aa19b00036ec2c5d7005a030bafc7c8fda922c038904bdbd360695ee00f2add1e79cbda1647bedae1ed189c02f258644ab3deaf0317df63cebf
7
- data.tar.gz: c0acd68c6e51f6eea985c4add3c6a4b071bd8865fa9e6be67431a253478f00c1709f7b9ff8d9e33650e3cdfbcef68cbf60e0010cf75be48280da4d4292db2dfb
6
+ metadata.gz: 96a87aeb47a636fc773324ad9ce9dd021819d3117a18afb1ee46c8ef5aaebf0954b493dc3e452b24046e8f30964694e765bfdfb67f17eeec9c6f7f3acd1f55f6
7
+ data.tar.gz: ea2fb3473c7ba52f15126039d44adf2670c610ca5f21be1a316507b134eb707ba059273cef2ad71562cca7479b05b6579ae82e62fcbb1301cb9205acbce0d53d
data/.hound.yml CHANGED
@@ -66,3 +66,7 @@ Style/PredicateName:
66
66
  NameWhitelist:
67
67
  - has_correct_url?
68
68
  - has_correct_title?
69
+
70
+ # Remove execute permissions check.
71
+ Lint/ScriptPermission:
72
+ Enabled: false
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(--color)
36
- options += %w(--format documentation)
37
- options += %w(--format html --out spec/reports/unit-test-report.html)
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
@@ -3,7 +3,7 @@ require "watir"
3
3
  module Tapestry
4
4
  module_function
5
5
 
6
- NATIVE_QUALIFIERS = %i(visible).freeze
6
+ NATIVE_QUALIFIERS = %i[visible].freeze
7
7
 
8
8
  def elements?
9
9
  @elements
@@ -66,6 +66,7 @@ module Tapestry
66
66
  alias use_data using
67
67
  alias using_values using
68
68
  alias use_values using
69
+ alias use using
69
70
 
70
71
  private
71
72
 
@@ -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
- driver.manage.timeouts.script_timeout = delay + 1
48
- driver.execute_async_script(DOM_OBSERVER, wd, delay)
49
- rescue Selenium::WebDriver::Error::StaleElementReferenceError
50
- # This situation can occur when the DOM changes between two calls to
51
- # some element or aspect of the page. In this case, we are expecting
52
- # the DOM to be different so what's being handled here are those hard
53
- # to anticipate race conditions when "weird things happen" and DOM
54
- # updating plus script execution get interleaved.
55
- retry
56
- rescue Selenium::WebDriver::Error::JavascriptError => e
57
- # This situation can occur if the script execution has started before
58
- # a new page is fully loaded. The specific error being checked for here
59
- # is one that occurs when a new page is loaded as that page is trying
60
- # to execute a JavaScript function.
61
- retry if e.message.include?('document unloaded while waiting for result')
62
- raise
63
- ensure
64
- # Note that this setting here means any user-defined timeout would
65
- # effectively be overwritten.
66
- driver.manage.timeouts.script_timeout = 1
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?
@@ -1,7 +1,7 @@
1
1
  module Tapestry
2
2
  module_function
3
3
 
4
- VERSION = "0.2.0".freeze
4
+ VERSION = "0.3.0".freeze
5
5
 
6
6
  def version
7
7
  """
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.2.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-02-02 00:00:00.000000000 Z
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.2.0 has been installed.\n(::) (::) (::) (::) (::) (::) (::) (::) (::)
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.10
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