Added tests for one pane resizing

This commit is contained in:
Ramon Jimenez
2017-12-21 16:26:34 -07:00
parent d55492cb4d
commit 08793a2af1
7 changed files with 440 additions and 0 deletions

View File

@@ -237,3 +237,30 @@ describe "PaneContainerElement", ->
atom.commands.dispatch(rightPane.getElement(), 'pane:decrease-size')
expect(leftPane.getFlexScale()).toBe 1/1.1
expect(rightPane.getFlexScale()).toBe 1/1.1
describe "one pane resizing", ->
[singlePane] = []
beforeEach ->
container = new PaneContainer(params)
singlePane = container.getActivePane()
describe "when pane:increase-size is triggered", ->
it "increases the size of the pane", ->
expect(singlePane.getFlexScale()).toBe 1
atom.commands.dispatch(singlePane.getElement(), 'pane:increase-size')
expect(singlePane.getFlexScale()).toBe 1
atom.commands.dispatch(singlePane.getElement(), 'pane:increase-size')
expect(singlePane.getFlexScale()).toBe 1
describe "when pane:decrease-size is triggered", ->
it "decreases the size of the pane", ->
expect(singlePane.getFlexScale()).toBe 1
atom.commands.dispatch(singlePane.getElement(), 'pane:decrease-size')
expect(singlePane.getFlexScale()).toBe 1
atom.commands.dispatch(singlePane.getElement(), 'pane:decrease-size')
expect(singlePane.getFlexScale()).toBe 1