Repository navigation
test: clean up skipped specs and fix the bugs they hid - #662
Merged
Merged
Conversation
Unskip specs that pass now: saving an attachment to an absolute path (Chromium 1444729 is fixed), clicking inside an svg, and window positioning on headless macOS. Fix specs with wrong assertions: network latency emulation, the change event that fires only on blur, whitespace that Chrome keeps in text and inner text, and the empty Network#request, #response and #status placeholders. Remove specs for the Capybara API that Ferrum doesn't have: attach_file, drag_to, native, MouseEventFailed for obscured clicks, and a datepicker spec with no view.
When Chrome can't compute content quads, Node#click falls back to the bounding rect, but it added the page scroll offset to it, so on a scrolled page the click missed the element.
do_CONNECT was copied from WEBrick, where CRLF, LF and NullReader resolve inside module WEBrick. In Ferrum::Proxy::HTTPProxyServer they raised NameError, so every CONNECT to an upstream proxy failed with ERR_TUNNEL_CONNECTION_FAILED, and the request line after a CONNECT was never cleared.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Goes through every skipped spec on main: un-skips the ones that pass now, fixes or removes the rest, and fixes two bugs the skips were hiding.
Fixed
Proxy#rotateto an upstream proxy failed every HTTPS request withERR_TUNNEL_CONNECTION_FAILED.do_CONNECTwas copied from WEBrick and usedCRLF,LFandNullReaderunqualified, which raisedNameErroroutsidemodule WEBrick. The fakeapi.ipify.orgspec is replaced with one that rotates to a local upstream proxy.Node#clickfalls back to the bounding rect, but it added the page scroll offset and missed the element on a scrolled page.Un-skipped
#position=on headless macOS.text/inner_textnow assert what Chrome returns.Network#request,#responseand#statusget real specs instead of empty placeholders.Node#clickstays a plain click like a real user's, so these specs callscroll_into_viewfirst. Quads inside frames were already correct.Removed
attach_file,drag_to,native,MouseEventFailedfor obscured clicks, image map<area>clicks, headers propagating across windows, and a datepicker spec without a view.Also clarifies in AGENTS.md that a browser-driven spec with one stub stays a feature spec.