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
285049b9
Commit
285049b9
authored
May 31, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spec updates
parent
f452c1aa
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
6 deletions
+22
-6
app/assets/javascripts/boards/components/modal/lists_dropdown.js
...ets/javascripts/boards/components/modal/lists_dropdown.js
+1
-1
app/assets/javascripts/boards/stores/boards_store.js
app/assets/javascripts/boards/stores/boards_store.js
+1
-1
spec/controllers/projects/boards/lists_controller_spec.rb
spec/controllers/projects/boards/lists_controller_spec.rb
+1
-1
spec/factories/lists.rb
spec/factories/lists.rb
+6
-0
spec/fixtures/api/schemas/list.json
spec/fixtures/api/schemas/list.json
+1
-1
spec/services/boards/create_service_spec.rb
spec/services/boards/create_service_spec.rb
+3
-2
spec/services/boards/issues/list_service_spec.rb
spec/services/boards/issues/list_service_spec.rb
+9
-0
No files found.
app/assets/javascripts/boards/components/modal/lists_dropdown.js
View file @
285049b9
...
...
@@ -11,7 +11,7 @@ gl.issueBoards.ModalFooterListsDropdown = Vue.extend({
},
computed
:
{
selected
()
{
return
this
.
modal
.
selectedList
||
this
.
state
.
lists
[
0
];
return
this
.
modal
.
selectedList
||
this
.
state
.
lists
[
1
];
},
},
destroyed
()
{
...
...
app/assets/javascripts/boards/stores/boards_store.js
View file @
285049b9
...
...
@@ -51,7 +51,7 @@ gl.issueBoards.BoardsStore = {
},
shouldAddBlankState
()
{
// Decide whether to add the blank state
return
!
(
this
.
state
.
lists
.
filter
(
list
=>
list
.
type
!==
'
backlog
'
&&
list
.
type
!==
'
done
'
)[
0
]);
return
!
(
this
.
state
.
lists
.
filter
(
list
=>
list
.
type
!==
'
backlog
'
&&
list
.
type
!==
'
closed
'
)[
0
]);
},
addBlankState
()
{
if
(
!
this
.
shouldAddBlankState
()
||
this
.
welcomeIsHidden
()
||
this
.
disabled
)
return
;
...
...
spec/controllers/projects/boards/lists_controller_spec.rb
View file @
285049b9
...
...
@@ -27,7 +27,7 @@ describe Projects::Boards::ListsController do
parsed_response
=
JSON
.
parse
(
response
.
body
)
expect
(
response
).
to
match_response_schema
(
'lists'
)
expect
(
parsed_response
.
length
).
to
eq
2
expect
(
parsed_response
.
length
).
to
eq
3
end
context
'with unauthorized user'
do
...
...
spec/factories/lists.rb
View file @
285049b9
...
...
@@ -6,6 +6,12 @@ FactoryGirl.define do
sequence
(
:position
)
end
factory
:backlog_list
,
parent: :list
do
list_type
:backlog
label
nil
position
nil
end
factory
:closed_list
,
parent: :list
do
list_type
:closed
label
nil
...
...
spec/fixtures/api/schemas/list.json
View file @
285049b9
...
...
@@ -10,7 +10,7 @@
"id"
:
{
"type"
:
"integer"
},
"list_type"
:
{
"type"
:
"string"
,
"enum"
:
[
"label"
,
"closed"
]
"enum"
:
[
"
backlog"
,
"
label"
,
"closed"
]
},
"label"
:
{
"type"
:
[
"object"
,
"null"
],
...
...
spec/services/boards/create_service_spec.rb
View file @
285049b9
...
...
@@ -14,8 +14,9 @@ describe Boards::CreateService, services: true do
it
'creates the default lists'
do
board
=
service
.
execute
expect
(
board
.
lists
.
size
).
to
eq
1
expect
(
board
.
lists
.
first
).
to
be_closed
expect
(
board
.
lists
.
size
).
to
eq
2
expect
(
board
.
lists
.
first
).
to
be_backlog
expect
(
board
.
lists
.
last
).
to
be_closed
end
end
...
...
spec/services/boards/issues/list_service_spec.rb
View file @
285049b9
...
...
@@ -13,6 +13,7 @@ describe Boards::Issues::ListService, services: true do
let
(
:p2
)
{
create
(
:label
,
title:
'P2'
,
project:
project
,
priority:
2
)
}
let
(
:p3
)
{
create
(
:label
,
title:
'P3'
,
project:
project
,
priority:
3
)
}
let!
(
:backlog
)
{
create
(
:backlog_list
,
board:
board
)
}
let!
(
:list1
)
{
create
(
:list
,
board:
board
,
label:
development
,
position:
0
)
}
let!
(
:list2
)
{
create
(
:list
,
board:
board
,
label:
testing
,
position:
1
)
}
let!
(
:closed
)
{
create
(
:closed_list
,
board:
board
)
}
...
...
@@ -53,6 +54,14 @@ describe Boards::Issues::ListService, services: true do
expect
(
issues
).
to
eq
[
opened_issue2
,
reopened_issue1
,
opened_issue1
]
end
it
'returns opened issues when listing issues from Backlog'
do
params
=
{
board_id:
board
.
id
,
id:
backlog
.
id
}
issues
=
described_class
.
new
(
project
,
user
,
params
).
execute
expect
(
issues
).
to
eq
[
opened_issue2
,
reopened_issue1
,
opened_issue1
]
end
it
'returns closed issues when listing issues from Closed'
do
params
=
{
board_id:
board
.
id
,
id:
closed
.
id
}
...
...
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