Change board seed data

pull/7239/head
Henriette Dinger 6 years ago
parent 92f20962d7
commit f8817b201d
  1. 25
      app/seeders/demo_data/work_package_board_seeder.rb
  2. 31
      config/locales/en.seeders.standard.yml
  3. 2
      spec/seeders/demo_data_seeder_spec.rb

@ -107,6 +107,7 @@ module DemoData
def seed_basic_board
board = ::Boards::Grid.new project: project
board.name = project_data_for(key, 'boards.basic.name')
board.options = { 'highlightingMode' => 'priority' }
board.widgets = seed_basic_board_queries.each_with_index.map do |query, i|
Grids::Widget.new start_row: 1, end_row: 2,
@ -145,21 +146,19 @@ module DemoData
def query_list_work_package_association
wps = [
[WorkPackage.find_by(subject: 'Plan a hiking trip').id,
WorkPackage.find_by(subject: 'Sow flowers').id,
WorkPackage.find_by(subject: 'Cut the lawn').id,
WorkPackage.find_by(subject: 'Cut trees').id],
[WorkPackage.find_by(subject: 'Visit the fire department').id],
[WorkPackage.find_by(subject: 'Visit the ocean').id,
WorkPackage.find_by(subject: 'Learn how to dive').id],
[WorkPackage.find_by(subject: 'Eat more bananas').id,
WorkPackage.find_by(subject: 'Buy a parasol').id]
[WorkPackage.find_by(subject: 'Create a new project').id,
WorkPackage.find_by(subject: 'Edit a work package').id,
WorkPackage.find_by(subject: 'Create work packages').id,
WorkPackage.find_by(subject: 'Activate further modules').id],
[WorkPackage.find_by(subject: 'Create a project plan').id],
[WorkPackage.find_by(subject: 'Invite new team members').id],
[WorkPackage.find_by(subject: 'Customize project overview page').id]
]
[{ name: 'Green list', wps: wps[0] },
{ name: 'Red list', wps: wps[1] },
{ name: 'Blue list', wps: wps[2] },
{ name: 'Yellow list', wps: wps[3] }]
[{ name: 'Today', wps: wps[0] },
{ name: 'Tomorrow', wps: wps[1] },
{ name: 'Later', wps: wps[2] },
{ name: 'Never', wps: wps[3] }]
end
end
end

@ -105,9 +105,9 @@ en:
- assigned_to
boards:
kanban:
name: 'KANBAN Board'
name: 'Kanban board'
basic:
name: 'Basic Board'
name: 'Task board'
work_packages:
- subject: Project kick-off
description: Plan and execute the project kick-off.
@ -355,33 +355,6 @@ en:
relations:
- to: Develop v1.1
type: follows
- subject: Plan a hiking trip
status: :default_status_on_hold
type: :default_type_task
- subject: Sow flowers
status: :default_status_on_hold
type: :default_type_task
- subject: Cut the lawn
status: :default_status_on_hold
type: :default_type_task
- subject: Cut trees
status: :default_status_on_hold
type: :default_type_task
- subject: Visit the fire department
status: :default_status_on_hold
type: :default_type_task
- subject: Visit the ocean
status: :default_status_on_hold
type: :default_type_task
- subject: Learn how to dive
status: :default_status_on_hold
type: :default_type_task
- subject: Eat more bananas
status: :default_status_on_hold
type: :default_type_task
- subject: Buy a parasol
status: :default_status_on_hold
type: :default_type_task
wiki:
- title: Wiki
content: |

@ -58,7 +58,7 @@ describe 'seeds' do
expect(User.where(admin: true).count).to eq 1
expect(Project.count).to eq 2
expect(WorkPackage.count).to eq 50
expect(WorkPackage.count).to eq 41
expect(Wiki.count).to eq 2
expect(Query.where.not(hidden: true).count).to eq 8
expect(Query.count).to eq 16

Loading…
Cancel
Save