Skip to content
Snippets Groups Projects
Commit d2007ee6 authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

Try to fix tests

parent 3176e298
Branches
Tags
No related merge requests found
Loading
Loading
@@ -7,14 +7,14 @@ describe('Stop Component', () => {
});
 
it('should link to the provided URL', () => {
const stopURL = 'https://gitlab.com/stop';
const stopURL = '/stop';
const component = new window.gl.environmentsList.StopComponent({
el: document.querySelector('.test-dom-element'),
propsData: {
stop_url: stopURL,
},
});
expect(component.$el.getAttribute('href')).toEqual(`${stopURL}/stop`);
expect(component.$el.getAttribute('href')).toEqual(stopURL);
});
 
describe('When clicked', () => {
Loading
Loading
@@ -26,9 +26,10 @@ describe('Stop Component', () => {
},
});
 
const spy = spyOn(window, 'confirm');
var confirm = spyOn(window, 'confirm');
confirm.and.returnValue(false);
component.$el.click();
expect(spy).toHaveBeenCalled();
expect(confirm).toHaveBeenCalled();
});
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment