Merge pull request #3549 from atom/bo-visibility-split

Add sections and split methods into essential / extended API
This commit is contained in:
Ben Ogle
2014-09-17 16:51:50 -07:00
25 changed files with 2134 additions and 1821 deletions

View File

@@ -8,6 +8,23 @@ describe "the `atom` global", ->
beforeEach ->
atom.workspaceView = new WorkspaceView
describe 'window sizing methods', ->
describe '::getPosition and ::setPosition', ->
it 'sets the position of the window, and can retrieve the position just set', ->
atom.setPosition(22, 45)
expect(atom.getPosition()).toEqual x: 22, y: 45
describe '::getSize and ::setSize', ->
originalSize = null
beforeEach ->
originalSize = atom.getSize()
afterEach ->
atom.setSize(originalSize.width, originalSize.height)
it 'sets the size of the window, and can retrieve the size just set', ->
atom.setSize(100, 400)
expect(atom.getSize()).toEqual width: 100, height: 400
describe "package lifecycle methods", ->
describe ".loadPackage(name)", ->
it "continues if the package has an invalid package.json", ->

View File

@@ -2239,7 +2239,7 @@ describe "EditorComponent", ->
editor.setSoftWrapped(true)
callingOrder = []
editor.onDidChangeScreenLines -> callingOrder.push 'screen-lines-changed'
editor.onDidChange -> callingOrder.push 'screen-lines-changed'
wrapperView.on 'editor:display-updated', -> callingOrder.push 'editor:display-updated'
editor.insertText("HELLO! HELLO!\n HELLO! HELLO! HELLO! HELLO! HELLO! HELLO! HELLO! HELLO! HELLO! HELLO! HELLO! HELLO! HELLO! HELLO! HELLO! HELLO! HELLO! HELLO! ")
nextAnimationFrame()