This repository was archived by the owner on Sep 30, 2026. It is now read-only.
Repository navigation
Position axe-cuprite as Cuprite-only (#31) - #34
Merged
Merged
Conversation
Drop the "works with any real-browser Capybara driver" claim from the README, gemspec description, and AGENTS.md. Cuprite is the only supported and tested driver; the driver-neutral JS API is now framed as the implementation detail that makes the gem work on Cuprite and avoid Selenium internals, not a promise of broad driver support. The best-effort non-Ferrum fallback in Injector#evaluate_axe is kept but documented as unsupported/untested. Add a unit test pinning that fallback: with no Ferrum page, evaluate_axe routes through evaluate_async_script under the explicit timeout rather than Capybara.default_max_wait_time, so the path can't silently break.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #31.
Problem
The README, gemspec
description, andAGENTS.mdadvertised that axe-cuprite works on "any real-browser Capybara driver," with driver-agnosticism framed as a bonus. That bonus is neither tested nor fully supported — the non-Ferrum fallback inInjector#evaluate_axehas zero coverage (every spec runs under Cuprite, whereferrum_pageis always truthy), andtimeout_error?only recognizes Ferrum timeout classes. Advertising support we don't test invites bug reports we can't reproduce.Changes
Reposition as Cuprite-only (docs):
README.md— "Why this gem exists" now states Cuprite is the only supported and tested driver, while keeping the honest engineering note that axe is driven through Capybara's driver-neutral JS API (which is why it works where the official gem doesn't). The Timeout caveat now labels the non-Ferrumevaluate_async_scriptfallback as best-effort/untested.axe-cuprite.gemspec—descriptiondrops the "any other real-browser driver" claim.AGENTS.md— replaces "staying driver-agnostic is a bonus" with the Cuprite-only positioning (CLAUDE.mdsymlinks to it).Keep the fallback, just stop advertising it: the best-effort non-Ferrum path in
Injector#evaluate_axeis unchanged, and the Cuprite-onlytimeout_error?classification is left as-is (acceptable per the issue once the broad-driver claim is dropped).New spec (the issue's optional follow-up): added a
#evaluate_axe non-Ferrum fallbackgroup tospec/injector_spec.rb. Instead of stubbing the subject, it givespage.driveran object with no#browser, so the realferrum_pagereturnsniland forces the fallback. It asserts the fallback (a) callsevaluate_async_scriptwithRUN_JS/context/options, and (b) runs under the explicit timeout (17s), notCapybara.default_max_wait_time(2s), restoring the wait time afterward — so the best-effort path can't silently break.Verification
bundle exec rspec— 66 examples, 0 failuresbundle exec rubocop spec/injector_spec.rb— clean