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

environment_terminal_button_spec.js « environments « javascripts « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: be2289edc2b593b64ade367a988d8b00f3bda5c5 (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
import Vue from 'vue';
import terminalComp from '~/environments/components/environment_terminal_button';

describe('Stop Component', () => {
  let TerminalComponent;
  let component;
  const terminalPath = '/path';

  beforeEach(() => {
    TerminalComponent = Vue.extend(terminalComp);

    component = new TerminalComponent({
      propsData: {
        terminalPath,
      },
    }).$mount();
  });

  it('should render a link to open a web terminal with the provided path', () => {
    expect(component.$el.tagName).toEqual('A');
    expect(component.$el.getAttribute('title')).toEqual('Terminal');
    expect(component.$el.getAttribute('href')).toEqual(terminalPath);
  });
});