blob: bb998a32f32ff31f8d2d1ca3a4edf41a9d150b70 (
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', () => {
preloadFixtures('static/environments/element.html.raw');
let stopURL;
let component;
beforeEach(() => {
loadFixtures('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?');
});
});
|