From fb7881ba5693355a7c321e5eaecf0932ac68a152 Mon Sep 17 00:00:00 2001 From: Dombi Attila <83396+dombesz@users.noreply.github.com> Date: Tue, 12 Nov 2024 21:21:18 +0200 Subject: [PATCH] Add default Gates to seed data --- app/seeders/common.yml | 3 +++ app/seeders/standard.yml | 12 ++++++++++++ .../bim/spec/seeders/root_seeder_bim_edition_spec.rb | 2 +- spec/seeders/root_seeder_standard_edition_spec.rb | 8 +++++--- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/app/seeders/common.yml b/app/seeders/common.yml index 37692ac0d51b..452f865b616b 100644 --- a/app/seeders/common.yml +++ b/app/seeders/common.yml @@ -72,6 +72,9 @@ colors: - reference: :default_color_orange_dark t_name: Orange (dark) hexcode: "#F7983A" + - reference: :default_color_purple + t_name: Purple + hexcode: "#682D91" - reference: :default_color_red_dark t_name: Red (dark) hexcode: "#F05823" diff --git a/app/seeders/standard.yml b/app/seeders/standard.yml index a94320ed2e4f..3667853bbe26 100644 --- a/app/seeders/standard.yml +++ b/app/seeders/standard.yml @@ -31,14 +31,26 @@ life_cycles: t_name: Initiating type: Stage color_name: :default_color_orange_dark + - reference: :default_life_cycle_ready_for_planning + t_name: Ready for Planning + type: Gate + color_name: :default_color_purple - reference: :default_life_cycle_planning t_name: Planning type: Stage color_name: :default_color_red_dark + - reference: :default_life_cycle_ready_for_executing + t_name: Ready for Executing + type: Gate + color_name: :default_color_purple - reference: :default_life_cycle_executing t_name: Executing type: Stage color_name: :default_color_magenta_light + - reference: :default_life_cycle_ready_for_closing + t_name: Ready for Closing + type: Gate + color_name: :default_color_purple - reference: :default_life_cycle_closing t_name: Closing type: Stage diff --git a/modules/bim/spec/seeders/root_seeder_bim_edition_spec.rb b/modules/bim/spec/seeders/root_seeder_bim_edition_spec.rb index 1a9fe2e13915..1e4870b4a904 100644 --- a/modules/bim/spec/seeders/root_seeder_bim_edition_spec.rb +++ b/modules/bim/spec/seeders/root_seeder_bim_edition_spec.rb @@ -98,7 +98,7 @@ def group_name(reference) ) end - include_examples "it creates records", model: Color, expected_count: 148 + include_examples "it creates records", model: Color, expected_count: 149 include_examples "it creates records", model: DocumentCategory, expected_count: 3 include_examples "it creates records", model: IssuePriority, expected_count: 4 include_examples "it creates records", model: Status, expected_count: 4 diff --git a/spec/seeders/root_seeder_standard_edition_spec.rb b/spec/seeders/root_seeder_standard_edition_spec.rb index 9227a4424642..63673e053d01 100644 --- a/spec/seeders/root_seeder_standard_edition_spec.rb +++ b/spec/seeders/root_seeder_standard_edition_spec.rb @@ -63,7 +63,8 @@ expect(VersionSetting.count).to eq 4 expect(Boards::Grid.count).to eq 5 expect(Boards::Grid.count { |grid| grid.options.has_key?(:filters) }).to eq 1 - expect(LifeCycle.count).to eq 4 + expect(Stage.count).to eq 4 + expect(Gate.count).to eq 3 end it "links work packages to their version" do @@ -125,7 +126,7 @@ ) end - include_examples "it creates records", model: Color, expected_count: 148 + include_examples "it creates records", model: Color, expected_count: 149 include_examples "it creates records", model: DocumentCategory, expected_count: 3 include_examples "it creates records", model: GlobalRole, expected_count: 2 include_examples "it creates records", model: WorkPackageRole, expected_count: 3 @@ -172,7 +173,8 @@ expect(Version.count).to eq 4 expect(VersionSetting.count).to eq 4 expect(Boards::Grid.count).to eq 5 - expect(LifeCycle.count).to eq 4 + expect(Stage.count).to eq 4 + expect(Gate.count).to eq 3 end end end