Commit 8eaed8ff authored by Alexander Turinske's avatar Alexander Turinske

Update translation to include + sign

- update tests to be stronger
parent 41b2240a
......@@ -342,8 +342,7 @@ export default {
data-testid="vulnerability-more-identifiers"
class="gl-text-gray-500"
>
<span>+</span>
<gl-sprintf :message="__('%{count} more')">
<gl-sprintf :message="__('+ %{count} more')">
<template #count>
{{ extraIdentifierCount(item.identifiers) }}
</template>
......
......@@ -11,6 +11,7 @@ import VulnerabilityList, {
import FiltersProducedNoResults from 'ee/security_dashboard/components/empty_states/filters_produced_no_results.vue';
import DashboardHasNoVulnerabilities from 'ee/security_dashboard/components/empty_states/dashboard_has_no_vulnerabilities.vue';
import { generateVulnerabilities, vulnerabilities } from './mock_data';
import { trimText } from 'helpers/text_helper';
describe('Vulnerability list component', () => {
useLocalStorageSpy();
......@@ -217,10 +218,12 @@ describe('Vulnerability list component', () => {
const firstIdentifiers = newVulnerabilities[0].identifiers;
expect(identifiers.at(0).text()).toBe(firstIdentifiers[0].name);
expect(extraIdentifierCounts.at(0).text()).toContain(firstIdentifiers.length - 1);
expect(trimText(extraIdentifierCounts.at(0).text())).toContain(
`${firstIdentifiers.length - 1} more`,
);
expect(identifiers.at(1).text()).toBe(newVulnerabilities[1].identifiers[0].name);
expect(extraIdentifierCounts.length).toBe(1);
expect(extraIdentifierCounts).toHaveLength(1);
});
it('should display the vulnerability report type', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment