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
Tatuya Kamada
gitlab-ce
Commits
63289982
Commit
63289982
authored
Aug 30, 2016
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug where pagination is still displayed despite all todos marked as done
parent
51087cfa
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
2 deletions
+18
-2
CHANGELOG
CHANGELOG
+1
-0
app/assets/javascripts/todos.js
app/assets/javascripts/todos.js
+1
-1
app/views/dashboard/todos/index.html.haml
app/views/dashboard/todos/index.html.haml
+1
-1
features/steps/dashboard/todos.rb
features/steps/dashboard/todos.rb
+1
-0
spec/features/todos/todos_spec.rb
spec/features/todos/todos_spec.rb
+14
-0
No files found.
CHANGELOG
View file @
63289982
...
@@ -10,6 +10,7 @@ v 8.12.0 (unreleased)
...
@@ -10,6 +10,7 @@ v 8.12.0 (unreleased)
- Reduce contributions calendar data payload (ClemMakesApps)
- Reduce contributions calendar data payload (ClemMakesApps)
- Add `web_url` field to issue, merge request, and snippet API objects (Ben Boeckel)
- Add `web_url` field to issue, merge request, and snippet API objects (Ben Boeckel)
- Set path for all JavaScript cookies to honor GitLab's subdirectory setting !5627 (Mike Greiling)
- Set path for all JavaScript cookies to honor GitLab's subdirectory setting !5627 (Mike Greiling)
- Fix bug where pagination is still displayed despite all todos marked as done (ClemMakesApps)
- Shorten task status phrase (ClemMakesApps)
- Shorten task status phrase (ClemMakesApps)
- Add hover color to emoji icon (ClemMakesApps)
- Add hover color to emoji icon (ClemMakesApps)
- Fix branches page dropdown sort alignment (ClemMakesApps)
- Fix branches page dropdown sort alignment (ClemMakesApps)
...
...
app/assets/javascripts/todos.js
View file @
63289982
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
success
:
(
function
(
_this
)
{
success
:
(
function
(
_this
)
{
return
function
(
data
)
{
return
function
(
data
)
{
$this
.
remove
();
$this
.
remove
();
$
(
'
.
js-todos-list
'
).
remove
(
);
$
(
'
.
prepend-top-default
'
).
html
(
'
<div class="nothing-here-block">You
\'
re all done!</div>
'
);
return
_this
.
updateBadges
(
data
);
return
_this
.
updateBadges
(
data
);
};
};
})(
this
)
})(
this
)
...
...
app/views/dashboard/todos/index.html.haml
View file @
63289982
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
-
if
@todos
.
any?
-
if
@todos
.
any?
.js-todos-options
{
data:
{
per_page:
@todos
.
limit_value
,
current_page:
@todos
.
current_page
,
total_pages:
@todos
.
total_pages
}
}
.js-todos-options
{
data:
{
per_page:
@todos
.
limit_value
,
current_page:
@todos
.
current_page
,
total_pages:
@todos
.
total_pages
}
}
-
@todos
.
group_by
(
&
:project
).
each
do
|
group
|
-
@todos
.
group_by
(
&
:project
).
each
do
|
group
|
.panel.panel-default.panel-small
.js-todos-list
.panel.panel-default.panel-small
-
project
=
group
[
0
]
-
project
=
group
[
0
]
.panel-heading
.panel-heading
=
link_to
project
.
name_with_namespace
,
namespace_project_path
(
project
.
namespace
,
project
)
=
link_to
project
.
name_with_namespace
,
namespace_project_path
(
project
.
namespace
,
project
)
...
...
features/steps/dashboard/todos.rb
View file @
63289982
...
@@ -54,6 +54,7 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
...
@@ -54,6 +54,7 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
page
.
within
(
'.todos-pending-count'
)
{
expect
(
page
).
to
have_content
'0'
}
page
.
within
(
'.todos-pending-count'
)
{
expect
(
page
).
to
have_content
'0'
}
expect
(
page
).
to
have_content
'To do 0'
expect
(
page
).
to
have_content
'To do 0'
expect
(
page
).
to
have_content
'Done 4'
expect
(
page
).
to
have_content
'Done 4'
expect
(
page
).
to
have_content
"You're all done!"
expect
(
page
).
not_to
have_link
project
.
name_with_namespace
expect
(
page
).
not_to
have_link
project
.
name_with_namespace
should_not_see_todo
"John Doe assigned you merge request
#{
merge_request
.
to_reference
}
"
should_not_see_todo
"John Doe assigned you merge request
#{
merge_request
.
to_reference
}
"
should_not_see_todo
"John Doe mentioned you on issue
#{
issue
.
to_reference
}
"
should_not_see_todo
"John Doe mentioned you on issue
#{
issue
.
to_reference
}
"
...
...
spec/features/todos/todos_spec.rb
View file @
63289982
...
@@ -118,6 +118,20 @@ describe 'Dashboard Todos', feature: true do
...
@@ -118,6 +118,20 @@ describe 'Dashboard Todos', feature: true do
expect
(
page
).
to
have_css
(
"#todo_
#{
Todo
.
first
.
id
}
"
)
expect
(
page
).
to
have_css
(
"#todo_
#{
Todo
.
first
.
id
}
"
)
end
end
end
end
describe
'mark all as done'
,
js:
true
do
before
do
visit
dashboard_todos_path
click_link
(
'Mark all as done'
)
end
it
'shows "All done" message!'
do
within
(
'.todos-pending-count'
)
{
expect
(
page
).
to
have_content
'0'
}
expect
(
page
).
to
have_content
'To do 0'
expect
(
page
).
to
have_content
"You're all done!"
expect
(
page
).
not_to
have_selector
(
'.gl-pagination'
)
end
end
end
end
context
'User has a Todo in a project pending deletion'
do
context
'User has a Todo in a project pending deletion'
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