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
b6dfecb7
Commit
b6dfecb7
authored
Jun 17, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
cf1da166
c6cf5291
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
54 additions
and
147 deletions
+54
-147
app/assets/javascripts/jobs/components/stages_dropdown.vue
app/assets/javascripts/jobs/components/stages_dropdown.vue
+3
-8
app/assets/javascripts/pipelines/components/header_component.vue
...ets/javascripts/pipelines/components/header_component.vue
+0
-2
app/assets/javascripts/pipelines/components/pipeline_url.vue
app/assets/javascripts/pipelines/components/pipeline_url.vue
+4
-9
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue
...ue_merge_request_widget/components/mr_widget_pipeline.vue
+3
-8
app/assets/javascripts/vue_shared/components/ci_pipeline_link.vue
...ts/javascripts/vue_shared/components/ci_pipeline_link.vue
+0
-32
app/assets/javascripts/vue_shared/components/header_ci_component.vue
...javascripts/vue_shared/components/header_ci_component.vue
+3
-17
app/serializers/pipeline_entity.rb
app/serializers/pipeline_entity.rb
+0
-1
app/views/projects/ci/builds/_build.html.haml
app/views/projects/ci/builds/_build.html.haml
+2
-3
app/views/projects/commit/_commit_box.html.haml
app/views/projects/commit/_commit_box.html.haml
+1
-1
changelogs/unreleased/57414-show-pipeline-iid.yml
changelogs/unreleased/57414-show-pipeline-iid.yml
+0
-5
spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb
.../merge_request/user_merges_when_pipeline_succeeds_spec.rb
+1
-1
spec/features/merge_request/user_sees_merge_widget_spec.rb
spec/features/merge_request/user_sees_merge_widget_spec.rb
+5
-5
spec/features/projects/commits/user_browses_commits_spec.rb
spec/features/projects/commits/user_browses_commits_spec.rb
+1
-1
spec/features/projects/jobs/user_browses_jobs_spec.rb
spec/features/projects/jobs/user_browses_jobs_spec.rb
+0
-6
spec/features/projects/jobs_spec.rb
spec/features/projects/jobs_spec.rb
+1
-1
spec/javascripts/jobs/components/stages_dropdown_spec.js
spec/javascripts/jobs/components/stages_dropdown_spec.js
+10
-11
spec/javascripts/jobs/mock_data.js
spec/javascripts/jobs/mock_data.js
+0
-1
spec/javascripts/pipelines/mock_data.js
spec/javascripts/pipelines/mock_data.js
+0
-1
spec/javascripts/pipelines/pipeline_url_spec.js
spec/javascripts/pipelines/pipeline_url_spec.js
+0
-5
spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js
...ripts/vue_mr_widget/components/mr_widget_pipeline_spec.js
+13
-15
spec/javascripts/vue_mr_widget/mock_data.js
spec/javascripts/vue_mr_widget/mock_data.js
+0
-5
spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
+0
-2
spec/views/projects/commit/_commit_box.html.haml_spec.rb
spec/views/projects/commit/_commit_box.html.haml_spec.rb
+2
-2
spec/views/projects/jobs/_build.html.haml_spec.rb
spec/views/projects/jobs/_build.html.haml_spec.rb
+5
-5
No files found.
app/assets/javascripts/jobs/components/stages_dropdown.vue
View file @
b6dfecb7
...
...
@@ -2,7 +2,6 @@
import
_
from
'
underscore
'
;
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
CiIcon
from
'
~/vue_shared/components/ci_icon.vue
'
;
import
PipelineLink
from
'
~/vue_shared/components/ci_pipeline_link.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
export
default
{
...
...
@@ -10,7 +9,6 @@ export default {
CiIcon
,
Icon
,
GlLink
,
PipelineLink
,
},
props
:
{
pipeline
:
{
...
...
@@ -50,12 +48,9 @@ export default {
<ci-icon
:status=
"pipeline.details.status"
class=
"vertical-align-middle"
/>
<span
class=
"font-weight-bold"
>
{{
s__
(
'
Job|Pipeline
'
)
}}
</span>
<pipeline-link
:href=
"pipeline.path"
:pipeline-id=
"pipeline.id"
:pipeline-iid=
"pipeline.iid"
class=
"js-pipeline-path link-commit qa-pipeline-path"
/>
<gl-link
:href=
"pipeline.path"
class=
"js-pipeline-path link-commit qa-pipeline-path"
>
#
{{
pipeline
.
id
}}
</gl-link
>
<template
v-if=
"hasRef"
>
{{
s__
(
'
Job|for
'
)
}}
...
...
app/assets/javascripts/pipelines/components/header_component.vue
View file @
b6dfecb7
...
...
@@ -83,8 +83,6 @@ export default {
v-if=
"shouldRenderContent"
:status=
"status"
:item-id=
"pipeline.id"
:item-iid=
"pipeline.iid"
:item-id-tooltip=
"__('Pipeline ID (IID)')"
:time=
"pipeline.created_at"
:user=
"pipeline.user"
:actions=
"actions"
...
...
app/assets/javascripts/pipelines/components/pipeline_url.vue
View file @
b6dfecb7
...
...
@@ -2,7 +2,6 @@
import
{
GlLink
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
_
from
'
underscore
'
;
import
{
__
,
sprintf
}
from
'
~/locale
'
;
import
PipelineLink
from
'
~/vue_shared/components/ci_pipeline_link.vue
'
;
import
UserAvatarLink
from
'
~/vue_shared/components/user_avatar/user_avatar_link.vue
'
;
import
popover
from
'
~/vue_shared/directives/popover
'
;
...
...
@@ -20,7 +19,6 @@ export default {
components
:
{
UserAvatarLink
,
GlLink
,
PipelineLink
,
},
directives
:
{
GlTooltip
:
GlTooltipDirective
,
...
...
@@ -61,13 +59,10 @@ export default {
};
</
script
>
<
template
>
<div
class=
"table-section section-10 d-none d-sm-none d-md-block pipeline-tags section-wrap"
>
<pipeline-link
:href=
"pipeline.path"
:pipeline-id=
"pipeline.id"
:pipeline-iid=
"pipeline.iid"
class=
"js-pipeline-url-link"
/>
<div
class=
"table-section section-10 d-none d-sm-none d-md-block pipeline-tags"
>
<gl-link
:href=
"pipeline.path"
class=
"js-pipeline-url-link"
>
<span
class=
"pipeline-id"
>
#
{{
pipeline
.
id
}}
</span>
</gl-link>
<div
class=
"label-container"
>
<span
v-if=
"pipeline.flags.latest"
...
...
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue
View file @
b6dfecb7
...
...
@@ -5,7 +5,6 @@ import { sprintf, __ } from '~/locale';
import
PipelineStage
from
'
~/pipelines/components/stage.vue
'
;
import
CiIcon
from
'
~/vue_shared/components/ci_icon.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
PipelineLink
from
'
~/vue_shared/components/ci_pipeline_link.vue
'
;
import
TooltipOnTruncate
from
'
~/vue_shared/components/tooltip_on_truncate.vue
'
;
import
mrWidgetPipelineMixin
from
'
ee_else_ce/vue_merge_request_widget/mixins/mr_widget_pipeline
'
;
...
...
@@ -17,7 +16,6 @@ export default {
Icon
,
TooltipOnTruncate
,
GlLink
,
PipelineLink
,
LinkedPipelinesMiniList
:
()
=>
import
(
'
ee_component/vue_shared/components/linked_pipelines_mini_list.vue
'
),
},
...
...
@@ -113,12 +111,9 @@ export default {
<div
class=
"media-body"
>
<div
class=
"font-weight-bold js-pipeline-info-container"
>
{{
s__
(
'
Pipeline|Pipeline
'
)
}}
<pipeline-link
:href=
"pipeline.path"
:pipeline-id=
"pipeline.id"
:pipeline-iid=
"pipeline.iid"
class=
"pipeline-id pipeline-iid font-weight-normal"
/>
<gl-link
:href=
"pipeline.path"
class=
"pipeline-id font-weight-normal pipeline-number"
>
#
{{
pipeline
.
id
}}
</gl-link
>
{{
pipeline
.
details
.
status
.
label
}}
<template
v-if=
"hasCommitInfo"
>
{{
s__
(
'
Pipeline|for
'
)
}}
...
...
app/assets/javascripts/vue_shared/components/ci_pipeline_link.vue
deleted
100644 → 0
View file @
cf1da166
<
script
>
import
{
GlLink
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
export
default
{
components
:
{
GlLink
,
},
directives
:
{
GlTooltip
:
GlTooltipDirective
,
},
props
:
{
href
:
{
type
:
String
,
required
:
true
,
},
pipelineId
:
{
type
:
Number
,
required
:
true
,
},
pipelineIid
:
{
type
:
Number
,
required
:
true
,
},
},
};
</
script
>
<
template
>
<gl-link
v-gl-tooltip
:href=
"href"
:title=
"__('Pipeline ID (IID)')"
>
<span
class=
"pipeline-id"
>
#
{{
pipelineId
}}
</span>
<span
class=
"pipeline-iid"
>
(#
{{
pipelineIid
}}
)
</span>
</gl-link>
</
template
>
app/assets/javascripts/vue_shared/components/header_ci_component.vue
View file @
b6dfecb7
...
...
@@ -37,16 +37,6 @@ export default {
type
:
Number
,
required
:
true
,
},
itemIid
:
{
type
:
Number
,
required
:
false
,
default
:
null
,
},
itemIdTooltip
:
{
type
:
String
,
required
:
false
,
default
:
''
,
},
time
:
{
type
:
String
,
required
:
true
,
...
...
@@ -95,12 +85,7 @@ export default {
<section
class=
"header-main-content"
>
<ci-icon-badge
:status=
"status"
/>
<strong
v-gl-tooltip
:title=
"itemIdTooltip"
>
{{
itemName
}}
#
{{
itemId
}}
<template
v-if=
"itemIid"
>
(#
{{
itemIid
}}
)
</
template
>
</strong>
<strong>
{{
itemName
}}
#
{{
itemId
}}
</strong>
<template
v-if=
"shouldRenderTriggeredLabel"
>
triggered
...
...
@@ -111,8 +96,9 @@ export default {
<timeago-tooltip
:time=
"time"
/>
by
<
template
v-if=
"user"
>
by
<gl-link
v-gl-tooltip
:href=
"user.path"
...
...
app/serializers/pipeline_entity.rb
View file @
b6dfecb7
...
...
@@ -4,7 +4,6 @@ class PipelineEntity < Grape::Entity
include
RequestAwareEntity
expose
:id
expose
:iid
expose
:user
,
using:
UserEntity
expose
:active?
,
as: :active
...
...
app/views/projects/ci/builds/_build.html.haml
View file @
b6dfecb7
...
...
@@ -53,10 +53,9 @@
%span
.badge.badge-info
=
_
(
'manual'
)
-
if
pipeline_link
%td
.pipeline-link
=
link_to
pipeline_path
(
pipeline
)
,
class:
'has-tooltip'
,
title:
_
(
'Pipeline ID (IID)'
)
do
%td
=
link_to
pipeline_path
(
pipeline
)
do
%span
.pipeline-id
##{pipeline.id}
%span
.pipeline-iid
(##{pipeline.iid})
%span
by
-
if
pipeline
.
user
=
user_avatar
(
user:
pipeline
.
user
,
size:
20
)
...
...
app/views/projects/commit/_commit_box.html.haml
View file @
b6dfecb7
...
...
@@ -81,7 +81,7 @@
=
link_to
project_pipeline_path
(
@project
,
last_pipeline
.
id
),
class:
"ci-status-icon-
#{
last_pipeline
.
status
}
"
do
=
ci_icon_for_status
(
last_pipeline
.
status
)
#{
_
(
'Pipeline'
)
}
=
link_to
"#
#{
last_pipeline
.
id
}
(#
#{
last_pipeline
.
iid
}
)"
,
project_pipeline_path
(
@project
,
last_pipeline
.
id
),
class:
"has-tooltip"
,
title:
_
(
'Pipeline ID (IID)'
)
=
link_to
"#
#{
last_pipeline
.
id
}
"
,
project_pipeline_path
(
@project
,
last_pipeline
.
id
)
=
ci_label_for_status
(
last_pipeline
.
status
)
-
if
last_pipeline
.
stages_count
.
nonzero?
#{
n_
(
s_
(
'Pipeline|with stage'
),
s_
(
'Pipeline|with stages'
),
last_pipeline
.
stages_count
)
}
...
...
changelogs/unreleased/57414-show-pipeline-iid.yml
deleted
100644 → 0
View file @
cf1da166
---
title
:
Show Pipeline IID everywhere Pipeline ID is shown
merge_request
:
57414
author
:
Mike Scott
type
:
added
spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb
View file @
b6dfecb7
...
...
@@ -52,7 +52,7 @@ describe 'Merge request > User merges when pipeline succeeds', :js do
# so we have to wait for asynchronous call to reload it
# and have_content expectation handles that.
#
expect
(
page
).
to
have_content
"Pipeline #
#{
pipeline
.
id
}
(#
#{
pipeline
.
iid
}
)
running"
expect
(
page
).
to
have_content
"Pipeline #
#{
pipeline
.
id
}
running"
end
it_behaves_like
'Merge when pipeline succeeds activator'
...
...
spec/features/merge_request/user_sees_merge_widget_spec.rb
View file @
b6dfecb7
...
...
@@ -160,7 +160,7 @@ describe 'Merge request > User sees merge widget', :js do
it
'shows head pipeline information'
do
within
'.ci-widget-content'
do
expect
(
page
).
to
have_content
(
"Pipeline #
#{
pipeline
.
id
}
(#
#{
pipeline
.
iid
}
)
pending "
\
expect
(
page
).
to
have_content
(
"Pipeline #
#{
pipeline
.
id
}
pending "
\
"for
#{
pipeline
.
short_sha
}
"
\
"on
#{
pipeline
.
ref
}
"
)
end
...
...
@@ -189,7 +189,7 @@ describe 'Merge request > User sees merge widget', :js do
it
'shows head pipeline information'
do
within
'.ci-widget-content'
do
expect
(
page
).
to
have_content
(
"Pipeline #
#{
pipeline
.
id
}
(#
#{
pipeline
.
iid
}
)
pending "
\
expect
(
page
).
to
have_content
(
"Pipeline #
#{
pipeline
.
id
}
pending "
\
"for
#{
pipeline
.
short_sha
}
"
\
"on
#{
merge_request
.
to_reference
}
"
\
"with
#{
merge_request
.
source_branch
}
"
)
...
...
@@ -201,7 +201,7 @@ describe 'Merge request > User sees merge widget', :js do
it
'shows head pipeline information'
do
within
'.ci-widget-content'
do
expect
(
page
).
to
have_content
(
"Pipeline #
#{
pipeline
.
id
}
(#
#{
pipeline
.
iid
}
)
pending "
\
expect
(
page
).
to
have_content
(
"Pipeline #
#{
pipeline
.
id
}
pending "
\
"for
#{
pipeline
.
short_sha
}
"
\
"on
#{
merge_request
.
to_reference
}
"
\
"with
#{
merge_request
.
source_branch
}
"
)
...
...
@@ -234,7 +234,7 @@ describe 'Merge request > User sees merge widget', :js do
it
'shows head pipeline information'
do
within
'.ci-widget-content'
do
expect
(
page
).
to
have_content
(
"Pipeline #
#{
pipeline
.
id
}
(#
#{
pipeline
.
iid
}
)
pending "
\
expect
(
page
).
to
have_content
(
"Pipeline #
#{
pipeline
.
id
}
pending "
\
"for
#{
pipeline
.
short_sha
}
"
\
"on
#{
merge_request
.
to_reference
}
"
\
"with
#{
merge_request
.
source_branch
}
"
\
...
...
@@ -248,7 +248,7 @@ describe 'Merge request > User sees merge widget', :js do
it
'shows head pipeline information'
do
within
'.ci-widget-content'
do
expect
(
page
).
to
have_content
(
"Pipeline #
#{
pipeline
.
id
}
(#
#{
pipeline
.
iid
}
)
pending "
\
expect
(
page
).
to
have_content
(
"Pipeline #
#{
pipeline
.
id
}
pending "
\
"for
#{
pipeline
.
short_sha
}
"
\
"on
#{
merge_request
.
to_reference
}
"
\
"with
#{
merge_request
.
source_branch
}
"
\
...
...
spec/features/projects/commits/user_browses_commits_spec.rb
View file @
b6dfecb7
...
...
@@ -61,7 +61,7 @@ describe 'User browses commits' do
it
'renders commit ci info'
do
visit
project_commit_path
(
project
,
sample_commit
.
id
)
expect
(
page
).
to
have_content
"Pipeline #
#{
pipeline
.
id
}
(#
#{
pipeline
.
iid
}
)
pending"
expect
(
page
).
to
have_content
"Pipeline #
#{
pipeline
.
id
}
pending"
end
end
...
...
spec/features/projects/jobs/user_browses_jobs_spec.rb
View file @
b6dfecb7
...
...
@@ -16,12 +16,6 @@ describe 'User browses jobs' do
visit
(
project_jobs_path
(
project
))
end
it
'shows pipeline id and IID'
do
page
.
within
(
'td.pipeline-link'
)
do
expect
(
page
).
to
have_content
(
"#
#{
pipeline
.
id
}
(#
#{
pipeline
.
iid
}
)"
)
end
end
it
'shows the coverage'
do
page
.
within
(
'td.coverage'
)
do
expect
(
page
).
to
have_content
(
'99.9%'
)
...
...
spec/features/projects/jobs_spec.rb
View file @
b6dfecb7
...
...
@@ -129,7 +129,7 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
visit
project_job_path
(
project
,
job
)
within
'.js-pipeline-info'
do
expect
(
page
).
to
have_content
(
"Pipeline #
#{
pipeline
.
id
}
(#
#{
pipeline
.
iid
}
)
for
#{
pipeline
.
ref
}
"
)
expect
(
page
).
to
have_content
(
"Pipeline #
#{
pipeline
.
id
}
for
#{
pipeline
.
ref
}
"
)
end
end
...
...
spec/javascripts/jobs/components/stages_dropdown_spec.js
View file @
b6dfecb7
...
...
@@ -9,7 +9,6 @@ describe('Stages Dropdown', () => {
const
mockPipelineData
=
{
id
:
28029444
,
iid
:
123
,
details
:
{
status
:
{
details_path
:
'
/gitlab-org/gitlab-ce/pipelines/28029444
'
,
...
...
@@ -78,8 +77,8 @@ describe('Stages Dropdown', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.dropdown .js-selected-stage
'
).
textContent
).
toContain
(
'
deploy
'
);
});
it
(
`renders the pipeline info text like "Pipeline #123
(#12)
for source_branch"`
,
()
=>
{
const
expected
=
`Pipeline #
${
pipeline
.
id
}
(#
${
pipeline
.
iid
}
)
for
${
pipeline
.
ref
.
name
}
`
;
it
(
`renders the pipeline info text like "Pipeline #123 for source_branch"`
,
()
=>
{
const
expected
=
`Pipeline #
${
pipeline
.
id
}
for
${
pipeline
.
ref
.
name
}
`
;
const
actual
=
trimText
(
vm
.
$el
.
querySelector
(
'
.js-pipeline-info
'
).
innerText
);
expect
(
actual
).
toBe
(
expected
);
...
...
@@ -101,10 +100,10 @@ describe('Stages Dropdown', () => {
});
});
it
(
`renders the pipeline info text like "Pipeline #123
(#12)
for !456 with source_branch into target_branch"`
,
()
=>
{
const
expected
=
`Pipeline #
${
pipeline
.
id
}
(#
${
pipeline
.
iid
}
) for !
${
pipeline
.
merge_request
.
iid
}
with
${
pipeline
.
merge_request
.
source_branch
}
into
${
pipeline
.
merge_request
.
target_branch
}
`
;
it
(
`renders the pipeline info text like "Pipeline #123 for !456 with source_branch into target_branch"`
,
()
=>
{
const
expected
=
`Pipeline #
${
pipeline
.
id
}
for !
${
pipeline
.
merge_request
.
iid
}
with
${
pipeline
.
merge_request
.
source_branch
}
into
${
pipeline
.
merge_request
.
target_branch
}
`
;
const
actual
=
trimText
(
vm
.
$el
.
querySelector
(
'
.js-pipeline-info
'
).
innerText
);
expect
(
actual
).
toBe
(
expected
);
...
...
@@ -144,10 +143,10 @@ describe('Stages Dropdown', () => {
});
});
it
(
`renders the pipeline info like "Pipeline #123
(#12)
for !456 with source_branch"`
,
()
=>
{
const
expected
=
`Pipeline #
${
pipeline
.
id
}
(#
${
pipeline
.
iid
}
) for !
${
pipeline
.
merge_request
.
iid
}
with
${
pipeline
.
merge_request
.
source_branch
}
`
;
it
(
`renders the pipeline info like "Pipeline #123 for !456 with source_branch"`
,
()
=>
{
const
expected
=
`Pipeline #
${
pipeline
.
id
}
for !
${
pipeline
.
merge_request
.
iid
}
with
${
pipeline
.
merge_request
.
source_branch
}
`
;
const
actual
=
trimText
(
vm
.
$el
.
querySelector
(
'
.js-pipeline-info
'
).
innerText
);
expect
(
actual
).
toBe
(
expected
);
...
...
spec/javascripts/jobs/mock_data.js
View file @
b6dfecb7
...
...
@@ -960,7 +960,6 @@ export default {
},
pipeline
:
{
id
:
140
,
iid
:
13
,
user
:
{
name
:
'
Root
'
,
username
:
'
root
'
,
...
...
spec/javascripts/pipelines/mock_data.js
View file @
b6dfecb7
export
const
pipelineWithStages
=
{
id
:
20333396
,
iid
:
304399
,
user
:
{
id
:
128633
,
name
:
'
Rémy Coutable
'
,
...
...
spec/javascripts/pipelines/pipeline_url_spec.js
View file @
b6dfecb7
...
...
@@ -13,7 +13,6 @@ describe('Pipeline Url Component', () => {
propsData
:
{
pipeline
:
{
id
:
1
,
iid
:
1
,
path
:
'
foo
'
,
flags
:
{},
},
...
...
@@ -29,7 +28,6 @@ describe('Pipeline Url Component', () => {
propsData
:
{
pipeline
:
{
id
:
1
,
iid
:
1
,
path
:
'
foo
'
,
flags
:
{},
},
...
...
@@ -49,7 +47,6 @@ describe('Pipeline Url Component', () => {
propsData
:
{
pipeline
:
{
id
:
1
,
iid
:
1
,
path
:
'
foo
'
,
flags
:
{
latest
:
true
,
...
...
@@ -81,7 +78,6 @@ describe('Pipeline Url Component', () => {
propsData
:
{
pipeline
:
{
id
:
1
,
iid
:
1
,
path
:
'
foo
'
,
flags
:
{
latest
:
true
,
...
...
@@ -104,7 +100,6 @@ describe('Pipeline Url Component', () => {
propsData
:
{
pipeline
:
{
id
:
1
,
iid
:
1
,
path
:
'
foo
'
,
flags
:
{
failure_reason
:
true
,
...
...
spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js
View file @
b6dfecb7
...
...
@@ -103,7 +103,7 @@ describe('MRWidgetPipeline', () => {
it
(
'
should render pipeline ID
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.pipeline-id
'
).
textContent
.
trim
()).
toEqual
(
`#
${
mockData
.
pipeline
.
id
}
(#
${
mockData
.
pipeline
.
iid
}
)
`
,
`#
${
mockData
.
pipeline
.
id
}
`
,
);
});
...
...
@@ -150,7 +150,7 @@ describe('MRWidgetPipeline', () => {
it
(
'
should render pipeline ID
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.pipeline-id
'
).
textContent
.
trim
()).
toEqual
(
`#
${
mockData
.
pipeline
.
id
}
(#
${
mockData
.
pipeline
.
iid
}
)
`
,
`#
${
mockData
.
pipeline
.
id
}
`
,
);
});
...
...
@@ -222,9 +222,9 @@ describe('MRWidgetPipeline', () => {
sourceBranchLink
:
mockCopy
.
source_branch_link
,
});
const
expected
=
`Pipeline #
${
pipeline
.
id
}
(#
${
pipeline
.
iid
}
)
${
pipeline
.
details
.
status
.
label
}
for
${
pipeline
.
commit
.
short_id
}
on
${
mockCopy
.
source_branch_link
}
`
;
const
expected
=
`Pipeline #
${
pipeline
.
id
}
${
pipeline
.
details
.
status
.
label
}
for
${
pipeline
.
commit
.
short_id
}
on
${
mockCopy
.
source_branch_link
}
`
;
const
actual
=
trimText
(
vm
.
$el
.
querySelector
(
'
.js-pipeline-info-container
'
).
innerText
);
...
...
@@ -247,11 +247,11 @@ describe('MRWidgetPipeline', () => {
sourceBranchLink
:
mockCopy
.
source_branch_link
,
});
const
expected
=
`Pipeline #
${
pipeline
.
id
}
(#
${
pipeline
.
iid
}
)
${
pipeline
.
details
.
status
.
label
}
for
${
pipeline
.
commit
.
short_id
}
on !
${
pipeline
.
merge_request
.
iid
}
with
${
pipeline
.
merge_request
.
source
_branch
}
into
${
pipeline
.
merge_request
.
target_branch
}
`
;
const
expected
=
`Pipeline #
${
pipeline
.
id
}
${
pipeline
.
details
.
status
.
label
}
for
${
pipeline
.
commit
.
short_id
}
on !
${
pipeline
.
merge_request
.
iid
}
with
${
pipeline
.
merge_request
.
source_branch
}
into
${
pipeline
.
merge_request
.
target
_branch
}
`
;
const
actual
=
trimText
(
vm
.
$el
.
querySelector
(
'
.js-pipeline-info-container
'
).
innerText
);
...
...
@@ -274,11 +274,9 @@ describe('MRWidgetPipeline', () => {
sourceBranchLink
:
mockCopy
.
source_branch_link
,
});
const
expected
=
`Pipeline #
${
pipeline
.
id
}
(#
${
pipeline
.
iid
}
)
${
pipeline
.
details
.
status
.
label
}
for
${
pipeline
.
commit
.
short_id
}
on !
${
pipeline
.
merge_request
.
iid
}
with
${
pipeline
.
merge_request
.
source_branch
}
`
;
const
expected
=
`Pipeline #
${
pipeline
.
id
}
${
pipeline
.
details
.
status
.
label
}
for
${
pipeline
.
commit
.
short_id
}
on !
${
pipeline
.
merge_request
.
iid
}
with
${
pipeline
.
merge_request
.
source_branch
}
`
;
const
actual
=
trimText
(
vm
.
$el
.
querySelector
(
'
.js-pipeline-info-container
'
).
innerText
);
...
...
spec/javascripts/vue_mr_widget/mock_data.js
View file @
b6dfecb7
...
...
@@ -61,7 +61,6 @@ export default {
"
Merge branch 'daaaa' into 'master'
\n\n
Update README.md
\n\n
See merge request !22
"
,
pipeline
:
{
id
:
172
,
iid
:
32
,
user
:
{
name
:
'
Administrator
'
,
username
:
'
root
'
,
...
...
@@ -243,8 +242,6 @@ export default {
export
const
mockStore
=
{
pipeline
:
{
id
:
0
,
iid
:
0
,
path
:
'
/root/acets-app/pipelines/0
'
,
details
:
{
status
:
{
details_path
:
'
/root/review-app-tester/pipelines/66
'
,
...
...
@@ -262,8 +259,6 @@ export const mockStore = {
},
mergePipeline
:
{
id
:
1
,
iid
:
1
,
path
:
'
/root/acets-app/pipelines/0
'
,
details
:
{
status
:
{
details_path
:
'
/root/review-app-tester/pipelines/66
'
,
...
...
spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
View file @
b6dfecb7
...
...
@@ -544,7 +544,6 @@ describe('mrWidgetOptions', () => {
];
const
deploymentMockData
=
{
id
:
15
,
iid
:
7
,
name
:
'
review/diplo
'
,
url
:
'
/root/acets-review-apps/environments/15
'
,
stop_url
:
'
/root/acets-review-apps/environments/15/stop
'
,
...
...
@@ -591,7 +590,6 @@ describe('mrWidgetOptions', () => {
vm
.
mr
.
state
=
'
merged
'
;
vm
.
mr
.
mergePipeline
=
{
id
:
127
,
iid
:
35
,
user
:
{
id
:
1
,
name
:
'
Administrator
'
,
...
...
spec/views/projects/commit/_commit_box.html.haml_spec.rb
View file @
b6dfecb7
...
...
@@ -27,7 +27,7 @@ describe 'projects/commit/_commit_box.html.haml' do
render
expect
(
rendered
).
to
have_text
(
"Pipeline #
#{
third_pipeline
.
id
}
(#
#{
third_pipeline
.
iid
}
)
failed"
)
expect
(
rendered
).
to
have_text
(
"Pipeline #
#{
third_pipeline
.
id
}
failed"
)
end
end
...
...
@@ -40,7 +40,7 @@ describe 'projects/commit/_commit_box.html.haml' do
it
'shows correct pipeline description'
do
render
expect
(
rendered
).
to
have_text
"Pipeline #
#{
pipeline
.
id
}
(#
#{
pipeline
.
iid
}
)
"
\
expect
(
rendered
).
to
have_text
"Pipeline #
#{
pipeline
.
id
}
"
\
'waiting for manual action'
end
end
...
...
spec/views/projects/jobs/_build.html.haml_spec.rb
View file @
b6dfecb7
...
...
@@ -4,7 +4,7 @@ describe 'projects/ci/jobs/_build' do
include
Devise
::
Test
::
ControllerHelpers
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
,
id:
1337
,
iid:
57
,
project:
project
,
sha:
project
.
commit
.
id
)
}
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
,
id:
1337
,
project:
project
,
sha:
project
.
commit
.
id
)
}
let
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
,
stage:
'test'
,
stage_idx:
1
,
name:
'rspec 0:2'
,
status: :pending
)
}
before
do
...
...
@@ -15,14 +15,14 @@ describe 'projects/ci/jobs/_build' do
it
'won\'t include a column with a link to its pipeline by default'
do
render
partial:
'projects/ci/builds/build'
,
locals:
{
build:
build
}
expect
(
rendered
).
not_to
have_link
(
'#1337
(#57)
'
)
expect
(
rendered
).
not_to
have_text
(
'#1337
(#57)
by API'
)
expect
(
rendered
).
not_to
have_link
(
'#1337'
)
expect
(
rendered
).
not_to
have_text
(
'#1337 by API'
)
end
it
'can include a column with a link to its pipeline'
do
render
partial:
'projects/ci/builds/build'
,
locals:
{
build:
build
,
pipeline_link:
true
}
expect
(
rendered
).
to
have_link
(
'#1337
(#57)
'
)
expect
(
rendered
).
to
have_text
(
'#1337
(#57)
by API'
)
expect
(
rendered
).
to
have_link
(
'#1337'
)
expect
(
rendered
).
to
have_text
(
'#1337 by API'
)
end
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