OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
expand tests for non editing and custom budget case
ulferts8727e40b0e15
diff --git a/modules/costs/spec/features/budgets/update_budget_spec.rb b/modules/costs/spec/features/budgets/update_budget_spec.rbindex 3a4ac283586..a09057e1a52 100644--- a/modules/costs/spec/features/budgets/update_budget_spec.rb+++ b/modules/costs/spec/features/budgets/update_budget_spec.rb@@ -78,13 +78,15 @@ describe 'updating a budget', type: :feature, js: true doendlet(:material_budget_item) do- FactoryBot.create :material_budget_item, units: 3,+ FactoryBot.create :material_budget_item,+ units: 3,cost_type: cost_type,cost_object: budgetendlet(:labor_budget_item) do- FactoryBot.create :labor_budget_item, hours: 5,+ FactoryBot.create :labor_budget_item,+ hours: 5,user: user,cost_object: budgetend@@ -135,12 +137,25 @@ describe 'updating a budget', type: :feature, js: true docontext 'with german locale' dolet(:user) { FactoryBot.create :admin, language: :de }+ let(:cost_type2) do+ FactoryBot.create :cost_type, name: 'ABC', unit: 'abc', unit_plural: 'abcs'+ end++ let(:material_budget_item2) do+ FactoryBot.create :material_budget_item,+ units: 3,+ cost_type: cost_type2,+ cost_object: budget,+ budget: 1000.0+ endit 'retains the overridden budget when opening, but not editing (Regression #32822)' do+ material_budget_item2budget_page.visit!click_on 'Bearbeiten'budget_page.expect_planned_costs! type: :material, row: 1, expected: '150,00 EUR'+ budget_page.expect_planned_costs! type: :material, row: 2, expected: '1.000,00 EUR'budget_page.expect_planned_costs! type: :labor, row: 1, expected: '125,00 EUR'# Open first item@@ -151,6 +166,7 @@ describe 'updating a budget', type: :feature, js: true doexpect(budget_page).to have_content("Erfolgreich aktualisiert.")expect(page).to have_selector('tbody td.currency', text: '150,00 EUR')+ expect(page).to have_selector('tbody td.currency', text: '1.000,00 EUR')expect(page).to have_selector('tbody td.currency', text: '125,00 EUR')endend@@ -193,7 +209,6 @@ describe 'updating a budget', type: :feature, js: true doendcontext 'with a reversed currency format' do-before doallow(Setting).to receive(:plugin_openproject_costs)