Skip to content

test: cover the public methods that had no spec - #692

Merged
route merged 2 commits into
mainfrom
test/missing-specs
Nov 1, 2026
Merged

route merged 2 commits into
mainfrom
test/missing-specs

Conversation

@route

@route route commented Nov 1, 2026

Copy link
Copy Markdown
Member

Now that specs follow the structure in AGENTS.md (one describe per public method), it's easy to see which methods have none. This adds them.

  • Node: #description, #tag_name, #node?, #frame, #focus, #blur, #hover, #scroll_into_view, #in_viewport?, #wait_for_stop_moving, #value, #attribute, #evaluate_handle, #find_position. The old #[] examples that tested getAttribute moved to #attribute, and the SVG tests context became a flat example.
  • Page, Frame, Page::Frames, Page::Screenshot: #close, #position, #window_bounds/=, #window_id, #refresh, #stop, #remove_script_on_new_document, #activate, #command, #document_node_id, frame state/title/main?/idle?/isolated worlds, #frames, #main_frame, #frame_by lookups, #device_pixel_ratio, #document_size.
  • Network: Network#cache and the public methods of Request, Response, InterceptedRequest, AuthRequest, Exchange.
  • Others: Console collection methods, Console::Message (new file), Keyboard, Mouse#down/#up, RemoteObject (new file), Cookie#samesite, Dialog, Context, Contexts, Target, Worker.

Aliases, #inspect and internal plumbing are left out.

Not covered because they're broken in lib/, to be fixed separately:

  • InterceptedRequest#navigation_request? and AuthRequest#navigation_request? always return nil.
  • AuthRequest#abort raises authChallengeResponse required.
  • page.on(:request, &:continue) never continues the request.
  • Target#title doesn't update after navigation.
  • Worker#close doesn't close dedicated workers, but returns true.

route added 2 commits November 1, 2026 18:29
Add a describe for every public method of Node, Page, Frame, Page::Frames, Page::Screenshot, the network models,
Console, Console::Message, Keyboard, Mouse, RemoteObject, Cookie, Dialog, Context, Contexts, Target and Worker
that had none. Move Node#attribute examples out of #[] and remove_script_on_new_document's out of
evaluate_on_new_document.
@route
route merged commit d55a261 into main Nov 1, 2026
7 checks passed
@route
route deleted the test/missing-specs branch November 1, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant