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
c8e11221
Commit
c8e11221
authored
May 07, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
551b3a37
22f49d16
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
2 deletions
+42
-2
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue
...ue_merge_request_widget/components/mr_widget_pipeline.vue
+2
-2
changelogs/unreleased/60462-empty-pipeline-section.yml
changelogs/unreleased/60462-empty-pipeline-section.yml
+5
-0
spec/features/merge_request/user_sees_merge_widget_spec.rb
spec/features/merge_request/user_sees_merge_widget_spec.rb
+22
-0
spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js
...ripts/vue_mr_widget/components/mr_widget_pipeline_spec.js
+13
-0
No files found.
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue
View file @
c8e11221
...
...
@@ -93,8 +93,8 @@ export default {
};
</
script
>
<
template
>
<div
v-if=
"hasPipeline || hasCIError"
class=
"ci-widget media js-ci-widget"
>
<template
v-if=
"hasCIError"
>
<div
class=
"ci-widget media js-ci-widget"
>
<template
v-if=
"
!hasPipeline ||
hasCIError"
>
<div
class=
"add-border ci-status-icon ci-status-icon-failed ci-error js-ci-error append-right-default"
>
...
...
changelogs/unreleased/60462-empty-pipeline-section.yml
0 → 100644
View file @
c8e11221
---
title
:
Fix empty block in MR widget when user doesn't have permission
merge_request
:
27462
author
:
type
:
fixed
spec/features/merge_request/user_sees_merge_widget_spec.rb
View file @
c8e11221
...
...
@@ -670,4 +670,26 @@ describe 'Merge request > User sees merge widget', :js do
end
end
end
context
'when MR has pipeline but user does not have permission'
do
let
(
:sha
)
{
project
.
commit
(
merge_request
.
source_branch
).
sha
}
let!
(
:pipeline
)
{
create
(
:ci_pipeline_without_jobs
,
status:
'success'
,
sha:
sha
,
project:
project
,
ref:
merge_request
.
source_branch
)
}
before
do
project
.
update
(
visibility_level:
Gitlab
::
VisibilityLevel
::
PUBLIC
,
public_builds:
false
)
merge_request
.
update!
(
head_pipeline:
pipeline
)
sign_out
(
:user
)
visit
project_merge_request_path
(
project
,
merge_request
)
end
it
'renders a CI pipeline error'
do
within
'.ci-widget'
do
expect
(
page
).
to
have_content
(
'Could not retrieve the pipeline status.'
)
end
end
end
end
spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js
View file @
c8e11221
...
...
@@ -78,6 +78,19 @@ describe('MRWidgetPipeline', () => {
);
});
it
(
'
should render CI error when no pipeline is provided
'
,
()
=>
{
vm
=
mountComponent
(
Component
,
{
pipeline
:
{},
hasCi
:
true
,
ciStatus
:
'
success
'
,
troubleshootingDocsPath
:
'
help
'
,
});
expect
(
vm
.
$el
.
querySelector
(
'
.media-body
'
).
textContent
.
trim
()).
toContain
(
'
Could not retrieve the pipeline status. For troubleshooting steps, read the documentation.
'
,
);
});
describe
(
'
with a pipeline
'
,
()
=>
{
beforeEach
(()
=>
{
vm
=
mountComponent
(
Component
,
{
...
...
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