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
cfc03dab
Commit
cfc03dab
authored
May 01, 2017
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix rubocop offenses
parent
7021e867
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
17 deletions
+9
-17
app/assets/javascripts/issue_show/issue_title_description.vue
...assets/javascripts/issue_show/issue_title_description.vue
+1
-2
spec/features/task_lists_spec.rb
spec/features/task_lists_spec.rb
+8
-15
No files found.
app/assets/javascripts/issue_show/issue_title_description.vue
View file @
cfc03dab
...
...
@@ -43,7 +43,6 @@ export default {
methods
:
{
renderResponse
(
res
)
{
this
.
apiData
=
JSON
.
parse
(
res
.
body
);
this
.
issueIID
=
this
.
apiData
.
issue_number
;
this
.
triggerAnimation
();
},
updateTaskHTML
()
{
...
...
@@ -90,7 +89,7 @@ export default {
setTabTitle
()
{
const
currentTabTitle
=
document
.
querySelector
(
'
title
'
);
const
currentTabTitleScope
=
currentTabTitle
.
innerText
.
split
(
'
·
'
);
currentTabTitleScope
[
0
]
=
`
${
this
.
titleText
}
(#
${
this
.
issueIID
}
) `
;
currentTabTitleScope
[
0
]
=
`
${
this
.
titleText
}
(#
${
this
.
apiData
.
issue_number
}
) `
;
currentTabTitle
.
innerText
=
currentTabTitleScope
.
join
(
'
·
'
);
},
animate
(
title
,
description
,
elementsToVisualize
)
{
...
...
spec/features/task_lists_spec.rb
View file @
cfc03dab
...
...
@@ -62,15 +62,16 @@ feature 'Task Lists', feature: true do
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
end
describe
'for Issues'
do
describe
'for Issues'
,
js:
true
do
include
WaitForVueResource
before
{
wait_for_vue_resource
}
describe
'multiple tasks'
,
js:
true
do
let!
(
:issue
)
{
create
(
:issue
,
description:
markdown
,
author:
user
,
project:
project
)
}
it
'renders'
do
visit_issue
(
project
,
issue
)
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'ul.task-list'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'li.task-list-item'
,
count:
6
)
...
...
@@ -79,7 +80,6 @@ feature 'Task Lists', feature: true do
it
'contains the required selectors'
do
visit_issue
(
project
,
issue
)
wait_for_vue_resource
container
=
'.detail-page-description .description.js-task-list-container'
...
...
@@ -92,14 +92,12 @@ feature 'Task Lists', feature: true do
it
'is only editable by author'
do
visit_issue
(
project
,
issue
)
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.js-task-list-container'
)
logout
(
:user
)
login_as
(
user2
)
visit
current_path
wait_for_vue_resource
expect
(
page
).
not_to
have_selector
(
'.js-task-list-container'
)
end
...
...
@@ -109,12 +107,15 @@ feature 'Task Lists', feature: true do
end
end
describe
'single incomplete task'
do
describe
'single incomplete task'
,
js:
true
do
include
WaitForVueResource
let!
(
:issue
)
{
create
(
:issue
,
description:
singleIncompleteMarkdown
,
author:
user
,
project:
project
)
}
before
{
wait_for_vue_resource
}
it
'renders'
do
visit_issue
(
project
,
issue
)
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'ul.task-list'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'li.task-list-item'
,
count:
1
)
...
...
@@ -132,7 +133,6 @@ feature 'Task Lists', feature: true do
it
'renders'
do
visit_issue
(
project
,
issue
)
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'ul.task-list'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'li.task-list-item'
,
count:
1
)
...
...
@@ -151,9 +151,6 @@ feature 'Task Lists', feature: true do
before
{
visit_issue
(
project
,
issue
)
}
it
'renders'
do
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'ul.task-list'
,
count:
2
)
expect
(
page
).
to
have_selector
(
'li.task-list-item'
,
count:
7
)
expect
(
page
).
to
have_selector
(
'ul input[checked]'
,
count:
1
)
...
...
@@ -163,8 +160,6 @@ feature 'Task Lists', feature: true do
it
'solves tasks'
do
expect
(
page
).
to
have_content
(
"2 of 7 tasks completed"
)
wait_for_vue_resource
page
.
find
(
'li.task-list-item'
,
text:
'Task b'
).
find
(
'input'
).
click
page
.
find
(
'li.task-list-item ul li.task-list-item'
,
text:
'Task a.2'
).
find
(
'input'
).
click
page
.
find
(
'li.task-list-item ol li.task-list-item'
,
text:
'Task 1.1'
).
find
(
'input'
).
click
...
...
@@ -173,8 +168,6 @@ feature 'Task Lists', feature: true do
visit_issue
(
project
,
issue
)
# reload to see new system notes
wait_for_vue_resource
expect
(
page
).
to
have_content
(
'marked the task Task b as complete'
)
expect
(
page
).
to
have_content
(
'marked the task Task a.2 as complete'
)
expect
(
page
).
to
have_content
(
'marked the task Task 1.1 as complete'
)
...
...
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