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
Léo-Paul Géneau
gitlab-ce
Commits
3417e97c
Commit
3417e97c
authored
Apr 24, 2017
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a few tests (not all) - update title in tab with new issue
parent
76cdb8ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
+29
-3
app/assets/javascripts/issue_show/issue_title_description.vue
...assets/javascripts/issue_show/issue_title_description.vue
+6
-2
spec/features/task_lists_spec.rb
spec/features/task_lists_spec.rb
+23
-1
No files found.
app/assets/javascripts/issue_show/issue_title_description.vue
View file @
3417e97c
...
@@ -68,6 +68,8 @@ export default {
...
@@ -68,6 +68,8 @@ export default {
this
.
timeoutId
=
setTimeout
(()
=>
{
this
.
timeoutId
=
setTimeout
(()
=>
{
this
.
title
=
title
;
this
.
title
=
title
;
document
.
querySelector
(
'
title
'
).
innerText
=
title
;
this
.
description
=
description
;
this
.
description
=
description
;
elementsToVisualize
.
forEach
((
element
)
=>
{
elementsToVisualize
.
forEach
((
element
)
=>
{
...
@@ -98,13 +100,15 @@ export default {
...
@@ -98,13 +100,15 @@ export default {
});
});
},
},
updated
()
{
updated
()
{
new
gl
.
TaskList
({
const
tl
=
new
gl
.
TaskList
({
dataType
:
'
issue
'
,
dataType
:
'
issue
'
,
fieldName
:
'
description
'
,
fieldName
:
'
description
'
,
selector
:
'
.detail-page-description
'
,
selector
:
'
.detail-page-description
'
,
})
.
init
()
;
});
$
(
this
.
$refs
[
'
issue-content-container-gfm-entry
'
]).
renderGFM
();
$
(
this
.
$refs
[
'
issue-content-container-gfm-entry
'
]).
renderGFM
();
return
tl
;
},
},
};
};
</
script
>
</
script
>
...
...
spec/features/task_lists_spec.rb
View file @
3417e97c
...
@@ -63,12 +63,16 @@ feature 'Task Lists', feature: true do
...
@@ -63,12 +63,16 @@ feature 'Task Lists', feature: true do
end
end
describe
'for Issues'
do
describe
'for Issues'
do
describe
'multiple tasks'
do
include
WaitForVueResource
describe
'multiple tasks'
,
js:
true
do
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
)
expect
(
page
).
to
have_selector
(
'ul input[checked]'
,
count:
2
)
expect
(
page
).
to
have_selector
(
'ul input[checked]'
,
count:
2
)
...
@@ -79,6 +83,8 @@ feature 'Task Lists', feature: true do
...
@@ -79,6 +83,8 @@ feature 'Task Lists', feature: true do
container
=
'.detail-page-description .description.js-task-list-container'
container
=
'.detail-page-description .description.js-task-list-container'
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
container
)
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
}
.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
(
"
#{
container
}
.js-task-list-field"
)
...
@@ -88,12 +94,17 @@ feature 'Task Lists', feature: true do
...
@@ -88,12 +94,17 @@ feature 'Task Lists', feature: true do
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
(
'.js-task-list-container'
)
logout
(
:user
)
logout
(
:user
)
login_as
(
user2
)
login_as
(
user2
)
visit
current_path
visit
current_path
wait_for_vue_resource
expect
(
page
).
not_to
have_selector
(
'.js-task-list-container'
)
expect
(
page
).
not_to
have_selector
(
'.js-task-list-container'
)
end
end
...
@@ -109,6 +120,8 @@ feature 'Task Lists', feature: true do
...
@@ -109,6 +120,8 @@ feature 'Task Lists', feature: true do
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
)
expect
(
page
).
to
have_selector
(
'ul input[checked]'
,
count:
0
)
expect
(
page
).
to
have_selector
(
'ul input[checked]'
,
count:
0
)
...
@@ -126,6 +139,8 @@ feature 'Task Lists', feature: true do
...
@@ -126,6 +139,8 @@ feature 'Task Lists', feature: true do
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
)
expect
(
page
).
to
have_selector
(
'ul input[checked]'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'ul input[checked]'
,
count:
1
)
...
@@ -143,6 +158,9 @@ feature 'Task Lists', feature: true do
...
@@ -143,6 +158,9 @@ feature 'Task Lists', feature: true do
before
{
visit_issue
(
project
,
issue
)
}
before
{
visit_issue
(
project
,
issue
)
}
it
'renders'
do
it
'renders'
do
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'ul.task-list'
,
count:
2
)
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
(
'li.task-list-item'
,
count:
7
)
expect
(
page
).
to
have_selector
(
'ul input[checked]'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'ul input[checked]'
,
count:
1
)
...
@@ -152,6 +170,8 @@ feature 'Task Lists', feature: true do
...
@@ -152,6 +170,8 @@ feature 'Task Lists', feature: true do
it
'solves tasks'
do
it
'solves tasks'
do
expect
(
page
).
to
have_content
(
"2 of 7 tasks completed"
)
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'
,
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 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
page
.
find
(
'li.task-list-item ol li.task-list-item'
,
text:
'Task 1.1'
).
find
(
'input'
).
click
...
@@ -160,6 +180,8 @@ feature 'Task Lists', feature: true do
...
@@ -160,6 +180,8 @@ feature 'Task Lists', feature: true do
visit_issue
(
project
,
issue
)
# reload to see new system notes
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 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 a.2 as complete'
)
expect
(
page
).
to
have_content
(
'marked the task Task 1.1 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