From 6944815a7209228fc288ad6925713df9f3178f2d Mon Sep 17 00:00:00 2001 From: simurai Date: Thu, 28 Jan 2016 23:14:13 +0900 Subject: [PATCH] Add specs for header/footer widths --- spec/workspace-element-spec.coffee | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spec/workspace-element-spec.coffee b/spec/workspace-element-spec.coffee index add0b39c2..f05c77f9a 100644 --- a/spec/workspace-element-spec.coffee +++ b/spec/workspace-element-spec.coffee @@ -80,6 +80,19 @@ describe "WorkspaceElement", -> modalContainer = workspaceElement.querySelector('atom-panel-container.modal') expect(modalContainer.parentNode).toBe workspaceElement + it 'stretches header/footer panels to the workspace width', -> + workspaceElement = atom.views.getView(atom.workspace) + jasmine.attachToDOM(workspaceElement) + expect(workspaceElement.offsetWidth).toBeGreaterThan(0) + + headerItem = document.createElement('div') + atom.workspace.addHeaderPanel({item: headerItem}) + expect(headerItem.offsetWidth).toEqual(workspaceElement.offsetWidth) + + footerItem = document.createElement('div') + atom.workspace.addFooterPanel({item: footerItem}) + expect(footerItem.offsetWidth).toEqual(workspaceElement.offsetWidth) + describe "the 'window:toggle-invisibles' command", -> it "shows/hides invisibles in all open and future editors", -> workspaceElement = atom.views.getView(atom.workspace)