mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Fix command panel specs
This commit is contained in:
@@ -188,12 +188,12 @@ describe "CommandPanel", ->
|
||||
describe "when the command panel is not visible", ->
|
||||
it "shows the command panel and focuses the mini editor, but does not show the preview list", ->
|
||||
|
||||
describe "when core:cancel is triggered on the command panel", ->
|
||||
describe "when tool-pane:unfocus is triggered on the command panel", ->
|
||||
it "returns focus to the root view but does not hide the command panel", ->
|
||||
rootView.attachToDom()
|
||||
commandPanel.attach()
|
||||
expect(commandPanel.miniEditor.hiddenInput).toMatchSelector ':focus'
|
||||
commandPanel.trigger 'core:cancel'
|
||||
commandPanel.trigger 'tool-pane:unfocus'
|
||||
expect(commandPanel.hasParent()).toBeTruthy()
|
||||
expect(commandPanel.miniEditor.hiddenInput).not.toMatchSelector ':focus'
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class CommandPanel extends View
|
||||
commandPanel
|
||||
|
||||
@content: (rootView) ->
|
||||
@div class: 'command-panel', =>
|
||||
@div class: 'command-panel tool-pane', =>
|
||||
@subview 'previewList', new PreviewList(rootView)
|
||||
@div class: 'prompt-and-editor', =>
|
||||
@div ':', class: 'prompt', outlet: 'prompt'
|
||||
@@ -50,7 +50,7 @@ class CommandPanel extends View
|
||||
@history ?= []
|
||||
@historyIndex = @history.length
|
||||
|
||||
@command 'core:cancel', => @rootView.focus()
|
||||
@command 'tool-pane:unfocus', => @rootView.focus()
|
||||
@command 'core:close', => @detach()
|
||||
@command 'core:confirm', => @execute()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user