Fix text when 1 repo is shown
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user