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
[#63518] fixed component specs and added missing locale keys
Eric Schubert204543e38bff
diff --git a/modules/storages/config/locales/en.yml b/modules/storages/config/locales/en.ymlindex 57a35649422..bdcfac6ab93 100644--- a/modules/storages/config/locales/en.yml+++ b/modules/storages/config/locales/en.yml@@ -236,6 +236,9 @@ en:checked: Last checked %{datetime}checks:ampf_configuration:+ client_folder_creation: Automatic folder creation+ client_folder_removal: Automatic folder deletion+ drive_contents: Drive has expected contentfiles_request: Fetching group folder filesgroup_folder_contents: Group folder has expected contentgroup_folder_presence: Group folder exists@@ -255,8 +258,8 @@ en:dependencies_check: Dependenciesdependencies_versions: Dependencies (version)diagnostic_request: Diagnostic request- drive_id_format: Drive ID formatdrive_id_exists: Drive exists+ drive_id_format: Drive ID formatheader: Basic configurationhost_url_accessible: Host URL accessiblestorage_configured: Configuration complete@@ -271,11 +274,11 @@ en:connection_validation:client_id_invalid: The configured OAuth 2 client id is invalid. Please check the configuration.client_secret_invalid: The configured OAuth 2 client secret is invalid. Please check the configuration.+ nc_group_folder_app_missing: A required dependency is missing on the file storage. Please add 'Group folders' to your installation.nc_group_folder_not_found: The group folder could not be found.nc_group_folder_version_mismatch: The Group folders app version is not supported. Please update your Nextcloud server.nc_host_not_found: No Nextcloud server found at the configured host url. Please check the configuration.- nc_group_folder_app_missing: "A required dependency is missing on the file storage. Please add 'Group folders' to your installation."- nc_integration_app_missing: "A required dependency is missing on the file storage. Please add 'Integration OpenProject' to your installation."+ nc_integration_app_missing: A required dependency is missing on the file storage. Please add 'Integration OpenProject' to your installation.nc_integration_app_version_mismatch: The Integration OpenProject app version is not supported. Please update your Nextcloud server.nc_oauth_request_not_found: OpenProject couldn't find the root folder of Nextcloud using the current logged-in user. Please check the server logs for further information.nc_oauth_request_unauthorized: The current user isn't authorized to see the main folder of Nextcloud or we couldn't acquire a token. Please check the server logs for further information.@@ -283,11 +286,6 @@ en:nc_unexpected_content: Unexpected content found in the managed group folder.nc_userless_access_denied: The configured app password is invalid.not_configured: The connection could not be validated. Please finish configuration first.- oidc_cant_acquire_token: Your OpenID Connect setup doesn't provide the necessary audience, nor provides token exchange capabilities. Please check out our documentation for more information.- oidc_cant_exchange_token: There seems to be a problem with the Token Exchange setup on your OpenID Connect Provider. Please check its configuration and try again.- oidc_cant_refresh_token: There was an error while trying to check your access to the storage. Please check the server logs for further information.- oidc_non_oidc_user: The current user, while provisioned, wasn't provisioned by an OpenID Connect (OIDC) Identity Provider. Please re-run the check with an OIDC provisioned user.- oidc_non_provisioned_user: The current user isn't provided by an OpenID Connect Identity Provider. Please re-run the check with a provided user.od_client_cant_delete_folder: The client is having trouble deleting folders. Please check the setup documentation for your storage.od_client_write_permission_missing: The client seems to have write permissions missing. Please check the setup documentation for your storage.od_drive_id_invalid: The configured drive id seems invalid. Please check the configuration.@@ -298,6 +296,11 @@ en:od_oauth_token_missing: OpenProject cannot test the user level communication with OneDrive/SharePoint as the user did not yet link their Microsoft account.od_tenant_id_wrong: The configured directory (tenant) id is invalid. Please check the configuration.od_unexpected_content: Unexpected content found in the drive.+ oidc_cant_acquire_token: Your OpenID Connect setup doesn't provide the necessary audience, nor provides token exchange capabilities. Please check out our documentation for more information.+ oidc_cant_exchange_token: There seems to be a problem with the Token Exchange setup on your OpenID Connect Provider. Please check its configuration and try again.+ oidc_cant_refresh_token: There was an error while trying to check your access to the storage. Please check the server logs for further information.+ oidc_non_oidc_user: The current user, while provisioned, wasn't provisioned by an OpenID Connect (OIDC) Identity Provider. Please re-run the check with an OIDC provisioned user.+ oidc_non_provisioned_user: The current user isn't provided by an OpenID Connect Identity Provider. Please re-run the check with a provided user.unknown_error: The connection could not be validated. An unknown error occurred. Please check the server logs for further information.label_error: Errorlabel_failed: Faileddiff --git a/modules/storages/spec/components/storages/admin/health/check_result_component_spec.rb b/modules/storages/spec/components/storages/admin/health/check_result_component_spec.rbindex c57b3725819..00cd0d1443c 100644--- a/modules/storages/spec/components/storages/admin/health/check_result_component_spec.rb+++ b/modules/storages/spec/components/storages/admin/health/check_result_component_spec.rb@@ -45,6 +45,7 @@ RSpec.describe Storages::Admin::Health::CheckResultComponent, type: :component dit "renders the component" doexpect(page).to have_text(I18n.t("storages.health.checks.#{group_key}.#{check_result.key}"))expect(page).to have_css(".color-fg-success", text: "Passed")+ expect(page).to have_no_css(".Label")expect(page).to have_no_link("More information")expect(page).not_to have_test_selector("op-storages--health-status-check-information")end@@ -56,40 +57,38 @@ RSpec.describe Storages::Admin::Health::CheckResultComponent, type: :component dit "renders the component" doexpect(page).to have_text(I18n.t("storages.health.checks.#{group_key}.#{check_result.key}"))expect(page).to have_css(".color-fg-attention", text: "Skipped")+ expect(page).to have_no_css(".Label")expect(page).to have_no_link("More information")expect(page).not_to have_test_selector("op-storages--health-status-check-information")endendcontext "if check result is a warning" do+ let(:group_key) { :ampf_configuration }let(:check_result) do- Storages::Peripherals::ConnectionValidators::CheckResult.warning(- :capabilities_request,- "it is no moon"- )+ Storages::Peripherals::ConnectionValidators::CheckResult.warning(:drive_contents, :od_unexpected_content)endit "renders the component" doexpect(page).to have_text(I18n.t("storages.health.checks.#{group_key}.#{check_result.key}"))expect(page).to have_css(".color-fg-attention", text: "Warning")+ expect(page).to have_css(".Label", text: "WRN_#{check_result.code.upcase}")expect(page).to have_link("More information")- expect(page).to have_test_selector("op-storages--health-status-check-information", text: check_result.message)+ expect(page).to have_test_selector("op-storages--health-status-check-information")endendcontext "if check result is a failure" dolet(:check_result) do- Storages::Peripherals::ConnectionValidators::CheckResult.failure(- :capabilities_request,- "it is really no moon"- )+ Storages::Peripherals::ConnectionValidators::CheckResult.failure(:capabilities_request, :unknown_error)endit "renders the component" doexpect(page).to have_text(I18n.t("storages.health.checks.#{group_key}.#{check_result.key}"))expect(page).to have_css(".color-fg-danger", text: "Failed")+ expect(page).to have_css(".Label", text: "ERR_#{check_result.code.upcase}")expect(page).to have_link("More information")- expect(page).to have_test_selector("op-storages--health-status-check-information", text: check_result.message)+ expect(page).to have_test_selector("op-storages--health-status-check-information")endendenddiff --git a/modules/storages/spec/components/storages/admin/health/health_report_component_spec.rb b/modules/storages/spec/components/storages/admin/health/health_report_component_spec.rbindex fc52e3a5731..9424106d03a 100644--- a/modules/storages/spec/components/storages/admin/health/health_report_component_spec.rb+++ b/modules/storages/spec/components/storages/admin/health/health_report_component_spec.rb@@ -95,9 +95,9 @@ RSpec.describe Storages::Admin::Health::HealthReportComponent, type: :componentwhen :successStorages::Peripherals::ConnectionValidators::CheckResult.success(key)when :warning- Storages::Peripherals::ConnectionValidators::CheckResult.warning(key, "it is no moon")+ Storages::Peripherals::ConnectionValidators::CheckResult.warning(key, :"#{key}_warning")when :failure- Storages::Peripherals::ConnectionValidators::CheckResult.failure(key, "it is really no moon")+ Storages::Peripherals::ConnectionValidators::CheckResult.failure(key, :"#{key}_failure")elseStorages::Peripherals::ConnectionValidators::CheckResult.skipped(key)end@@ -105,6 +105,10 @@ RSpec.describe Storages::Admin::Health::HealthReportComponent, type: :componentgroup.register_check(key)group.update_result(key, result)allow(I18n).to receive(:t).with("storages.health.checks.#{group_key}.#{key}").and_return(key.to_s.humanize)+ if result.code.present?+ allow(I18n).to receive(:t).with("storages.health.connection_validation.#{result.code}")+ .and_return(result.code.to_s.humanize)+ endendgroup