mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
fix command pallete specs to reflect new classes
This commit is contained in:
@@ -16,15 +16,15 @@ describe "CommandPalette", ->
|
||||
afterEach ->
|
||||
rootView.remove()
|
||||
|
||||
describe "when command-palette:toggle is triggered on the root view", ->
|
||||
fdescribe "when command-palette:toggle is triggered on the root view", ->
|
||||
it "shows a list of all valid command descriptions, names, and keybindings for the previously focused element", ->
|
||||
keyBindings = _.losslessInvert(keymap.bindingsForElement(rootView.getActiveEditor()))
|
||||
for eventName, description of rootView.getActiveEditor().events()
|
||||
eventLi = palette.list.children("[data-event-name='#{eventName}']")
|
||||
if description
|
||||
expect(eventLi).toExist()
|
||||
expect(eventLi.find('.event-name')).toHaveText(eventName)
|
||||
expect(eventLi.find('.event-description')).toHaveText(description)
|
||||
expect(eventLi.find('.label')).toHaveText(description)
|
||||
expect(eventLi.find('.label').attr('title')).toBe(eventName)
|
||||
for binding in keyBindings[eventName] ? []
|
||||
expect(eventLi.find(".key-binding:contains(#{binding})")).toExist()
|
||||
else
|
||||
@@ -39,8 +39,8 @@ describe "CommandPalette", ->
|
||||
description = editorEvents[eventName] unless description
|
||||
if description
|
||||
expect(eventLi).toExist()
|
||||
expect(eventLi.find('.event-name')).toHaveText(eventName)
|
||||
expect(eventLi.find('.event-description')).toHaveText(description)
|
||||
expect(eventLi.find('.label')).toHaveText(description)
|
||||
expect(eventLi.find('.label').attr('title')).toBe(eventName)
|
||||
else
|
||||
expect(eventLi).not.toExist()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user