Welcome to mirror list, hosted at ThFree Co, Russian Federation.

incubation_alert_spec.js « components « experiment_tracking « ml « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e07a4ed816be772bf0c42d24d02be3763b009e57 (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/groups/gitlab-org/-/epics/8560',
    );
  });

  it('is removed if dismissed', async () => {
    await wrapper.find('[aria-label="Dismiss"]').trigger('click');

    expect(findAlert().exists()).toBe(false);
  });
});