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

[#62103] fix test selector in ui tests

Eric Schubert129f27108fe1
diff --git a/modules/storages/spec/features/storages/admin/edit_storage_spec.rb b/modules/storages/spec/features/storages/admin/edit_storage_spec.rb
index e95ed788451..e3f214f1d58 100644
--- a/modules/storages/spec/features/storages/admin/edit_storage_spec.rb
+++ b/modules/storages/spec/features/storages/admin/edit_storage_spec.rb
@@ -222,12 +222,10 @@ RSpec.describe "Admin Edit File storage",
it "renders a sidebar component" do
visit edit_admin_settings_storage_path(storage)
- aggregate_failures "Health status" do
- expect(page).to have_test_selector("validation-result--subtitle", text: "Connection validation")
- expect(page).to have_test_selector("storage-health-status", text: "Pending")
- end
+ expect(page).to have_text("Health status report")
aggregate_failures "Health notifications" do
+ expect(page).to have_test_selector("storage-health-status", text: "Pending")
expect(page).to have_test_selector("storage-health-notifications-button", text: "Unsubscribe")
expect(page).to have_test_selector("storage-health-notifications-description",
text: "All administrators receive health status email notifications for this storage.")
@@ -341,12 +339,10 @@ RSpec.describe "Admin Edit File storage",
it "renders a sidebar component" do
visit edit_admin_settings_storage_path(storage)
- aggregate_failures "Health status" do
- expect(page).to have_test_selector("validation-result--subtitle", text: "Connection validation")
- expect(page).to have_test_selector("storage-health-status", text: "Pending")
- end
+ expect(page).to have_text("Health status report")
aggregate_failures "Health notifications" do
+ expect(page).to have_test_selector("storage-health-status", text: "Pending")
expect(page).to have_test_selector("storage-health-notifications-button", text: "Unsubscribe")
expect(page).to have_test_selector("storage-health-notifications-description",
text: "All administrators receive health status email notifications for this storage.")
@@ -368,7 +364,7 @@ RSpec.describe "Admin Edit File storage",
it "renders health status information but without health notifications for automatically managed folders" do
visit edit_admin_settings_storage_path(storage)
- expect(page).to have_test_selector("validation-result--subtitle", text: "Connection validation")
+ expect(page).to have_text("Health status report")
expect(page).not_to have_test_selector("storage-health-status")
expect(page).not_to have_test_selector("storage-health-notifications-button")
end
@@ -467,12 +463,10 @@ RSpec.describe "Admin Edit File storage",
it "renders a sidebar component" do
visit edit_admin_settings_storage_path(storage)
- aggregate_failures "Health status" do
- expect(page).to have_test_selector("validation-result--subtitle", text: "Connection validation")
- expect(page).to have_test_selector("storage-health-status", text: "Pending")
- end
+ expect(page).to have_text("Health status report")
aggregate_failures "Health notifications" do
+ expect(page).to have_test_selector("storage-health-status", text: "Pending")
expect(page).to have_test_selector("storage-health-notifications-button", text: "Unsubscribe")
expect(page).to have_test_selector("storage-health-notifications-description",
text: "All administrators receive health status email notifications for this storage.")
@@ -492,7 +486,7 @@ RSpec.describe "Admin Edit File storage",
it "renders health status information but without health notifications for automatically managed folders" do
visit edit_admin_settings_storage_path(storage)
- expect(page).to have_test_selector("validation-result--subtitle", text: "Connection validation")
+ expect(page).to have_text("Health status report")
expect(page).not_to have_test_selector("storage-health-status")
expect(page).not_to have_test_selector("storage-health-notifications-button")
end