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
Boxiang Sun
gitlab-ce
Commits
ce75de08
Commit
ce75de08
authored
Oct 10, 2017
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for Tests
parent
4731eba4
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
34 additions
and
55 deletions
+34
-55
app/assets/javascripts/pipelines/components/graph/action_component.vue
...vascripts/pipelines/components/graph/action_component.vue
+2
-2
app/assets/javascripts/pipelines/components/graph/dropdown_action_component.vue
.../pipelines/components/graph/dropdown_action_component.vue
+0
-1
app/assets/javascripts/vue_shared/ci_action_icons.js
app/assets/javascripts/vue_shared/ci_action_icons.js
+0
-21
app/assets/javascripts/vue_shared/components/icon.vue
app/assets/javascripts/vue_shared/components/icon.vue
+4
-3
app/views/shared/_mini_pipeline_graph.html.haml
app/views/shared/_mini_pipeline_graph.html.haml
+1
-1
spec/features/projects/pipelines/pipeline_spec.rb
spec/features/projects/pipelines/pipeline_spec.rb
+4
-4
spec/javascripts/vue_shared/components/ci_badge_link_spec.js
spec/javascripts/vue_shared/components/ci_badge_link_spec.js
+9
-9
spec/lib/gitlab/ci/status/build/cancelable_spec.rb
spec/lib/gitlab/ci/status/build/cancelable_spec.rb
+1
-1
spec/lib/gitlab/ci/status/build/factory_spec.rb
spec/lib/gitlab/ci/status/build/factory_spec.rb
+9
-9
spec/lib/gitlab/ci/status/build/failed_allowed_spec.rb
spec/lib/gitlab/ci/status/build/failed_allowed_spec.rb
+1
-1
spec/lib/gitlab/ci/status/build/play_spec.rb
spec/lib/gitlab/ci/status/build/play_spec.rb
+1
-1
spec/lib/gitlab/ci/status/build/retryable_spec.rb
spec/lib/gitlab/ci/status/build/retryable_spec.rb
+1
-1
spec/lib/gitlab/ci/status/build/stop_spec.rb
spec/lib/gitlab/ci/status/build/stop_spec.rb
+1
-1
No files found.
app/assets/javascripts/pipelines/components/graph/action_component.vue
View file @
ce75de08
<
script
>
import
tooltip
from
'
../../../vue_shared/directives/tooltip
'
;
import
tooltip
from
'
../../../vue_shared/directives/tooltip
'
;
import
icon
from
'
../../../vue_shared/components/icon.vue
'
;
/**
...
...
@@ -39,7 +39,7 @@
computed
:
{
cssClass
()
{
return
`
${
gl
.
text
.
dasherize
(
this
.
actionIcon
)}
js-
${
gl
.
text
.
dasherize
(
this
.
actionIcon
)}
`
;
return
`
${
gl
.
text
.
dasherize
(
this
.
actionIcon
)}
js-
icon-
${
gl
.
text
.
dasherize
(
this
.
actionIcon
)}
`
;
},
},
};
...
...
app/assets/javascripts/pipelines/components/graph/dropdown_action_component.vue
View file @
ce75de08
<
script
>
import
getActionIcon
from
'
../../../vue_shared/ci_action_icons
'
;
import
icon
from
'
../../../vue_shared/components/icon.vue
'
;
import
tooltip
from
'
../../../vue_shared/directives/tooltip
'
;
...
...
app/assets/javascripts/vue_shared/ci_action_icons.js
deleted
100644 → 0
View file @
4731eba4
import
cancelSVG
from
'
icons/_icon_action_cancel.svg
'
;
import
retrySVG
from
'
icons/_icon_action_retry.svg
'
;
import
playSVG
from
'
icons/_icon_action_play.svg
'
;
import
stopSVG
from
'
icons/_icon_action_stop.svg
'
;
/**
* For the provided action returns the respective SVG
*
* @param {String} action
* @return {SVG|String}
*/
export
default
function
getActionIcon
(
action
)
{
const
icons
=
{
icon_action_cancel
:
cancelSVG
,
icon_action_play
:
playSVG
,
icon_action_retry
:
retrySVG
,
icon_action_stop
:
stopSVG
,
};
return
icons
[
action
]
||
''
;
}
app/assets/javascripts/vue_shared/components/icon.vue
View file @
ce75de08
...
...
@@ -36,11 +36,11 @@
computed
:
{
spriteHref
()
{
return
`
${
gon
.
sprite_icons
}
#
${
this
.
name
}
`
return
`
${
gon
.
sprite_icons
}
#
${
this
.
name
}
`
;
},
fullCssClass
()
{
let
classString
=
''
||
this
.
cssClass
;
if
(
this
.
size
)
classString
+=
`s
${
this
.
size
}
`
if
(
this
.
size
)
classString
+=
`s
${
this
.
size
}
`
;
return
classString
;
},
},
...
...
@@ -49,6 +49,7 @@
<
template
>
<svg
:class=
"fullCssClass"
>
<use
v-bind=
"
{'xlink:href':spriteHref}"/>
<use
v-bind=
"
{'xlink:href':spriteHref}"/>
</svg>
</
template
>
app/views/shared/_mini_pipeline_graph.html.haml
View file @
ce75de08
...
...
@@ -7,7 +7,7 @@
.stage-container.dropdown
{
class:
klass
}
%button
.mini-pipeline-graph-dropdown-toggle.has-tooltip.js-builds-dropdown-button
{
class:
"ci-status-icon-#{detailed_status.group}"
,
type:
'button'
,
data:
{
toggle:
'dropdown'
,
title:
"#{stage.name}: #{detailed_status.label}"
,
placement:
'top'
,
"stage-endpoint"
=>
stage_project_pipeline_path
(
pipeline
.
project
,
pipeline
,
stage:
stage
.
name
)
}
}
=
custom
_icon
(
icon_status
)
=
sprite
_icon
(
icon_status
)
=
icon
(
'caret-down'
)
%ul
.dropdown-menu.mini-pipeline-graph-dropdown-menu.js-builds-dropdown-container
...
...
spec/features/projects/pipelines/pipeline_spec.rb
View file @
ce75de08
...
...
@@ -67,7 +67,7 @@ describe 'Pipeline', :js do
it
'shows a running icon and a cancel action for the running build'
do
page
.
within
(
'#ci-badge-deploy'
)
do
expect
(
page
).
to
have_selector
(
'.js-ci-status-icon-running'
)
expect
(
page
).
to
have_selector
(
'.js-icon-
action-
cancel'
)
expect
(
page
).
to
have_selector
(
'.js-icon-cancel'
)
expect
(
page
).
to
have_content
(
'deploy'
)
end
end
...
...
@@ -87,7 +87,7 @@ describe 'Pipeline', :js do
end
page
.
within
(
'#ci-badge-build .ci-action-icon-container'
)
do
expect
(
page
).
to
have_selector
(
'.js-icon-
action-
retry'
)
expect
(
page
).
to
have_selector
(
'.js-icon-retry'
)
end
end
...
...
@@ -106,7 +106,7 @@ describe 'Pipeline', :js do
end
page
.
within
(
'#ci-badge-test .ci-action-icon-container'
)
do
expect
(
page
).
to
have_selector
(
'.js-icon-
action-
retry'
)
expect
(
page
).
to
have_selector
(
'.js-icon-retry'
)
end
end
...
...
@@ -125,7 +125,7 @@ describe 'Pipeline', :js do
end
page
.
within
(
'#ci-badge-manual-build .ci-action-icon-container'
)
do
expect
(
page
).
to
have_selector
(
'.js-icon-
action-
play'
)
expect
(
page
).
to
have_selector
(
'.js-icon-play'
)
end
end
...
...
spec/javascripts/vue_shared/components/ci_badge_link_spec.js
View file @
ce75de08
...
...
@@ -11,63 +11,63 @@ describe('CI Badge Link Component', () => {
text
:
'
canceled
'
,
label
:
'
canceled
'
,
group
:
'
canceled
'
,
icon
:
'
icon_
status_canceled
'
,
icon
:
'
status_canceled
'
,
details_path
:
'
status/canceled
'
,
},
created
:
{
text
:
'
created
'
,
label
:
'
created
'
,
group
:
'
created
'
,
icon
:
'
icon_
status_created
'
,
icon
:
'
status_created
'
,
details_path
:
'
status/created
'
,
},
failed
:
{
text
:
'
failed
'
,
label
:
'
failed
'
,
group
:
'
failed
'
,
icon
:
'
icon_
status_failed
'
,
icon
:
'
status_failed
'
,
details_path
:
'
status/failed
'
,
},
manual
:
{
text
:
'
manual
'
,
label
:
'
manual action
'
,
group
:
'
manual
'
,
icon
:
'
icon_
status_manual
'
,
icon
:
'
status_manual
'
,
details_path
:
'
status/manual
'
,
},
pending
:
{
text
:
'
pending
'
,
label
:
'
pending
'
,
group
:
'
pending
'
,
icon
:
'
icon_
status_pending
'
,
icon
:
'
status_pending
'
,
details_path
:
'
status/pending
'
,
},
running
:
{
text
:
'
running
'
,
label
:
'
running
'
,
group
:
'
running
'
,
icon
:
'
icon_
status_running
'
,
icon
:
'
status_running
'
,
details_path
:
'
status/running
'
,
},
skipped
:
{
text
:
'
skipped
'
,
label
:
'
skipped
'
,
group
:
'
skipped
'
,
icon
:
'
icon_
status_skipped
'
,
icon
:
'
status_skipped
'
,
details_path
:
'
status/skipped
'
,
},
success_warining
:
{
text
:
'
passed
'
,
label
:
'
passed
'
,
group
:
'
success_with_warnings
'
,
icon
:
'
icon_
status_warning
'
,
icon
:
'
status_warning
'
,
details_path
:
'
status/warning
'
,
},
success
:
{
text
:
'
passed
'
,
label
:
'
passed
'
,
group
:
'
passed
'
,
icon
:
'
icon_
status_success
'
,
icon
:
'
status_success
'
,
details_path
:
'
status/passed
'
,
},
};
...
...
spec/lib/gitlab/ci/status/build/cancelable_spec.rb
View file @
ce75de08
...
...
@@ -66,7 +66,7 @@ describe Gitlab::Ci::Status::Build::Cancelable do
end
describe
'#action_icon'
do
it
{
expect
(
subject
.
action_icon
).
to
eq
'
icon_action_
cancel'
}
it
{
expect
(
subject
.
action_icon
).
to
eq
'cancel'
}
end
describe
'#action_title'
do
...
...
spec/lib/gitlab/ci/status/build/factory_spec.rb
View file @
ce75de08
...
...
@@ -30,7 +30,7 @@ describe Gitlab::Ci::Status::Build::Factory do
it
'fabricates status with correct details'
do
expect
(
status
.
text
).
to
eq
'passed'
expect
(
status
.
icon
).
to
eq
'
icon_
status_success'
expect
(
status
.
icon
).
to
eq
'status_success'
expect
(
status
.
favicon
).
to
eq
'favicon_status_success'
expect
(
status
.
label
).
to
eq
'passed'
expect
(
status
).
to
have_details
...
...
@@ -57,7 +57,7 @@ describe Gitlab::Ci::Status::Build::Factory do
it
'fabricates status with correct details'
do
expect
(
status
.
text
).
to
eq
'failed'
expect
(
status
.
icon
).
to
eq
'
icon_
status_failed'
expect
(
status
.
icon
).
to
eq
'status_failed'
expect
(
status
.
favicon
).
to
eq
'favicon_status_failed'
expect
(
status
.
label
).
to
eq
'failed'
expect
(
status
).
to
have_details
...
...
@@ -84,7 +84,7 @@ describe Gitlab::Ci::Status::Build::Factory do
it
'fabricates status with correct details'
do
expect
(
status
.
text
).
to
eq
'failed'
expect
(
status
.
icon
).
to
eq
'
icon_
status_warning'
expect
(
status
.
icon
).
to
eq
'status_warning'
expect
(
status
.
favicon
).
to
eq
'favicon_status_failed'
expect
(
status
.
label
).
to
eq
'failed (allowed to fail)'
expect
(
status
).
to
have_details
...
...
@@ -113,7 +113,7 @@ describe Gitlab::Ci::Status::Build::Factory do
it
'fabricates status with correct details'
do
expect
(
status
.
text
).
to
eq
'canceled'
expect
(
status
.
icon
).
to
eq
'
icon_
status_canceled'
expect
(
status
.
icon
).
to
eq
'status_canceled'
expect
(
status
.
favicon
).
to
eq
'favicon_status_canceled'
expect
(
status
.
label
).
to
eq
'canceled'
expect
(
status
).
to
have_details
...
...
@@ -139,7 +139,7 @@ describe Gitlab::Ci::Status::Build::Factory do
it
'fabricates status with correct details'
do
expect
(
status
.
text
).
to
eq
'running'
expect
(
status
.
icon
).
to
eq
'
icon_
status_running'
expect
(
status
.
icon
).
to
eq
'status_running'
expect
(
status
.
favicon
).
to
eq
'favicon_status_running'
expect
(
status
.
label
).
to
eq
'running'
expect
(
status
).
to
have_details
...
...
@@ -165,7 +165,7 @@ describe Gitlab::Ci::Status::Build::Factory do
it
'fabricates status with correct details'
do
expect
(
status
.
text
).
to
eq
'pending'
expect
(
status
.
icon
).
to
eq
'
icon_
status_pending'
expect
(
status
.
icon
).
to
eq
'status_pending'
expect
(
status
.
favicon
).
to
eq
'favicon_status_pending'
expect
(
status
.
label
).
to
eq
'pending'
expect
(
status
).
to
have_details
...
...
@@ -190,7 +190,7 @@ describe Gitlab::Ci::Status::Build::Factory do
it
'fabricates status with correct details'
do
expect
(
status
.
text
).
to
eq
'skipped'
expect
(
status
.
icon
).
to
eq
'icon_
status_skipped'
expect
(
status
.
icon
).
to
eq
status_skipped
'
expect(status.favicon).to eq '
favicon_status_skipped
'
expect(status.label).to eq '
skipped
'
expect(status).to have_details
...
...
@@ -219,7 +219,7 @@ describe Gitlab::Ci::Status::Build::Factory do
it '
fabricates
status
with
correct
details
' do
expect(status.text).to eq '
manual
'
expect(status.group).to eq '
manual
'
expect
(
status
.
icon
).
to
eq
'
icon_
status_manual'
expect(status.icon).to eq '
status_manual
'
expect(status.favicon).to eq '
favicon_status_manual
'
expect(status.label).to include '
manual
play
action
'
expect(status).to have_details
...
...
@@ -274,7 +274,7 @@ describe Gitlab::Ci::Status::Build::Factory do
it '
fabricates
status
with
correct
details
' do
expect(status.text).to eq '
manual
'
expect(status.group).to eq '
manual
'
expect
(
status
.
icon
).
to
eq
'
icon_
status_manual'
expect(status.icon).to eq '
status_manual
'
expect(status.favicon).to eq '
favicon_status_manual
'
expect(status.label).to eq '
manual
stop
action
(
not
allowed
)
'
expect
(
status
).
to
have_details
...
...
spec/lib/gitlab/ci/status/build/failed_allowed_spec.rb
View file @
ce75de08
...
...
@@ -18,7 +18,7 @@ describe Gitlab::Ci::Status::Build::FailedAllowed do
describe
'#icon'
do
it
'returns a warning icon'
do
expect
(
subject
.
icon
).
to
eq
'
icon_
status_warning'
expect
(
subject
.
icon
).
to
eq
'status_warning'
end
end
...
...
spec/lib/gitlab/ci/status/build/play_spec.rb
View file @
ce75de08
...
...
@@ -46,7 +46,7 @@ describe Gitlab::Ci::Status::Build::Play do
end
describe
'#action_icon'
do
it
{
expect
(
subject
.
action_icon
).
to
eq
'
icon_action_
play'
}
it
{
expect
(
subject
.
action_icon
).
to
eq
'play'
}
end
describe
'#action_title'
do
...
...
spec/lib/gitlab/ci/status/build/retryable_spec.rb
View file @
ce75de08
...
...
@@ -66,7 +66,7 @@ describe Gitlab::Ci::Status::Build::Retryable do
end
describe
'#action_icon'
do
it
{
expect
(
subject
.
action_icon
).
to
eq
'
icon_action_
retry'
}
it
{
expect
(
subject
.
action_icon
).
to
eq
'retry'
}
end
describe
'#action_title'
do
...
...
spec/lib/gitlab/ci/status/build/stop_spec.rb
View file @
ce75de08
...
...
@@ -38,7 +38,7 @@ describe Gitlab::Ci::Status::Build::Stop do
end
describe
'#action_icon'
do
it
{
expect
(
subject
.
action_icon
).
to
eq
'
icon_action_
stop'
}
it
{
expect
(
subject
.
action_icon
).
to
eq
'stop'
}
end
describe
'#action_title'
do
...
...
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