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
tests[Op#52449]: Add integration specs, update UI text
Kabiru Mwenjaa404e4176a55
diff --git a/modules/storages/app/components/storages/admin/sidebar/health_notifications_component.html.erb b/modules/storages/app/components/storages/admin/sidebar/health_notifications_component.html.erbindex 449f5c69ad4..14e630e7dd6 100644--- a/modules/storages/app/components/storages/admin/sidebar/health_notifications_component.html.erb+++ b/modules/storages/app/components/storages/admin/sidebar/health_notifications_component.html.erb@@ -14,7 +14,7 @@f.hidden_field :health_notifications_enabled, value: (storage.health_notifications_enabled? ? "0" : "1")end- notification_status_actions.with_row do+ notification_status_actions.with_row(test_selector: "storage-health-notifications-button") dorender(Primer::Beta::Button.new(scheme: :default,block: :true,@@ -28,7 +28,7 @@endend- notifications_container.with_row(mt: 3, test_selector: "health-notifications-description") do+ notifications_container.with_row(mt: 3, test_selector: "storage-health-notifications-description") dorender(Primer::Beta::Text.new(color: :subtle)) { notification_status[:description] }endenddiff --git a/modules/storages/config/locales/en.yml b/modules/storages/config/locales/en.ymlindex b03d842fb3d..3a2591701a5 100644--- a/modules/storages/config/locales/en.yml+++ b/modules/storages/config/locales/en.yml@@ -105,7 +105,7 @@ en:subtitle: Automatically managed project folderstitle: Health statushealth_email_notifications:- description_subscribed: Email notifications for this storage have been turned on for all administrators.+ description_subscribed: All administrators will receive health status email notifications for this storage.description_unsubscribed: Health status email notifications for this storage have been turned off for all administrators.error_could_not_be_saved: Email notification settings could not be saved. Please try again.subscribe: Subscribediff --git a/modules/storages/spec/components/storages/admin/sidebar/health_notifications_component_spec.rb b/modules/storages/spec/components/storages/admin/sidebar/health_notifications_component_spec.rbindex 41034f3836b..f3038a77f15 100644--- a/modules/storages/spec/components/storages/admin/sidebar/health_notifications_component_spec.rb+++ b/modules/storages/spec/components/storages/admin/sidebar/health_notifications_component_spec.rb@@ -40,8 +40,8 @@ RSpec.describe Storages::Admin::Sidebar::HealthNotificationsComponent, type: :coit "renders an unsubscribe option with info" doexpect(page).to have_css("input[type=hidden][value='0']", visible: :hidden)expect(page).to have_test_selector(- "health-notifications-description",- text: "Email notifications for this storage have been turned on for all administrators."+ "storage-health-notifications-description",+ text: "All administrators will receive health status email notifications for this storage.")expect(page).to have_button("Unsubscribe")end@@ -57,7 +57,7 @@ RSpec.describe Storages::Admin::Sidebar::HealthNotificationsComponent, type: :coit "renders an unsubscribe option with info" doexpect(page).to have_css("input[type=hidden][value='1']", visible: :hidden)expect(page).to have_test_selector(- "health-notifications-description",+ "storage-health-notifications-description",text: "Health status email notifications for this storage have been turned off for all administrators.")expect(page).to have_button("Subscribe")diff --git a/modules/storages/spec/features/storages/admin/edit_storage_spec.rb b/modules/storages/spec/features/storages/admin/edit_storage_spec.rbindex a1be6c617ed..bc564bec59b 100644--- a/modules/storages/spec/features/storages/admin/edit_storage_spec.rb+++ b/modules/storages/spec/features/storages/admin/edit_storage_spec.rb@@ -220,10 +220,24 @@ RSpec.describe "Admin Edit File storage",endend- it "renders health status information" do+ it "renders a sidebar component" dovisit edit_admin_settings_storage_path(storage)- expect(page).to have_test_selector("storage-health-status", text: "Pending")+ aggregate_failures "Health status" do+ expect(page).to have_test_selector("storage-health-status", text: "Pending")+ end++ aggregate_failures "Health notifications" do+ expect(page).to have_test_selector("storage-health-notifications-button", text: "Unsubscribe")+ expect(page).to have_test_selector("storage-storage-health-notifications-description",+ text: "All administrators will receive health status email notifications for this storage.")++ click_on "Unsubscribe"++ expect(page).to have_test_selector("storage-health-notifications-button", text: "Subscribe")+ expect(page).to have_test_selector("storage-storage-health-notifications-description",+ text: "Health status email notifications for this storage have been turned off for all administrators.")+ endendend@@ -233,7 +247,8 @@ RSpec.describe "Admin Edit File storage",it "does not render health status information" dovisit edit_admin_settings_storage_path(storage)- expect(page).not_to have_test_selector("storage-health-status", text: "Pending")+ expect(page).not_to have_test_selector("storage-health-status")+ expect(page).not_to have_test_selector("storage-health-notifications-button")endend@@ -327,10 +342,24 @@ RSpec.describe "Admin Edit File storage",endend- it "renders health status information" do+ it "renders a sidebar component" dovisit edit_admin_settings_storage_path(storage)- expect(page).to have_test_selector("storage-health-status", text: "Pending")+ aggregate_failures "Health status" do+ expect(page).to have_test_selector("storage-health-status", text: "Pending")+ end++ aggregate_failures "Health notifications" do+ expect(page).to have_test_selector("storage-health-notifications-button", text: "Unsubscribe")+ expect(page).to have_test_selector("storage-storage-health-notifications-description",+ text: "All administrators will receive health status email notifications for this storage.")++ click_on "Unsubscribe"++ expect(page).to have_test_selector("storage-health-notifications-button", text: "Subscribe")+ expect(page).to have_test_selector("storage-storage-health-notifications-description",+ text: "Health status email notifications for this storage have been turned off for all administrators.")+ endendend@@ -340,7 +369,8 @@ RSpec.describe "Admin Edit File storage",it "does not render health status information" dovisit edit_admin_settings_storage_path(storage)- expect(page).not_to have_test_selector("storage-health-status", text: "Pending")+ expect(page).not_to have_test_selector("storage-health-status")+ expect(page).not_to have_test_selector("storage-health-notifications-button")endendend