Commit 6cf2c4af authored by Jose Vargas's avatar Jose Vargas

Fix weird merge for spec/javascripts/monitoring/dashboard_spec.js

parent 58b26c0c
......@@ -185,41 +185,4 @@ describe('Dashboard', () => {
.catch(done.fail);
});
});
describe('when the window resizes', () => {
let mock;
beforeEach(() => {
mock = new MockAdapter(axios);
mock.onGet(mockApiEndpoint).reply(200, metricsGroupsAPIResponse);
jasmine.clock().install();
});
afterEach(() => {
mock.restore();
jasmine.clock().uninstall();
});
it('rerenders the dashboard when the sidebar is resized', done => {
const component = new DashboardComponent({
el: document.querySelector('.prometheus-graphs'),
propsData: { ...propsData, hasMetrics: true, showPanels: false },
});
expect(component.forceRedraw).toEqual(0);
const navSidebarEl = document.querySelector('.nav-sidebar');
navSidebarEl.classList.add('nav-sidebar-collapsed');
Vue.nextTick()
.then(() => {
jasmine.clock().tick(1000);
return Vue.nextTick();
})
.then(() => {
expect(component.forceRedraw).toEqual(component.elWidth);
done();
})
.catch(done.fail);
});
});
});
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