fixing collapsible side bar editor (#15826) (#15846)

This commit is contained in:
Peter Pisljar 2018-01-04 16:49:25 +01:00 committed by GitHub
parent e0cbb9e95e
commit f32b284689
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View file

@ -23,6 +23,10 @@
width: @vis-editor-sidebar-min-width;
}
.collapsible-sidebar.closed {
min-width: 0;
}
.collapsible-sidebar--small {
width: 15%;
}

View file

@ -5,6 +5,7 @@ export default function ({ getService, getPageObjects }) {
const log = getService('log');
const remote = getService('remote');
const retry = getService('retry');
const find = getService('find');
const PageObjects = getPageObjects(['common', 'visualize', 'header', 'settings']);
describe('visualize app', function () {
@ -66,6 +67,16 @@ export default function ({ getService, getPageObjects }) {
expect(data).to.eql([ '32,212,254,720', '21,474,836,480', '20,401,094,656', '19,327,352,832', '18,253,611,008' ]);
});
it('should collapse the sidebar', async function () {
const editorSidebar = await find.byCssSelector('.collapsible-sidebar');
await PageObjects.visualize.clickEditorSidebarCollapse();
// Give d3 tag cloud some time to rearrange tags
await PageObjects.common.sleep(1000);
const afterSize = await editorSidebar.getSize();
expect(afterSize.width).to.be(0);
await PageObjects.visualize.clickEditorSidebarCollapse();
});
it('should still show all tags after sidebar has been collapsed', async function () {
await PageObjects.visualize.clickEditorSidebarCollapse();
// Give d3 tag cloud some time to rearrange tags