Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
441dee4c
Commit
441dee4c
authored
Dec 28, 2018
by
Mark Lapierre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log text_filter arg of find_element
parent
e962baf4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
qa/qa/support/page/logging.rb
qa/qa/support/page/logging.rb
+5
-2
qa/spec/page/logging_spec.rb
qa/spec/page/logging_spec.rb
+9
-0
No files found.
qa/qa/support/page/logging.rb
View file @
441dee4c
...
...
@@ -37,8 +37,11 @@ module QA
exists
end
def
find_element
(
name
,
wait:
Capybara
.
default_max_wait_time
)
log
(
"finding :
#{
name
}
(wait:
#{
wait
}
)"
)
def
find_element
(
name
,
text_filter
=
nil
,
wait:
Capybara
.
default_max_wait_time
)
msg
=
[
"finding :
#{
name
}
"
]
msg
<<
%Q(with text_filter "
#{
text_filter
}
")
if
text_filter
msg
<<
"(wait:
#{
wait
}
)"
log
(
msg
.
compact
.
join
(
' '
))
element
=
super
...
...
qa/spec/page/logging_spec.rb
View file @
441dee4c
...
...
@@ -47,6 +47,15 @@ describe QA::Support::Page::Logging do
it
'logs find_element'
do
expect
{
subject
.
find_element
(
:element
)
}
.
to
output
(
/finding :element/
).
to_stdout_from_any_process
expect
{
subject
.
find_element
(
:element
)
}
.
to
output
(
/found :element/
).
to_stdout_from_any_process
end
it
'logs find_element with text_filter'
do
expect
{
subject
.
find_element
(
:element
,
'foo'
)
}
.
to
output
(
/finding :element with text_filter "foo"/
).
to_stdout_from_any_process
expect
{
subject
.
find_element
(
:element
,
'foo'
)
}
.
to
output
(
/found :element/
).
to_stdout_from_any_process
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment