capybara-lockstep 1.2.0 → 1.2.1

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: ec0d3874212ec29a338fa16ef831e76c0b8dc65b4a200f3a305b7ce41bd76957
4
- data.tar.gz: b5d48346fb7224b2154512534757ef96638f1df9cc62f9d0f911aac8d6a5f846
3
+ metadata.gz: e9207a7671ab6f25999a138df922afb783ec3267257eadfab1b179f3c26eb88d
4
+ data.tar.gz: 2ddfe3a9a10143894afdc2eb2517ddeeaf76311e3365693606359282004a598d
5
5
  SHA512:
6
- metadata.gz: 4d44c17fa50ca0fd386b34ecea302148989f4d48d63c48820bcfff75bcd51c63cfbacea0053e63fc1c27f6347fbe252f14be83372aed123a6a1c2574328fe42e
7
- data.tar.gz: 9e7f5cfcbb6b3750277bc55c37484e17859aa4d96f1b8f7b6c1865f4467ae00fad5311e11ea0bfc73d5b8ec5c925df5c8ec6bb2473da6b431296736c89972794
6
+ metadata.gz: dffa87e401d189b8afea6bb72b49bb14a6f9865d306fc7a838e50b4fb4dfc715fe8930502b9e3e2b4139c214b45eefe189c0ddb8e3e867d30d3021331ba76ea3
7
+ data.tar.gz: b311ee487b65ae42dc5dcc114cdd2aca2ff39ed49953fe43959ecf8578b3691740ebd2019aeae95fc87334cc5b87835f18b1f816ed2ad0a234e6475b549baad8
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file.
2
2
 
3
3
  This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
4
4
 
5
+
6
+ ## 1.2.1 - 2022-09-12
7
+
8
+ - Synchronize with pages constructed from non-empty [data URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs)
9
+
5
10
  ## 1.2.0 - 2022-09-12
6
11
 
7
12
  ### Synchronization around history navigation
data/Gemfile CHANGED
@@ -14,3 +14,5 @@ gem 'chrome_remote'
14
14
 
15
15
  gem 'byebug'
16
16
  gem 'gemika'
17
+
18
+ gem 'activesupport', '~> 6.0'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capybara-lockstep (1.2.0)
4
+ capybara-lockstep (1.2.1)
5
5
  activesupport (>= 3.2)
6
6
  capybara (>= 2.0)
7
7
  ruby2_keywords
@@ -10,15 +10,16 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activesupport (7.0.1)
13
+ activesupport (6.1.7)
14
14
  concurrent-ruby (~> 1.0, >= 1.0.2)
15
15
  i18n (>= 1.6, < 2)
16
16
  minitest (>= 5.1)
17
17
  tzinfo (~> 2.0)
18
- addressable (2.8.0)
19
- public_suffix (>= 2.0.2, < 5.0)
18
+ zeitwerk (~> 2.3)
19
+ addressable (2.8.1)
20
+ public_suffix (>= 2.0.2, < 6.0)
20
21
  byebug (11.1.3)
21
- capybara (3.36.0)
22
+ capybara (3.37.1)
22
23
  addressable
23
24
  matrix
24
25
  mini_mime (>= 0.1.3)
@@ -35,7 +36,7 @@ GEM
35
36
  diff-lcs (1.3)
36
37
  eventmachine (1.2.7)
37
38
  gemika (0.6.0)
38
- i18n (1.10.0)
39
+ i18n (1.12.0)
39
40
  concurrent-ruby (~> 1.0)
40
41
  jasmine (3.6.0)
41
42
  jasmine-core (~> 3.6.0)
@@ -45,17 +46,17 @@ GEM
45
46
  jasmine-core (3.6.0)
46
47
  matrix (0.4.2)
47
48
  mini_mime (1.1.2)
48
- minitest (5.15.0)
49
- nokogiri (1.13.0-x86_64-linux)
49
+ minitest (5.16.3)
50
+ nokogiri (1.13.8-x86_64-linux)
50
51
  racc (~> 1.4)
51
52
  phantomjs (2.1.1.0)
52
- public_suffix (4.0.6)
53
+ public_suffix (5.0.0)
53
54
  racc (1.6.0)
54
55
  rack (2.2.3)
55
- rack-test (1.1.0)
56
- rack (>= 1.0, < 3)
56
+ rack-test (2.0.2)
57
+ rack (>= 1.3)
57
58
  rake (13.0.1)
58
- regexp_parser (2.2.0)
59
+ regexp_parser (2.5.0)
59
60
  rexml (3.2.5)
60
61
  rspec (3.7.0)
61
62
  rspec-core (~> 3.7.0)
@@ -72,26 +73,30 @@ GEM
72
73
  rspec-support (3.7.0)
73
74
  ruby2_keywords (0.0.5)
74
75
  rubyzip (2.3.2)
75
- selenium-webdriver (4.1.0)
76
+ selenium-webdriver (4.4.0)
76
77
  childprocess (>= 0.5, < 5.0)
77
78
  rexml (~> 3.2, >= 3.2.5)
78
- rubyzip (>= 1.2.2)
79
+ rubyzip (>= 1.2.2, < 3.0)
80
+ websocket (~> 1.0)
79
81
  thin (1.8.0)
80
82
  daemons (~> 1.0, >= 1.0.9)
81
83
  eventmachine (~> 1.0, >= 1.0.4)
82
84
  rack (>= 1, < 3)
83
- tzinfo (2.0.4)
85
+ tzinfo (2.0.5)
84
86
  concurrent-ruby (~> 1.0)
87
+ websocket (1.2.9)
85
88
  websocket-driver (0.7.3)
86
89
  websocket-extensions (>= 0.1.0)
87
90
  websocket-extensions (0.1.5)
88
91
  xpath (3.2.0)
89
92
  nokogiri (~> 1.8)
93
+ zeitwerk (2.6.0)
90
94
 
91
95
  PLATFORMS
92
96
  ruby
93
97
 
94
98
  DEPENDENCIES
99
+ activesupport (~> 6.0)
95
100
  byebug
96
101
  capybara-lockstep!
97
102
  chrome_remote
@@ -1,7 +1,7 @@
1
1
  module Capybara
2
2
  module Lockstep
3
3
  ERROR_SNIPPET_MISSING = 'Cannot synchronize: capybara-lockstep JavaScript snippet is missing'
4
- ERROR_PAGE_MISSING = 'Cannot synchronize before initial Capybara visit'
4
+ ERROR_PAGE_MISSING = 'Cannot synchronize with empty page'
5
5
  ERROR_ALERT_OPEN = 'Cannot synchronize while an alert is open'
6
6
  ERROR_NAVIGATED_AWAY = "Browser navigated away while synchronizing"
7
7
 
@@ -85,8 +85,8 @@ module Capybara
85
85
  done(#{ERROR_SNIPPET_MISSING.to_json})
86
86
  }
87
87
  }
88
- let protocol = location.protocol
89
- if (protocol === 'data:' || protocol == 'about:') {
88
+ const emptyDataURL = /^data:[^,]*,?$/
89
+ if (emptyDataURL.test(location.href) || location.protocol === 'about:') {
90
90
  done(#{ERROR_PAGE_MISSING.to_json})
91
91
  } else if (document.readyState === 'complete') {
92
92
  // WebDriver always waits for the `load` event after a visit(),
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module Lockstep
3
- VERSION = "1.2.0"
3
+ VERSION = "1.2.1"
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: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch