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
Actually create weekdays before first request
Oliver Güntherceeba5538799
diff --git a/frontend/src/app/features/work-packages/components/wp-edit-form/work-package-filter-values.spec.ts b/frontend/src/app/features/work-packages/components/wp-edit-form/work-package-filter-values.spec.tsindex 8d0a974dde0..5e7da015058 100644--- a/frontend/src/app/features/work-packages/components/wp-edit-form/work-package-filter-values.spec.ts+++ b/frontend/src/app/features/work-packages/components/wp-edit-form/work-package-filter-values.spec.ts@@ -170,7 +170,7 @@ describe('WorkPackageFilterValues', () => {setupTestBed();});- it('it should not apply the first value (Regression #30817)', (() => {+ it('it should not keep the second value (Regression #30817)', (() => {subject.applyDefaultsFromFilters(changeset);expect(changeset.changedAttributes.length).toEqual(0);diff --git a/spec/features/work_packages/details/workdays_spec.rb b/spec/features/work_packages/details/workdays_spec.rbindex 115632d7c6a..a86dff41ea7 100644--- a/spec/features/work_packages/details/workdays_spec.rb+++ b/spec/features/work_packages/details/workdays_spec.rb@@ -44,6 +44,7 @@ describe 'Work packages datepicker workdays',let(:combined_date) { work_packages_page.edit_field(:combinedDate) }before do+ week_dayslogin_as(user)work_packages_page.visit!@@ -54,7 +55,7 @@ describe 'Work packages datepicker workdays',endcontext 'with default work days' do- let!(:week_days) { create :week_days }+ let(:week_days) { create :week_days }it 'shows them as disabled' doexpect(page).to have_selector('.dayContainer', count: 2)@@ -75,7 +76,7 @@ describe 'Work packages datepicker workdays',endcontext 'with all days marked as weekend' do- let!(:week_days) do+ let(:week_days) dodays = create(:week_days)WeekDay.update_all(working: false)diff --git a/spec/features/work_packages/timeline/timeline_dates_spec.rb b/spec/features/work_packages/timeline/timeline_dates_spec.rbindex 80089936f5c..15eb6079df8 100644--- a/spec/features/work_packages/timeline/timeline_dates_spec.rb+++ b/spec/features/work_packages/timeline/timeline_dates_spec.rb@@ -44,6 +44,7 @@ RSpec.describe 'Work package timeline date formatting',subject: 'My subject'end+ let(:week_days) { nil }let(:wp_timeline) { Pages::WorkPackagesTimeline.new(project) }let!(:query_tl) doquery = build(:query, user: current_user, project:)@@ -66,6 +67,7 @@ RSpec.describe 'Work package timeline date formatting',endbefore do+ week_dayslogin_as current_userwp_timeline.visit_query query_tl@@ -102,7 +104,7 @@ RSpec.describe 'Work package timeline date formatting',context 'with weekdays defined' dolet(:current_user) { create :admin, language: 'en' }- let!(:week_days) { create :week_days }+ let(:week_days) { create :week_days }it 'shows them as disabled' doexpect_date_week work_package.start_date.iso8601, '01'diff --git a/spec/support/components/datepicker/datepicker.rb b/spec/support/components/datepicker/datepicker.rbindex c42b6717583..34306bc5d16 100644--- a/spec/support/components/datepicker/datepicker.rb+++ b/spec/support/components/datepicker/datepicker.rb@@ -16,6 +16,16 @@ module Componentscontainer.find(".flatpickr-calendar")end+ ##+ # Clear all values+ def clear!+ focus_start_date+ fill_in 'startDate', with: '', fill_options: { clear: :backspace }++ focus_due_date+ fill_in 'endDate', with: '', fill_options: { clear: :backspace }+ end+def expect_visibleexpect(container).to have_selector('.flatpickr-calendar .flatpickr-current-month', wait: 10)enddiff --git a/spec/support/components/datepicker/work_package_datepicker.rb b/spec/support/components/datepicker/work_package_datepicker.rbindex faea4343e3b..d3e1a3fa96a 100644--- a/spec/support/components/datepicker/work_package_datepicker.rb+++ b/spec/support/components/datepicker/work_package_datepicker.rb@@ -53,7 +53,6 @@ module Componentsexpect(container).to have_field('duration', with: value, wait: 10)end-def start_date_fieldcontainer.find_field 'startDate'end@@ -82,16 +81,6 @@ module Componentsexpect(container).to have_field('endDate', with: value, wait: 20)end- ##- # Clear all values- def clear!- focus_start_date- fill_in 'startDate', with: '', fill_options: { clear: :backspace }-- focus_due_date- fill_in 'endDate', with: '', fill_options: { clear: :backspace }- end-def set_start_date(value)focus_start_datefill_in 'startDate', with: value, fill_options: { clear: :backspace }