BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
+29
-3
issue_title_description.vue
...assets/javascripts/issue_show/issue_title_description.vue
+6
-2
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 {
this
.
timeoutId
=
setTimeout
(()
=>
{
this
.
title
=
title
;
document
.
querySelector
(
'title'
).
innerText
=
title
;
this
.
description
=
description
;
elementsToVisualize
.
forEach
((
element
)
=>
{
...
...
@@ -98,13 +100,15 @@ export default {
});
},
updated
()
{
new
gl
.
TaskList
({
const
tl
=
new
gl
.
TaskList
({
dataType
:
'issue'
,
fieldName
:
'description'
,
selector
:
'.detail-page-description'
,
})
.
init
()
;
});
$
(
this
.
$refs
[
'issue-content-container-gfm-entry'
]).
renderGFM
();
return
tl
;
},
};
</
script
>
...
...
spec/features/task_lists_spec.rb
View file @
3417e97c
...
...
@@ -63,12 +63,16 @@ feature 'Task Lists', feature: true do
end
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
)
}
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
)
expect
(
page
).
to
have_selector
(
'ul input[checked]'
,
count:
2
)
...
...
@@ -79,6 +83,8 @@ feature 'Task Lists', feature: true do
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
}
.wiki .task-list .task-list-item .task-list-item-checkbox"
)
expect
(
page
).
to
have_selector
(
"
#{
container
}
.js-task-list-field"
)
...
...
@@ -88,12 +94,17 @@ 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,6 +120,8 @@ 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
)
expect
(
page
).
to
have_selector
(
'ul input[checked]'
,
count:
0
)
...
...
@@ -126,6 +139,8 @@ 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
)
expect
(
page
).
to
have_selector
(
'ul input[checked]'
,
count:
1
)
...
...
@@ -143,6 +158,9 @@ 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
)
...
...
@@ -152,6 +170,8 @@ 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
...
...
@@ -160,6 +180,8 @@ 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