From 25a549c3370b43ecad071469b05cad742c33e1d8 Mon Sep 17 00:00:00 2001 From: stanislavh Date: Wed, 22 Mar 2023 13:07:24 +0100 Subject: [PATCH] SONAR-18870 Add labels for qualifier and visibility filters in project management page --- .../src/main/js/apps/projectsManagement/Search.tsx | 4 +++- .../__tests__/__snapshots__/Search-test.tsx.snap | 11 +++++++++-- .../src/main/resources/org/sonar/l10n/core.properties | 2 ++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx index 344f574b8bb..0e5e903e1a6 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx @@ -139,7 +139,7 @@ export class Search extends React.PureComponent { }; renderQualifierOption = (option: LabelValueSelectOption) => ( -
+
{option.label}
@@ -162,6 +162,7 @@ export class Search extends React.PureComponent { SingleValue: this.singleValueRenderer, }} options={this.getQualifierOptions()} + aria-label={translate('projects_management.filter_by_component')} value={options.find((option) => option.value === this.props.qualifiers)} /> ); @@ -181,6 +182,7 @@ export class Search extends React.PureComponent { onChange={this.handleVisibilityChange} options={options} isSearchable={false} + aria-label={translate('projects_management.filter_by_visibility')} value={options.find((option) => option.value === (this.props.visibility || 'all'))} /> ); diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/Search-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/Search-test.tsx.snap index 5e41b9c325f..e505f08023c 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/Search-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/Search-test.tsx.snap @@ -45,6 +45,7 @@ exports[`render qualifiers filter 1`] = ` />