capybara-simulated 0.0.2 → 0.0.3

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: 2a1b71c5bedf4ee1236631f583accd90b10e71317c00e5b20252c5b8f48477ea
4
- data.tar.gz: b1b3a3bb91e784b579cb4d465f253ed78c3bb606ef9629afe2197693114fa10b
3
+ metadata.gz: e1e7f424e6f9f01ec1c0ee1c82f237b7f3af721a9df9d8ff3afb8d90e4e7c212
4
+ data.tar.gz: 5de66b553f517a1eefa0c1e9638e3c3fce24e7aa48bc5cf87861364d9af3715d
5
5
  SHA512:
6
- metadata.gz: ba4e4836908d7f607c475321edc01592b89e53df666e531330e4283725633201622461df829b4e40c37f1ad9ba5d67d74e71fbaef14efda60c11ec7abaa6441c
7
- data.tar.gz: d6ecc0867f4ae527d483c337a7129e65e6f31fd24a5c507247df66ddb89ac1eeb98060101868f3e43f787caea6e1ad35390afd94504aff8c7f05b095fcaa1a09
6
+ metadata.gz: c51f15d934fe7b0f1fabd0129da6ed34c3c7997153c625fd40a5d740c1256e0c930bb9e58212c10570447f29612b4c3e1c9c9abad7d19a9355d0a67a50be6113
7
+ data.tar.gz: 5d26a6b74ed2fc10db774be4182413d757cb0dbdb21c729bfa1fc100e9cd0b38679e75dc42babe649f0b95d65beee6fc4af9737c2d647e4c911913888b0907d0
data/README.md CHANGED
@@ -12,15 +12,15 @@ forms submit through `Rack::MockRequest`.
12
12
 
13
13
  ## Status
14
14
 
15
- PoC. Against Capybara 3.40's shared `Capybara::SpecHelper.spec` suite the
15
+ Used in production by a Rails 8 app to run ~200 `js: true` system specs
16
+ without spawning a headless Chrome.
17
+
18
+ Against Capybara 3.40's shared `Capybara::SpecHelper.spec` suite the
16
19
  driver passes **1337 / 1357 examples (98.5%)** with the unsupported-
17
20
  capability tags `about_scheme`, `css`, `download`, `frames`, `hover`,
18
21
  `screenshot`, `scroll`, `server`, `spatial`, `windows` filtered out.
19
- Tags that started skipped but now pass: `active_element`, `modals`
20
- (alert/confirm/prompt incl. nested + page-change + async),
21
- `html_validation`, `send_keys`, `shadow_dom`. The remaining 20
22
- failures all need capabilities the driver intentionally does not
23
- implement:
22
+ The remaining 20 failures all need capabilities the driver intentionally
23
+ does not implement:
24
24
 
25
25
  - 19 `#drag_to` tests — Dragula / SortableJS / jsTree resolve drop
26
26
  targets through `elementFromPoint(clientX, clientY)`, which needs a
@@ -541,7 +541,13 @@ module Capybara
541
541
  entries = Array(details['entries'])
542
542
  return if importmap.empty? && entries.empty?
543
543
 
544
- cache_key = Digest::SHA256.hexdigest(JSON.dump([importmap, entries, @current_url]))
544
+ # Importmap + module-script entries are page-content-derived, so
545
+ # keying on them alone covers different pages of the same Rails app
546
+ # — the bundle output is identical when the inputs are. Including
547
+ # `@current_url` only suppressed cache hits across visits without
548
+ # buying any correctness; build_module_bundle was the single biggest
549
+ # cost in the suite (52% of wall time on a hot test).
550
+ cache_key = Digest::SHA256.hexdigest(JSON.dump([importmap, entries]))
545
551
  @module_bundle_cache ||= {}
546
552
  bundle = @module_bundle_cache[cache_key] ||=
547
553
  build_module_bundle(importmap, entries)
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module Simulated
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-simulated
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keita Urashima