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
Jérome Perrin
gitlab-ce
Commits
22bbb24f
Commit
22bbb24f
authored
Dec 22, 2016
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix viewing "build failed" TODOs
parent
6e2a6fd0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
app/helpers/todos_helper.rb
app/helpers/todos_helper.rb
+1
-1
spec/factories/todos.rb
spec/factories/todos.rb
+1
-0
spec/features/todos/todos_spec.rb
spec/features/todos/todos_spec.rb
+19
-0
No files found.
app/helpers/todos_helper.rb
View file @
22bbb24f
...
...
@@ -35,7 +35,7 @@ module TodosHelper
else
path
=
[
todo
.
project
.
namespace
.
becomes
(
Namespace
),
todo
.
project
,
todo
.
target
]
path
.
unshift
(
:
build
s
)
if
todo
.
build_failed?
path
.
unshift
(
:
pipeline
s
)
if
todo
.
build_failed?
polymorphic_path
(
path
,
anchor:
anchor
)
end
...
...
spec/factories/todos.rb
View file @
22bbb24f
...
...
@@ -21,6 +21,7 @@ FactoryGirl.define do
trait
:build_failed
do
action
{
Todo
::
BUILD_FAILED
}
target
factory: :merge_request
end
trait
:approval_required
do
...
...
spec/features/todos/todos_spec.rb
View file @
22bbb24f
...
...
@@ -155,5 +155,24 @@ describe 'Dashboard Todos', feature: true do
expect
(
page
).
to
have_selector
(
'.todos-all-done'
,
count:
1
)
end
end
context
'User has a Build Failed todo'
do
let!
(
:todo
)
{
create
(
:todo
,
:build_failed
,
user:
user
,
project:
project
,
author:
author
)
}
before
do
login_as
user
visit
dashboard_todos_path
end
it
'shows the todo'
do
expect
(
page
).
to
have_content
'The build failed for your merge request'
end
it
'links to the pipelines for the merge request'
do
href
=
pipelines_namespace_project_merge_request_path
(
project
.
namespace
,
project
,
todo
.
target
)
expect
(
page
).
to
have_link
"merge request
#{
todo
.
target
.
to_reference
}
"
,
href
end
end
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