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
a72f4ecb
Commit
a72f4ecb
authored
May 03, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken tests - use the corrent event when button is clicked
parent
eed2812f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
9 deletions
+10
-9
app/assets/javascripts/pipelines/components/graph/action_component.vue
...vascripts/pipelines/components/graph/action_component.vue
+2
-2
app/assets/javascripts/pipelines/components/stage.vue
app/assets/javascripts/pipelines/components/stage.vue
+2
-1
app/assets/javascripts/pipelines/pipeline_details_bundle.js
app/assets/javascripts/pipelines/pipeline_details_bundle.js
+2
-2
spec/features/projects/pipelines/pipelines_spec.rb
spec/features/projects/pipelines/pipelines_spec.rb
+3
-3
spec/javascripts/pipelines/graph/action_component_spec.js
spec/javascripts/pipelines/graph/action_component_spec.js
+1
-1
No files found.
app/assets/javascripts/pipelines/components/graph/action_component.vue
View file @
a72f4ecb
...
@@ -61,7 +61,7 @@ export default {
...
@@ -61,7 +61,7 @@ export default {
methods
:
{
methods
:
{
onClickAction
()
{
onClickAction
()
{
$
(
this
.
$el
).
tooltip
(
'
hide
'
);
$
(
this
.
$el
).
tooltip
(
'
hide
'
);
eventHub
.
$emit
(
'
graph
Action
'
,
this
.
link
);
eventHub
.
$emit
(
'
post
Action
'
,
this
.
link
);
this
.
linkRequested
=
this
.
link
;
this
.
linkRequested
=
this
.
link
;
this
.
isDisabled
=
true
;
this
.
isDisabled
=
true
;
},
},
...
@@ -75,7 +75,7 @@ export default {
...
@@ -75,7 +75,7 @@ export default {
v-tooltip
v-tooltip
:title=
"tooltipText"
:title=
"tooltipText"
class=
"js-ci-action btn btn-blank
class=
"js-ci-action btn btn-blank
btn-transparent ci-action-icon-container ci-action-icon-wrapper
js-ci-action-icon
"
btn-transparent ci-action-icon-container ci-action-icon-wrapper"
:class=
"cssClass"
:class=
"cssClass"
data-container=
"body"
data-container=
"body"
:disabled=
"isDisabled"
:disabled=
"isDisabled"
...
...
app/assets/javascripts/pipelines/components/stage.vue
View file @
a72f4ecb
...
@@ -117,7 +117,8 @@ export default {
...
@@ -117,7 +117,8 @@ export default {
*/
*/
stopDropdownClickPropagation
()
{
stopDropdownClickPropagation
()
{
$
(
$
(
this
.
$el
.
querySelectorAll
(
'
.js-builds-dropdown-list a.mini-pipeline-graph-dropdown-item
'
),
'
.js-builds-dropdown-list button, .js-builds-dropdown-list a.mini-pipeline-graph-dropdown-item
'
,
this
.
$el
,
).
on
(
'
click
'
,
e
=>
{
).
on
(
'
click
'
,
e
=>
{
e
.
stopPropagation
();
e
.
stopPropagation
();
});
});
...
...
app/assets/javascripts/pipelines/pipeline_details_bundle.js
View file @
a72f4ecb
...
@@ -29,10 +29,10 @@ export default () => {
...
@@ -29,10 +29,10 @@ export default () => {
};
};
},
},
created
()
{
created
()
{
eventHub
.
$on
(
'
graph
Action
'
,
this
.
postAction
);
eventHub
.
$on
(
'
post
Action
'
,
this
.
postAction
);
},
},
beforeDestroy
()
{
beforeDestroy
()
{
eventHub
.
$off
(
'
graph
Action
'
,
this
.
postAction
);
eventHub
.
$off
(
'
post
Action
'
,
this
.
postAction
);
},
},
methods
:
{
methods
:
{
postAction
(
action
)
{
postAction
(
action
)
{
...
...
spec/features/projects/pipelines/pipelines_spec.rb
View file @
a72f4ecb
...
@@ -388,9 +388,9 @@ describe 'Pipelines', :js do
...
@@ -388,9 +388,9 @@ describe 'Pipelines', :js do
it
'should be possible to cancel pending build'
do
it
'should be possible to cancel pending build'
do
find
(
'.js-builds-dropdown-button'
).
click
find
(
'.js-builds-dropdown-button'
).
click
find
(
'.js-ci-action-icon'
).
click
find
(
'.js-ci-action'
).
click
wait_for_requests
expect
(
page
).
to
have_content
(
'canceled'
)
expect
(
build
.
reload
).
to
be_canceled
expect
(
build
.
reload
).
to
be_canceled
end
end
end
end
...
@@ -407,7 +407,7 @@ describe 'Pipelines', :js do
...
@@ -407,7 +407,7 @@ describe 'Pipelines', :js do
within
(
'.js-builds-dropdown-list'
)
do
within
(
'.js-builds-dropdown-list'
)
do
build_element
=
page
.
find
(
'.mini-pipeline-graph-dropdown-item'
)
build_element
=
page
.
find
(
'.mini-pipeline-graph-dropdown-item'
)
expect
(
build_element
[
'data-title'
]).
to
eq
(
'build - failed <br> (unknown failure)'
)
expect
(
build_element
[
'data-
original-
title'
]).
to
eq
(
'build - failed <br> (unknown failure)'
)
end
end
end
end
end
end
...
...
spec/javascripts/pipelines/graph/action_component_spec.js
View file @
a72f4ecb
...
@@ -22,7 +22,7 @@ describe('pipeline graph action component', () => {
...
@@ -22,7 +22,7 @@ describe('pipeline graph action component', () => {
});
});
it
(
'
should emit an event with the provided link
'
,
()
=>
{
it
(
'
should emit an event with the provided link
'
,
()
=>
{
eventHub
.
$on
(
'
graph
Action
'
,
link
=>
{
eventHub
.
$on
(
'
post
Action
'
,
link
=>
{
expect
(
link
).
toEqual
(
'
foo
'
);
expect
(
link
).
toEqual
(
'
foo
'
);
});
});
});
});
...
...
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