capybara-lockstep 0.3.1 → 0.3.2

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
  SHA256:
3
- metadata.gz: c4c87e5cabd504735dfc07b20021d109d65b74aed53ec173f390c07a2dc6086a
4
- data.tar.gz: 2c8f7f1520282284f3b6eb93ddfa0d6109628ee36721c3ba90eba9f05fe565eb
3
+ metadata.gz: d0d733ed210e1ba465d9d612fcf461618ee91c88a71b09f9c0020271e4ac28ef
4
+ data.tar.gz: 5f30713c033ebd57b30d37f27e545c2a4547f6d40cd013c15f4ebba50a1f3893
5
5
  SHA512:
6
- metadata.gz: 0742d9204b35230452220c6cebd3020999f1531530c201180c31ccff3add24973764a232333de5585e3d1180b220535542e1e2c8a04b55b51c5bd388d6578f17
7
- data.tar.gz: 93915d9472fe5af20a864de61dc765a0eea708a80cf69bed9d0ccde54c0310e0d0c7767b9bc4a39af1fd4d8270e2a8cd3eea0982e6a0a8a512d09a829ac1f291
6
+ metadata.gz: d8fcf72c9736d98a80661f282527f0f53affb22b5aa2b537f7e7fbc4ea246ca2886e4f798343654c984321ca3d7dfec25043fa8e70d4341558a9073ea69911fe
7
+ data.tar.gz: c1f5144ed73a92f33e6ac36a0838401efae44d26ec199857f0e85a99b07afcd780d558ee6f3e859ac393db11649d186c8d56f72ddd6c2629fcddd68c2af907c0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capybara-lockstep (0.3.1)
4
+ capybara-lockstep (0.3.2)
5
5
  activesupport (>= 3.2)
6
6
  capybara (>= 2.0)
7
7
  selenium-webdriver (>= 3)
data/README.md CHANGED
@@ -187,7 +187,7 @@ capybara-lockstep may or may not impact the runtime of your test suite. It depen
187
187
 
188
188
  While waiting for the browser to be idle does take a few milliseconds, Capybara no longer needs to retry failed commands. You will also save time from not needing to re-run failed tests.
189
189
 
190
- In casual testing I experienced a negative performance impact between 0% and 10%.
190
+ In casual testing I experienced a performance impact between +/- 10%.
191
191
 
192
192
 
193
193
  ## Debugging log
@@ -19,6 +19,7 @@ module Capybara
19
19
 
20
20
  ERROR_SNIPPET_MISSING = 'Cannot synchronize: Capybara::Lockstep JavaScript snippet is missing on page'
21
21
  ERROR_PAGE_MISSING = 'Cannot synchronize before initial Capybara visit'
22
+ ERROR_ALERT_OPEN = 'Cannot synchronize while an alert is open'
22
23
 
23
24
  def synchronize(lazy: false)
24
25
  if (lazy && synchronized?) || @synchronizing || disabled?
@@ -63,6 +64,11 @@ module Capybara
63
64
  self.synchronized = true
64
65
  end
65
66
  end
67
+ rescue ::Selenium::WebDriver::Error::UnexpectedAlertOpenError
68
+ log ERROR_ALERT_OPEN
69
+ @synchronized = false
70
+ # Don't raise an error, this will happen in an innocent test.
71
+ # We will retry on the next Capybara synchronize call.
66
72
  rescue StandardError => e
67
73
  log "#{e.class.name} while synchronizing: #{e.message}"
68
74
  @synchronized = false
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module Lockstep
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-lockstep
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  requirements: []
103
- rubygems_version: 3.2.6
103
+ rubygems_version: 3.2.5
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: Synchronize Capybara commands with client-side JavaScript and AJAX requests