blob: 7dca360c7ee75a9edb9b8aee2e3b43364544a56b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import { mount } from '@vue/test-utils';
import { GlAlert, GlButton } from '@gitlab/ui';
import IncubationAlert from '~/ml/experiment_tracking/components/incubation_alert.vue';
describe('IncubationAlert', () => {
let wrapper;
const findAlert = () => wrapper.findComponent(GlAlert);
const findButton = () => wrapper.findComponent(GlButton);
beforeEach(() => {
wrapper = mount(IncubationAlert);
});
it('displays link to issue', () => {
expect(findButton().attributes().href).toBe(
'https://gitlab.com/gitlab-org/gitlab/-/issues/381660',
);
});
it('is removed if dismissed', async () => {
await wrapper.find('[aria-label="Dismiss"]').trigger('click');
expect(findAlert().exists()).toBe(false);
});
});
|