Commit 4c348234 authored by Tomasz Maczukin's avatar Tomasz Maczukin

Fix sidebar_detail_row_spec.js

parent 12401758
...@@ -38,10 +38,13 @@ describe('Sidebar detail row', () => { ...@@ -38,10 +38,13 @@ describe('Sidebar detail row', () => {
).toEqual('this is the title: this is the value'); ).toEqual('this is the title: this is the value');
}); });
it('should not render help when helpUrl not provided', () => { describe('when helpUrl not provided', () => {
expect(vm.$el.querySelector('.help-button')).toBeUndefined(); it('should not render help', () => {
expect(vm.$el.querySelector('.help-button')).toBeNull();
});
}); });
describe('when helpUrl provided', () => {
beforeEach(() => { beforeEach(() => {
vm = new SidebarDetailRow({ vm = new SidebarDetailRow({
propsData: { propsData: {
...@@ -51,7 +54,8 @@ describe('Sidebar detail row', () => { ...@@ -51,7 +54,8 @@ describe('Sidebar detail row', () => {
}).$mount(); }).$mount();
}); });
it('should render help when helpUrl is provided', () => { it('should render help', () => {
expect(vm.$el.querySelector('.help-button a').getAttribute('href')).toEqual('help url'); expect(vm.$el.querySelector('.help-button a').getAttribute('href')).toEqual('help url');
}); });
});
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment