Repository navigation
test: cover the public methods that had no spec - #692
Merged
Merged
Conversation
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.
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.
Now that specs follow the structure in AGENTS.md (one
describeper public method), it's easy to see which methods have none. This adds them.#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 testedgetAttributemoved to#attribute, and theSVG testscontext became a flat example.#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_bylookups,#device_pixel_ratio,#document_size.Network#cacheand the public methods ofRequest,Response,InterceptedRequest,AuthRequest,Exchange.Consolecollection methods,Console::Message(new file),Keyboard,Mouse#down/#up,RemoteObject(new file),Cookie#samesite,Dialog,Context,Contexts,Target,Worker.Aliases,
#inspectand internal plumbing are left out.Not covered because they're broken in
lib/, to be fixed separately:InterceptedRequest#navigation_request?andAuthRequest#navigation_request?always return nil.AuthRequest#abortraisesauthChallengeResponse required.page.on(:request, &:continue)never continues the request.Target#titledoesn't update after navigation.Worker#closedoesn't close dedicated workers, but returns true.