Fix text when 1 repo is shown

This commit is contained in:
Robert
2022-09-29 13:02:22 +01:00
parent baaa3d31c0
commit 529ceb133e
2 changed files with 2 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ function getSkipReasonAlert(
repos: VariantAnalysisSkippedRepositoryGroup
) {
const repositoriesOmittedText = repos.repositoryCount > repos.repositories.length
? ` (Only the first ${repos.repositories.length} ${repos.repositories.length > 1 ? 'repositories are' : 'repository is'} shown.)`
? ` (Only the first ${repos.repositories.length > 1 ? `${repos.repositories.length} repositories are` : 'repository is'} shown.)`
: '';
return (
<Alert

View File

@@ -50,7 +50,7 @@ describe(VariantAnalysisSkippedRepositoriesTab.name, () => {
}
});
expect(screen.getByText('The following repositories could not be scanned because you do not have read access. (Only the first 1 repository is shown.)')).toBeInTheDocument();
expect(screen.getByText('The following repositories could not be scanned because you do not have read access. (Only the first repository is shown.)')).toBeInTheDocument();
});
it('renders warning message when there are repositories omitted and multiple shown', async () => {