Repository navigation
test: restructure specs by public method - #691
Merged
Merged
Conversation
Group every spec under `describe "#method"` of the class it describes, move specs of methods defined elsewhere to the matching file (Frame::DOM, Page::Frames, Target, AXNode), drop specs of private methods in favor of their public callers, and replace shared examples with helper methods so each example runs alone with `rspec file:line`.
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.
Standardizes the spec suite and records the rules in
AGENTS.md.lib/path of the class in its topdescribe, feature and unit specs alike.spec/unit/process*move underspec/unit/browser/.describenames one public method ("#method"/".method"). Topic describes and examples directly under the class are regrouped by the method they exercise; specs of methods defined elsewhere move to that class's file (newspec/frame/dom_spec.rb,spec/page/frames_spec.rb,spec/target_spec.rb,spec/accessibility/ax_node_spec.rb).let/hooks/tags; no nested contexts. Example names start with a third-person verb.Browser#debug_urlis covered through#debug,Process#parse_ws_urlthrough#start.rspec file:line; shared steps live in helper methods. The data tables inspec/unit/frame/script_spec.rbare the one exception.#resizefullscreen specs, where twoinclude_examplesoverrode each other'slet(:path)and the/custom_html_sizecase never ran.Example names change throughout; no example was dropped except two identical copies of "resets element positions after" in the screenshot spec.