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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/capybara-lockstep/lockstep.rb +6 -0
- data/lib/capybara-lockstep/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0d733ed210e1ba465d9d612fcf461618ee91c88a71b09f9c0020271e4ac28ef
|
4
|
+
data.tar.gz: 5f30713c033ebd57b30d37f27e545c2a4547f6d40cd013c15f4ebba50a1f3893
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8fcf72c9736d98a80661f282527f0f53affb22b5aa2b537f7e7fbc4ea246ca2886e4f798343654c984321ca3d7dfec25043fa8e70d4341558a9073ea69911fe
|
7
|
+
data.tar.gz: c1f5144ed73a92f33e6ac36a0838401efae44d26ec199857f0e85a99b07afcd780d558ee6f3e859ac393db11649d186c8d56f72ddd6c2629fcddd68c2af907c0
|
data/Gemfile.lock
CHANGED
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
|
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
|
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.
|
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.
|
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
|