2017-03-13 20:58:26 -04:00
|
|
|
import Vue from 'vue';
|
2017-04-20 05:04:06 -04:00
|
|
|
import terminalComp from '~/environments/components/environment_terminal_button.vue';
|
2017-03-13 20:58:26 -04:00
|
|
|
|
|
|
|
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');
|
2017-03-31 05:20:11 -04:00
|
|
|
expect(component.$el.getAttribute('title')).toEqual('Terminal');
|
2017-03-13 20:58:26 -04:00
|
|
|
expect(component.$el.getAttribute('href')).toEqual(terminalPath);
|
|
|
|
});
|
|
|
|
});
|