Fix wrong number of argument
What does this MR do and why?
Describe in detail what your merge request does and why.
Fix ArgumentError: wrong number of arguments (given 2, expected 1)
seen in 2 tests clone_push_pull_personal_snippet_spec
& create_project_snippet_spec
.
I think what happens here is that has_file_name?
calls within_file_by_number
and originally it is
def within_file_by_number(element, file_number)
method = file_number ? 'within_element_by_index' : 'within_element'
send(method, element, file_number) { yield }
end
So when file_number is nil
we are sending within_element(element, nil)
and hitting the above error. I ran into the same error against GDK and test passed with this small tweak
Also fix #326391 (closed), #346466 (closed), #346501 (closed) & #346502 (closed) since these are small fix and all snippets related
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #346464 (closed)