Skip to content

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

attempt to fix flickering spec

ulfertscf4c1e3ce004
diff --git a/spec/features/news/creation_and_commenting_spec.rb b/spec/features/news/creation_and_commenting_spec.rb
index 36cf66c114d..e99afdc2a61 100644
--- a/spec/features/news/creation_and_commenting_spec.rb
+++ b/spec/features/news/creation_and_commenting_spec.rb
@@ -43,6 +43,8 @@ RSpec.describe "News creation and commenting", :js, :with_cuprite do
member_with_permissions: { project => %i[manage_news comment_news] })
end
+ include Flash::Expectations
+
it "allows creating new and commenting it all of which will result in notifications and mails" do
visit project_news_index_path(project)
@@ -81,8 +83,11 @@ RSpec.describe "News creation and commenting", :js, :with_cuprite do
perform_enqueued_jobs do
click_button "Add comment"
+ wait_for_network_idle
end
+ expect_and_dismiss_flash message: "Comment added"
+
# The new comment is visible on the show page
expect(page)
.to have_content "A new text"