summaryrefslogtreecommitdiff
path: root/spec/frontend/issue_show
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-23 06:09:45 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-23 06:09:45 +0000
commit86fa823611b3ab5701d144aca1c57c51b4af25d5 (patch)
treeae6b2858c282d6f0cd2763135ef32f564c9295e8 /spec/frontend/issue_show
parent8007620dc7216ff2b9e7dde0aa88e6f47fc433e7 (diff)
downloadgitlab-ce-86fa823611b3ab5701d144aca1c57c51b4af25d5.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/issue_show')
-rw-r--r--spec/frontend/issue_show/components/incidents/highlight_bar_spec.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/frontend/issue_show/components/incidents/highlight_bar_spec.js b/spec/frontend/issue_show/components/incidents/highlight_bar_spec.js
index 8d50df5e406..557ef48e908 100644
--- a/spec/frontend/issue_show/components/incidents/highlight_bar_spec.js
+++ b/spec/frontend/issue_show/components/incidents/highlight_bar_spec.js
@@ -1,5 +1,5 @@
import { shallowMount } from '@vue/test-utils';
-import { GlLink } from '@gitlab/ui';
+import { GlLink, GlSprintf } from '@gitlab/ui';
import HighlightBar from '~/issue_show/components/incidents/highlight_bar.vue';
import { formatDate } from '~/lib/utils/datetime_utility';
@@ -9,6 +9,7 @@ describe('Highlight Bar', () => {
let wrapper;
const alert = {
+ iid: 1,
startedAt: '2020-05-29T10:39:22Z',
detailsUrl: 'http://127.0.0.1:3000/root/unique-alerts/-/alert_management/1/details',
eventCount: 1,
@@ -20,6 +21,9 @@ describe('Highlight Bar', () => {
propsData: {
alert,
},
+ stubs: {
+ GlSprintf,
+ },
});
};
@@ -39,7 +43,8 @@ describe('Highlight Bar', () => {
it('renders a link to the alert page', () => {
expect(findLink().exists()).toBe(true);
expect(findLink().attributes('href')).toBe(alert.detailsUrl);
- expect(findLink().text()).toContain(alert.title);
+ expect(findLink().attributes('title')).toBe(alert.title);
+ expect(findLink().text()).toBe(`Alert #${alert.iid}`);
});
it('renders formatted start time of the alert', () => {