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

environment_external_url_spec.js.es6 « environments « javascripts « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5270ebef0aeae65fe6b9bbaad88a47993ea7f19d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require('environments/components/environment_external_url');

describe('External URL Component', () => {
  preloadFixtures('static/environments/element.html.raw');
  beforeEach(() => {
    loadFixtures('static/environments/element.html.raw');
  });

  it('should link to the provided externalUrl prop', () => {
    const externalURL = 'https://gitlab.com';
    const component = new window.gl.environmentsList.ExternalUrlComponent({
      el: document.querySelector('.test-dom-element'),
      propsData: {
        externalUrl: externalURL,
      },
    });

    expect(component.$el.getAttribute('href')).toEqual(externalURL);
    expect(component.$el.querySelector('fa-external-link')).toBeDefined();
  });
});