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 +4 -4
- data/README.md +6 -6
- data/lib/capybara/simulated/browser.rb +7 -1
- data/lib/capybara/simulated/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e1e7f424e6f9f01ec1c0ee1c82f237b7f3af721a9df9d8ff3afb8d90e4e7c212
|
|
4
|
+
data.tar.gz: 5de66b553f517a1eefa0c1e9638e3c3fce24e7aa48bc5cf87861364d9af3715d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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
|
-
|
|
20
|
-
|
|
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
|
-
|
|
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)
|