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
Fix flaky Query Filter spec on Work Packages table (#13088)
Aaron Contrerasd62adc5c9c05
diff --git a/frontend/src/app/features/work-packages/components/filters/quick-filter-by-text-input/quick-filter-by-text-input.component.ts b/frontend/src/app/features/work-packages/components/filters/quick-filter-by-text-input/quick-filter-by-text-input.component.tsindex 5e522be55f2..51713795107 100644--- a/frontend/src/app/features/work-packages/components/filters/quick-filter-by-text-input/quick-filter-by-text-input.component.ts+++ b/frontend/src/app/features/work-packages/components/filters/quick-filter-by-text-input/quick-filter-by-text-input.component.ts@@ -74,9 +74,7 @@ export class WorkPackageFilterByTextInputComponent extends UntilDestroyedMixin {}),).subscribe((upstreamTerm:string) => {- console.log(`upstream ${upstreamTerm} ${(this.searchTerm as any).timestampOfLastValue}`);if (!this.searchTerm.value || this.searchTerm.isValueOlderThan(500)) {- console.log(`Upstream value setting to ${upstreamTerm}`);this.searchTerm.putValue(upstreamTerm);}});diff --git a/spec/features/work_packages/table/queries/filter_spec.rb b/spec/features/work_packages/table/queries/filter_spec.rbindex b4d8d96dbf3..9ab7a6b2673 100644--- a/spec/features/work_packages/table/queries/filter_spec.rb+++ b/spec/features/work_packages/table/queries/filter_spec.rb@@ -501,7 +501,7 @@ RSpec.describe 'filter work packages', js: true doendshared_let(:wp_updated_3d_ago) docreate(:work_package,- subject: 'Created today',+ subject: 'Created 3d ago',project:,created_at: 3.days.ago,updated_at: 3.days.ago)@@ -550,7 +550,7 @@ RSpec.describe 'filter work packages', js: true dowp_table.ensure_work_package_not_listed! wp_updated_3d_ago, wp_updated_5d_agoend- it 'filters between date by updated_at' do+ it 'filters between date by updated_at', :with_cuprite doskip("Flaky test disabled. Fix it in https://community.openproject.org/wp/49072")wp_table.visit!loading_indicator_saveguard@@ -563,6 +563,7 @@ RSpec.describe 'filter work packages', js: true do[4.days.ago.to_date.iso8601, 2.days.ago.to_date.iso8601],'updatedAt'+ wait_for_reloadloading_indicator_saveguardwp_table.expect_work_package_listed wp_updated_3d_ago@@ -572,6 +573,7 @@ RSpec.describe 'filter work packages', js: true dofilters.remove_filter 'updatedAt'+ wait_for_reloadloading_indicator_saveguardwp_table.expect_work_package_listed wp_updated_today, wp_updated_3d_ago, wp_updated_5d_agodiff --git a/spec/support/components/work_packages/filters.rb b/spec/support/components/work_packages/filters.rbindex 41863052e6f..08b06aec946 100644--- a/spec/support/components/work_packages/filters.rb+++ b/spec/support/components/work_packages/filters.rb@@ -257,9 +257,10 @@ module Componentsdef insert_two_single_dates(id, value)fill_in("values-#{id}-begin", with: value[0]) if value[0]- loading_indicator_saveguardfill_in("values-#{id}-end", with: value[1]) if value[1]- loading_indicator_saveguard++ ensure_value_is_input_correctly page.find("#values-#{id}-begin"), value: value[0] if value[0]+ ensure_value_is_input_correctly page.find("#values-#{id}-end"), value: value[1] if value[1]enddef insert_date_range(filter_element, value)