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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
9d4a04ff
Commit
9d4a04ff
authored
Jan 28, 2022
by
Andrejs Cunskis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
E2E: Handle multiple quarantine issue links for allure report
parent
e1848581
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
2 deletions
+30
-2
qa/qa/support/formatters/allure_metadata_formatter.rb
qa/qa/support/formatters/allure_metadata_formatter.rb
+30
-2
No files found.
qa/qa/support/formatters/allure_metadata_formatter.rb
View file @
9d4a04ff
...
...
@@ -15,14 +15,42 @@ module QA
def
example_started
(
example_notification
)
example
=
example_notification
.
example
quarantine_issue
=
example
.
metadata
.
dig
(
:quarantine
,
:issue
)
example
.
issue
(
'Quarantine issue'
,
quarantine_issue
)
if
quarantine_issue
add_quarantine_issue_link
(
example
)
add_failure_issues_link
(
example
)
add_ci_job_link
(
example
)
end
private
# Add quarantine issue links
#
# @param [RSpec::Core::Example] example
# @return [void]
def
add_quarantine_issue_link
(
example
)
issue_link
=
example
.
metadata
.
dig
(
:quarantine
,
:issue
)
return
unless
issue_link
return
example
.
issue
(
'Quarantine issue'
,
issue_link
)
if
issue_link
.
is_a?
(
String
)
return
issue_link
.
each
{
|
link
|
example
.
issue
(
'Quarantine issue'
,
link
)
}
if
issue_link
.
is_a?
(
Array
)
end
# Add failure issues link
#
# @param [RSpec::Core::Example] example
# @return [void]
def
add_failure_issues_link
(
example
)
spec_file
=
example
.
file_path
.
split
(
'/'
).
last
example
.
issue
(
'Failure issues'
,
"https://gitlab.com/gitlab-org/gitlab/-/issues?scope=all&state=opened&search=
#{
spec_file
}
"
)
end
# Add ci job link
#
# @param [RSpec::Core::Example] example
# @return [void]
def
add_ci_job_link
(
example
)
return
unless
Runtime
::
Env
.
running_in_ci?
example
.
add_link
(
name:
"Job(
#{
Runtime
::
Env
.
ci_job_name
}
)"
,
url:
Runtime
::
Env
.
ci_job_url
)
...
...
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