blob: c3c5f2cc4c866478899fd7f4b2f9ccf742515701 (
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
|
//= require vue
//= require environments/components/environment_stop
describe('Stop Component', () => {
fixture.preload('static/environments/element.html.raw');
let stopURL;
let component;
beforeEach(() => {
fixture.load('static/environments/element.html.raw');
stopURL = '/stop';
component = new window.gl.environmentsList.StopComponent({
el: document.querySelector('.test-dom-element'),
propsData: {
stopUrl: stopURL,
},
});
});
it('should link to the provided URL', () => {
expect(component.$el.getAttribute('href')).toEqual(stopURL);
});
it('should have a data-confirm attribute', () => {
expect(component.$el.getAttribute('data-confirm')).toEqual('Are you sure you want to stop this environment?');
});
});
|