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
93a20ea8
Commit
93a20ea8
authored
May 03, 2017
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tasks list spec in rspec
parent
b29f91b0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
13 deletions
+22
-13
app/views/projects/issues/_issue.html.haml
app/views/projects/issues/_issue.html.haml
+8
-0
spec/features/task_lists_spec.rb
spec/features/task_lists_spec.rb
+14
-13
No files found.
app/views/projects/issues/_issue.html.haml
View file @
93a20ea8
...
@@ -16,6 +16,10 @@
...
@@ -16,6 +16,10 @@
-
if
issue
.
assignee
-
if
issue
.
assignee
%li
%li
=
link_to_member
(
@project
,
issue
.
assignee
,
name:
false
,
title:
"Assigned to :name"
)
=
link_to_member
(
@project
,
issue
.
assignee
,
name:
false
,
title:
"Assigned to :name"
)
-
if
issue
.
tasks?
%span
.task-status
=
issue
.
task_status
=
render
'shared/issuable_meta_data'
,
issuable:
issue
=
render
'shared/issuable_meta_data'
,
issuable:
issue
...
@@ -37,6 +41,10 @@
...
@@ -37,6 +41,10 @@
-
issue
.
labels
.
each
do
|
label
|
-
issue
.
labels
.
each
do
|
label
|
=
link_to_label
(
label
,
subject:
issue
.
project
,
css_class:
'label-link'
)
=
link_to_label
(
label
,
subject:
issue
.
project
,
css_class:
'label-link'
)
-
if
issue
.
tasks?
%span
.task-status
=
issue
.
task_status
.pull-right.issue-updated-at
.pull-right.issue-updated-at
%span
updated
#{
time_ago_with_tooltip
(
issue
.
updated_at
,
placement:
'bottom'
,
html_class:
'issue_update_ago'
)
}
%span
updated
#{
time_ago_with_tooltip
(
issue
.
updated_at
,
placement:
'bottom'
,
html_class:
'issue_update_ago'
)
}
spec/features/task_lists_spec.rb
View file @
93a20ea8
...
@@ -66,12 +66,11 @@ feature 'Task Lists', feature: true do
...
@@ -66,12 +66,11 @@ feature 'Task Lists', feature: true do
describe
'multiple tasks'
,
js:
true
do
describe
'multiple tasks'
,
js:
true
do
include
WaitForVueResource
include
WaitForVueResource
before
{
wait_for_vue_resource
}
let!
(
:issue
)
{
create
(
:issue
,
description:
markdown
,
author:
user
,
project:
project
)
}
let!
(
:issue
)
{
create
(
:issue
,
description:
markdown
,
author:
user
,
project:
project
)
}
it
'renders'
do
it
'renders'
do
visit_issue
(
project
,
issue
)
visit_issue
(
project
,
issue
)
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'ul.task-list'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'ul.task-list'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'li.task-list-item'
,
count:
6
)
expect
(
page
).
to
have_selector
(
'li.task-list-item'
,
count:
6
)
...
@@ -80,25 +79,24 @@ feature 'Task Lists', feature: true do
...
@@ -80,25 +79,24 @@ feature 'Task Lists', feature: true do
it
'contains the required selectors'
do
it
'contains the required selectors'
do
visit_issue
(
project
,
issue
)
visit_issue
(
project
,
issue
)
wait_for_vue_resource
container
=
'.detail-page-description .description.js-task-list-container'
expect
(
page
).
to
have_selector
(
".wiki .task-list .task-list-item .task-list-item-checkbox"
)
expect
(
page
).
to
have_selector
(
container
)
expect
(
page
).
to
have_selector
(
"
#{
container
}
.wiki .task-list .task-list-item .task-list-item-checkbox"
)
expect
(
page
).
to
have_selector
(
"
#{
container
}
.js-task-list-field"
)
expect
(
page
).
to
have_selector
(
'form.js-issuable-update'
)
expect
(
page
).
to
have_selector
(
'a.btn-close'
)
expect
(
page
).
to
have_selector
(
'a.btn-close'
)
end
end
it
'is only editable by author'
do
it
'is only editable by author'
do
visit_issue
(
project
,
issue
)
visit_issue
(
project
,
issue
)
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.js-task-list-container'
)
expect
(
page
).
to
have_selector
(
".wiki .task-list .task-list-item .task-list-item-checkbox"
)
logout
(
:user
)
logout
(
:user
)
login_as
(
user2
)
login_as
(
user2
)
visit
current_path
visit
current_path
expect
(
page
).
not_to
have_selector
(
'.js-task-list-container'
)
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
".wiki .task-list .task-list-item .task-list-item-checkbox"
)
end
end
it
'provides a summary on Issues#index'
do
it
'provides a summary on Issues#index'
do
...
@@ -112,10 +110,9 @@ feature 'Task Lists', feature: true do
...
@@ -112,10 +110,9 @@ feature 'Task Lists', feature: true do
let!
(
:issue
)
{
create
(
:issue
,
description:
singleIncompleteMarkdown
,
author:
user
,
project:
project
)
}
let!
(
:issue
)
{
create
(
:issue
,
description:
singleIncompleteMarkdown
,
author:
user
,
project:
project
)
}
before
{
wait_for_vue_resource
}
it
'renders'
do
it
'renders'
do
visit_issue
(
project
,
issue
)
visit_issue
(
project
,
issue
)
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'ul.task-list'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'ul.task-list'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'li.task-list-item'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'li.task-list-item'
,
count:
1
)
...
@@ -124,15 +121,18 @@ feature 'Task Lists', feature: true do
...
@@ -124,15 +121,18 @@ feature 'Task Lists', feature: true do
it
'provides a summary on Issues#index'
do
it
'provides a summary on Issues#index'
do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
expect
(
page
).
to
have_content
(
"0 of 1 task completed"
)
expect
(
page
).
to
have_content
(
"0 of 1 task completed"
)
end
end
end
end
describe
'single complete task'
do
describe
'single complete task'
,
js:
true
do
include
WaitForVueResource
let!
(
:issue
)
{
create
(
:issue
,
description:
singleCompleteMarkdown
,
author:
user
,
project:
project
)
}
let!
(
:issue
)
{
create
(
:issue
,
description:
singleCompleteMarkdown
,
author:
user
,
project:
project
)
}
it
'renders'
do
it
'renders'
do
visit_issue
(
project
,
issue
)
visit_issue
(
project
,
issue
)
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'ul.task-list'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'ul.task-list'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'li.task-list-item'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'li.task-list-item'
,
count:
1
)
...
@@ -141,6 +141,7 @@ feature 'Task Lists', feature: true do
...
@@ -141,6 +141,7 @@ feature 'Task Lists', feature: true do
it
'provides a summary on Issues#index'
do
it
'provides a summary on Issues#index'
do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
expect
(
page
).
to
have_content
(
"1 of 1 task completed"
)
expect
(
page
).
to
have_content
(
"1 of 1 task completed"
)
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