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
35e231b5
Commit
35e231b5
authored
Oct 06, 2016
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update issue board spec
parent
f4c2f3a4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+2
-2
spec/services/boards/lists/generate_service_spec.rb
spec/services/boards/lists/generate_service_spec.rb
+4
-5
No files found.
spec/features/boards/boards_spec.rb
View file @
35e231b5
...
@@ -34,14 +34,14 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -34,14 +34,14 @@ describe 'Issue Boards', feature: true, js: true do
end
end
it
'creates default lists'
do
it
'creates default lists'
do
lists
=
[
'Backlog'
,
'
Development'
,
'Testing'
,
'Production'
,
'Ready
'
,
'Done'
]
lists
=
[
'Backlog'
,
'
To Do'
,
'Doing
'
,
'Done'
]
page
.
within
(
find
(
'.board-blank-state'
))
do
page
.
within
(
find
(
'.board-blank-state'
))
do
click_button
(
'Add default lists'
)
click_button
(
'Add default lists'
)
end
end
wait_for_vue_resource
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.board'
,
count:
6
)
expect
(
page
).
to
have_selector
(
'.board'
,
count:
4
)
page
.
all
(
'.board'
).
each_with_index
do
|
list
,
i
|
page
.
all
(
'.board'
).
each_with_index
do
|
list
,
i
|
expect
(
list
.
find
(
'.board-title'
)).
to
have_content
(
lists
[
i
])
expect
(
list
.
find
(
'.board-title'
)).
to
have_content
(
lists
[
i
])
...
...
spec/services/boards/lists/generate_service_spec.rb
View file @
35e231b5
...
@@ -10,7 +10,7 @@ describe Boards::Lists::GenerateService, services: true do
...
@@ -10,7 +10,7 @@ describe Boards::Lists::GenerateService, services: true do
context
'when board lists is empty'
do
context
'when board lists is empty'
do
it
'creates the default lists'
do
it
'creates the default lists'
do
expect
{
service
.
execute
}.
to
change
(
board
.
lists
,
:count
).
by
(
4
)
expect
{
service
.
execute
}.
to
change
(
board
.
lists
,
:count
).
by
(
2
)
end
end
end
end
...
@@ -24,16 +24,15 @@ describe Boards::Lists::GenerateService, services: true do
...
@@ -24,16 +24,15 @@ describe Boards::Lists::GenerateService, services: true do
context
'when project labels does not contains any list label'
do
context
'when project labels does not contains any list label'
do
it
'creates labels'
do
it
'creates labels'
do
expect
{
service
.
execute
}.
to
change
(
project
.
labels
,
:count
).
by
(
4
)
expect
{
service
.
execute
}.
to
change
(
project
.
labels
,
:count
).
by
(
2
)
end
end
end
end
context
'when project labels contains some of list label'
do
context
'when project labels contains some of list label'
do
it
'creates the missing labels'
do
it
'creates the missing labels'
do
create
(
:label
,
project:
project
,
name:
'Development'
)
create
(
:label
,
project:
project
,
name:
'Doing'
)
create
(
:label
,
project:
project
,
name:
'Ready'
)
expect
{
service
.
execute
}.
to
change
(
project
.
labels
,
:count
).
by
(
2
)
expect
{
service
.
execute
}.
to
change
(
project
.
labels
,
:count
).
by
(
1
)
end
end
end
end
end
end
...
...
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