summaryrefslogtreecommitdiff
path: root/spec/frontend/vue_shared/components/runner_instructions/instructions/runner_kubernetes_instructions_spec.js
blob: 0bfcc0e3d86e12e0c6c0a8d9e228713900d029a2 (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
28
import { shallowMount } from '@vue/test-utils';

import { GlButton } from '@gitlab/ui';
import RunnerKubernetesInstructions from '~/vue_shared/components/runner_instructions/instructions/runner_kubernetes_instructions.vue';

describe('RunnerKubernetesInstructions', () => {
  let wrapper;

  const createComponent = () => {
    wrapper = shallowMount(RunnerKubernetesInstructions, {});
  };

  const findButton = () => wrapper.findComponent(GlButton);

  beforeEach(() => {
    createComponent();
  });

  it('renders contents', () => {
    expect(wrapper.text().replace(/\s+/g, ' ')).toMatchSnapshot();
  });

  it('renders link', () => {
    expect(findButton().attributes('href')).toBe(
      'https://docs.gitlab.com/runner/install/kubernetes.html',
    );
  });
});