From e47c72137a83cb3f3aedca383759948db6d47dfb Mon Sep 17 00:00:00 2001 From: ulferts Date: Thu, 28 Nov 2024 15:44:23 +0100 Subject: [PATCH] attempt to fix flickering spec --- spec/features/news/creation_and_commenting_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/features/news/creation_and_commenting_spec.rb b/spec/features/news/creation_and_commenting_spec.rb index 36cf66c114d6..e99afdc2a61a 100644 --- a/spec/features/news/creation_and_commenting_spec.rb +++ b/spec/features/news/creation_and_commenting_spec.rb @@ -43,6 +43,8 @@ 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 @@ 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"