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

ulferts8237ad601c63
diff --git a/modules/storages/spec/features/manage_project_storage_spec.rb b/modules/storages/spec/features/manage_project_storage_spec.rb
index 133e12ff797..16e97b53794 100644
--- a/modules/storages/spec/features/manage_project_storage_spec.rb
+++ b/modules/storages/spec/features/manage_project_storage_spec.rb
@@ -43,6 +43,8 @@ RSpec.describe("Activation of storages in projects",
:storage_server_helpers,
:webmock,
with_settings: { notifications_polling_interval: 1_000 }) do
+ include Flash::Expectations
+
let(:user) { create(:user) }
# The first page is the Project -> Settings -> General page, so we need
# to provide the user with the edit_project permission in the role.
@@ -105,7 +107,7 @@ RSpec.describe("Activation of storages in projects",
options: ["#{storage.name} (#{storage})"])
page.click_on("Continue")
- # by default automatic have to be choosen if storage has automatic management enabled
+ # by default automatic have to be chosen if storage has automatic management enabled
expect(page).to have_checked_field("New folder with automatically managed permissions")
page.find_by_id("storages_project_storage_project_folder_mode_manual").click
@@ -125,6 +127,8 @@ RSpec.describe("Activation of storages in projects",
expect(page).to have_text("Folder1")
page.click_on("Add")
+ expect_and_dismiss_flash(message: "Successful creation.")
+
# The list of enabled file storages should now contain Storage 1
expect(page).to have_css("h1", text: "Files")
expect(page).to have_text(storage.name)
@@ -146,6 +150,8 @@ RSpec.describe("Activation of storages in projects",
expect(page).to have_no_text("Folder1")
page.click_on("Save")
+ expect_and_dismiss_flash(message: "Successful update.")
+
# The list of enabled file storages should still contain Storage 1
expect(page).to have_css("h1", text: "Files")
expect(page).to have_text(storage.name)