These tests shall pass

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-05-11 11:25:27 -07:00
parent c93c63d721
commit 38582a22d3
2 changed files with 6 additions and 6 deletions

View File

@@ -368,7 +368,7 @@ describe "Autocomplete", ->
describe ".attach()", ->
beforeEach ->
editor.attachToDom()
setEditorHeightInLines(editor, 8)
setEditorHeightInLines(editor, 13)
editor.setCursorBufferPosition [1, 1]
describe "when the autocomplete view fits below the cursor", ->
@@ -381,17 +381,17 @@ describe "Autocomplete", ->
expect(autocomplete.position().left).toBe cursorPixelPosition.left
describe "when the autocomplete view does not fit below the cursor", ->
fit "adds the autocomplete view to the editor above the cursor", ->
editor.setCursorScreenPosition([6, 0])
it "adds the autocomplete view to the editor above the cursor", ->
editor.setCursorScreenPosition([11, 0])
editor.insertText('t ')
editor.setCursorScreenPosition([6, 0])
editor.setCursorScreenPosition([11, 0])
cursorPixelPosition = editor.pixelPositionForScreenPosition(editor.getCursorScreenPosition())
autocomplete.attach()
expect(autocomplete.parent()).toExist()
autocompleteBottom = autocomplete.position().top + autocomplete.outerHeight()
expect(autocompleteBottom).toBe cursorPixelPosition.top
# expect(autocomplete.position().left).toBe cursorPixelPosition.left
expect(autocomplete.position().left).toBe cursorPixelPosition.left
describe ".detach()", ->
it "clears the mini-editor and unbinds autocomplete event handlers for move-up and move-down", ->

View File

@@ -15,7 +15,7 @@ beforeEach ->
directoriesWithSubscriptions = []
afterEach ->
# $('#jasmine-content').empty()
$('#jasmine-content').empty()
document.title = defaultTitle
ensureNoDirectorySubscriptions()