mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Attach to DOM in specs that alter the mini editor
This is now required since populateList() is only calls when the timeout is fired and the select list is still on the DOM.
This commit is contained in:
@@ -124,6 +124,9 @@ describe "SelectList", ->
|
||||
expect(selectList.confirmed).toHaveBeenCalledWith(array[2])
|
||||
|
||||
describe "when there is no item selected (because the list is empty)", ->
|
||||
beforeEach ->
|
||||
selectList.attachToDom()
|
||||
|
||||
it "does not trigger the confirmed hook", ->
|
||||
miniEditor.insertText("i will never match anything")
|
||||
window.advanceClock(selectList.inputThrottle)
|
||||
|
||||
@@ -288,6 +288,9 @@ describe "AutocompleteView", ->
|
||||
expect(editor.lineForBufferRow(10)).toBe matchToSelect.text()
|
||||
|
||||
describe "when the mini-editor receives keyboard input", ->
|
||||
beforeEach ->
|
||||
editor.attachToDom()
|
||||
|
||||
describe "when text is removed from the mini-editor", ->
|
||||
it "reloads the match list based on the mini-editor's text", ->
|
||||
editor.getBuffer().insert([10,0] ,"t")
|
||||
|
||||
Reference in New Issue
Block a user