Commit 5cd6952f authored by Lucas Charles's avatar Lucas Charles

fix: Fix incorrect il8n referenece for Vulnerability Dismissal

Previous option was incorrect, showing no tooltip

Changelog: fixed
EE: true
parent ece27edb
...@@ -124,9 +124,9 @@ export default { ...@@ -124,9 +124,9 @@ export default {
v-if="isDismissed" v-if="isDismissed"
key="undo-dismiss" key="undo-dismiss"
v-gl-tooltip v-gl-tooltip
:aria-label="$options.i18n.undoDismiss" :aria-label="$options.i18n.revertDismissVulnerability"
:loading="isDismissingVulnerability" :loading="isDismissingVulnerability"
:title="$options.i18n.undoDismiss" :title="$options.i18n.revertDismissVulnerability"
class="js-undo-dismiss" class="js-undo-dismiss"
variant="warning" variant="warning"
category="secondary" category="secondary"
......
...@@ -67,6 +67,10 @@ describe('Security Dashboard Action Buttons', () => { ...@@ -67,6 +67,10 @@ describe('Security Dashboard Action Buttons', () => {
expect(findMoreInfoButton().exists()).toBe(true); expect(findMoreInfoButton().exists()).toBe(true);
}); });
it('should render the correct tooltip', () => {
expect(findMoreInfoButton().attributes('title')).toBe(i18n.moreInfo);
});
it('should emit an `setModalData` event and open the modal when clicked', async () => { it('should emit an `setModalData` event and open the modal when clicked', async () => {
await findMoreInfoButton().trigger('click'); await findMoreInfoButton().trigger('click');
...@@ -129,6 +133,12 @@ describe('Security Dashboard Action Buttons', () => { ...@@ -129,6 +133,12 @@ describe('Security Dashboard Action Buttons', () => {
expect(findDismissVulnerabilityButton().exists()).toBe(true); expect(findDismissVulnerabilityButton().exists()).toBe(true);
}); });
it('should render the correct tooltip', () => {
expect(findDismissVulnerabilityButton().attributes('title')).toBe(
i18n.dismissVulnerability,
);
});
it('should emit an `dismissVulnerability` event when clicked', async () => { it('should emit an `dismissVulnerability` event when clicked', async () => {
await findDismissVulnerabilityButton().trigger('click'); await findDismissVulnerabilityButton().trigger('click');
...@@ -183,5 +193,9 @@ describe('Security Dashboard Action Buttons', () => { ...@@ -183,5 +193,9 @@ describe('Security Dashboard Action Buttons', () => {
it('should render the undo dismiss button', () => { it('should render the undo dismiss button', () => {
expect(findUndoDismissButton().exists()).toBe(true); expect(findUndoDismissButton().exists()).toBe(true);
}); });
it('should render the correct tooltip', () => {
expect(findUndoDismissButton().attributes('title')).toBe(i18n.revertDismissVulnerability);
});
}); });
}); });
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