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
Try to fix another flickering test
Christophe Bliardd8d0a2be14b3
diff --git a/modules/team_planner/spec/features/query_handling_spec.rb b/modules/team_planner/spec/features/query_handling_spec.rbindex 4b7b88d7df0..812e9def0f3 100644--- a/modules/team_planner/spec/features/query_handling_spec.rb+++ b/modules/team_planner/spec/features/query_handling_spec.rb@@ -32,7 +32,7 @@ require "spec_helper"require_relative "../support/pages/team_planner"require_relative "../../../../spec/features/views/shared_examples"-RSpec.describe "Team planner query handling", :js, with_ee: %i[team_planner_view] do+RSpec.describe "Team planner query handling", :js, :with_cuprite, with_ee: %i[team_planner_view] doshared_let(:type_task) { create(:type_task) }shared_let(:type_bug) { create(:type_bug) }shared_let(:project) do@@ -97,7 +97,7 @@ RSpec.describe "Team planner query handling", :js, with_ee: %i[team_planner_viewfilters.openfilters.add_filter_by("Type", "is (OR)", [type_bug.name])-+ team_planner.clear_any_toastersfilters.expect_filter_count("2")team_planner.within_lane(user) do@@ -120,6 +120,7 @@ RSpec.describe "Team planner query handling", :js, with_ee: %i[team_planner_view# Change filterfilters.openfilters.add_filter_by("Type", "is (OR)", [type_bug.name])+ team_planner.clear_any_toastersfilters.expect_filter_count("2")# Save current filtersdiff --git a/spec/features/views/shared_examples.rb b/spec/features/views/shared_examples.rbindex c2740a6ca41..03d59feb526 100644--- a/spec/features/views/shared_examples.rb+++ b/spec/features/views/shared_examples.rb@@ -37,6 +37,7 @@ RSpec.shared_examples "module specific query view management" do# Change the queryfilters.openfilters.add_filter_by "Subject", "contains", ["Test"]+ module_page.clear_any_toastersfilters.expect_filter_count(initial_filter_count + 1)# Save it@@ -48,6 +49,7 @@ RSpec.shared_examples "module specific query view management" do# Change the filter againfilters.add_filter_by "% Complete", "is", ["25"], "percentageDone"+ module_page.clear_any_toastersfilters.expect_filter_count(initial_filter_count + 2)# Save as another query@@ -61,8 +63,7 @@ RSpec.shared_examples "module specific query view management" do# Rename a querysettings_menu.open_and_choose "Rename view"expect(page).to have_focus_on(".editable-toolbar-title--input")- page.driver.browser.switch_to.active_element.send_keys("My second query (renamed)")- page.driver.browser.switch_to.active_element.send_keys(:return)+ find_field("Name of this view").send_keys("My second query (renamed)", :return)module_page.expect_and_dismiss_toaster message: I18n.t("js.notice_successful_update")query_title.expect_not_changeddiff --git a/spec/support/toasts/expectations.rb b/spec/support/toasts/expectations.rbindex 240bf5946d7..c53065fb4cc 100644--- a/spec/support/toasts/expectations.rb+++ b/spec/support/toasts/expectations.rb@@ -23,6 +23,13 @@ module Toastspage.find(".op-toast--close").clickend+ # Clears a toaster if there is one waiting 1 second max, but do not fail if there is none+ def clear_any_toasters+ if has_button?(I18n.t("js.close_popup_title"), wait: 1)+ find_button(I18n.t("js.close_popup_title")).click+ end+ end+def expect_no_toaster(type: :success, message: nil, wait: 10)if type.nil?expect(page).to have_no_css(".op-toast", wait:)