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

fix[Op#50737]: name label by section configuration check

Kabiru Mwenja5e890cc79c3b
diff --git a/modules/storages/app/components/storages/admin/storage_view_information.rb b/modules/storages/app/components/storages/admin/storage_view_information.rb
index 5dd591e3d9a..029d9d80eae 100644
--- a/modules/storages/app/components/storages/admin/storage_view_information.rb
+++ b/modules/storages/app/components/storages/admin/storage_view_information.rb
@@ -24,9 +24,9 @@ module Storages::Admin
def configuration_check_label_for(*configs)
if storage.configuration_checks.slice(*configs.map(&:to_sym)).values.all?
- status_label(I18n.t('storages.label_completed'), scheme: :success, test_selector: 'label-completed')
+ status_label(I18n.t('storages.label_completed'), scheme: :success, test_selector: "label-#{configs.join('-')}-status")
else
- status_label(I18n.t('storages.label_incomplete'), scheme: :attention, test_selector: 'label-incomplete')
+ status_label(I18n.t('storages.label_incomplete'), scheme: :attention, test_selector: "label-#{configs.join('-')}-status")
end
end
diff --git a/modules/storages/spec/features/admin_storages_spec.rb b/modules/storages/spec/features/admin_storages_spec.rb
index 61995c6504a..816c76aa020 100644
--- a/modules/storages/spec/features/admin_storages_spec.rb
+++ b/modules/storages/spec/features/admin_storages_spec.rb
@@ -107,20 +107,20 @@ RSpec.describe 'Admin storages',
aggregate_failures 'Storage edit view' do
# General information
expect(page).to have_test_selector('storage-provider-label', text: 'Storage provider')
- expect(page).to have_test_selector('label-completed', text: 'Completed')
+ expect(page).to have_test_selector('label-host_name_configured-status', text: 'Completed')
expect(page).to have_test_selector('storage-description', text: [storage.short_provider_type.capitalize,
storage.name,
storage.host].join(' - '))
# OAuth application
expect(page).to have_test_selector('storage-openproject-oauth-label', text: 'OpenProject OAuth')
- expect(page).to have_test_selector('label-completed', text: 'Completed')
+ expect(page).to have_test_selector('label-openproject_oauth_application_configured-status', text: 'Completed')
expect(page).to have_test_selector('storage-openproject-oauth-application-description',
text: "OAuth Client ID: #{oauth_application.uid}")
# OAuth client
expect(page).to have_test_selector('storage-oauth-client-label', text: 'Nextcloud OAuth')
- expect(page).to have_test_selector('label-completed', text: 'Completed')
+ expect(page).to have_test_selector('label-storage_oauth_client_configured-status', text: 'Completed')
expect(page).to have_test_selector('storage-oauth-client-id-description',
text: "OAuth Client ID: #{oauth_client.client_id}")
@@ -163,11 +163,6 @@ RSpec.describe 'Admin storages',
end
aggregate_failures 'OAuth application' do
- expect(page).to have_test_selector('storage-openproject-oauth-label', text: 'OpenProject OAuth')
- expect(page).to have_test_selector('label-completed', text: 'Completed')
- expect(page).to have_test_selector('storage-openproject-oauth-application-description',
- text: "OAuth Client ID: #{oauth_application.uid}")
-
accept_confirm do
find_test_selector('storage-replace-openproject-oauth-application-button').click
end