Commit 8068d3e1 authored by Jacob Schatz's avatar Jacob Schatz

Merge branch '23025-issue-boards-defaults' into 'master'

Change issue board defaults

#### What does this MR do?
Changes the issue board default list from `Development`, `Testing`, `Production`, `Ready` to `To Do` and `Doing`

#### Screenshots (if relevant)
![Screen_Shot_2016-10-06_at_8.46.48_AM](/uploads/6e73e03f5749f18b95bd7e23c676603d/Screen_Shot_2016-10-06_at_8.46.48_AM.png)
![Screen_Shot_2016-10-06_at_9.07.06_AM](/uploads/cadd3af74e3adb73fe854478ce95120e/Screen_Shot_2016-10-06_at_9.07.06_AM.png)

#### What are the relevant issue numbers?
Closes #23025

See merge request !6716
parents a625757c 35e231b5
...@@ -8,10 +8,8 @@ ...@@ -8,10 +8,8 @@
data () { data () {
return { return {
predefinedLabels: [ predefinedLabels: [
new ListLabel({ title: 'Development', color: '#5CB85C' }), new ListLabel({ title: 'To Do', color: '#F0AD4E' }),
new ListLabel({ title: 'Testing', color: '#F0AD4E' }), new ListLabel({ title: 'Doing', color: '#5CB85C' })
new ListLabel({ title: 'Production', color: '#FF5F00' }),
new ListLabel({ title: 'Ready', color: '#FF0000' })
] ]
} }
}, },
......
...@@ -25,10 +25,8 @@ module Boards ...@@ -25,10 +25,8 @@ module Boards
def label_params def label_params
[ [
{ name: 'Development', color: '#5CB85C' }, { name: 'To Do', color: '#F0AD4E' },
{ name: 'Testing', color: '#F0AD4E' }, { name: 'Doing', color: '#5CB85C' }
{ name: 'Production', color: '#FF5F00' },
{ name: 'Ready', color: '#FF0000' }
] ]
end end
end end
......
...@@ -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])
......
...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment