Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Fix tests failing because of shadow DOM boundary removal from the editor #72

Merged
merged 1 commit into from
Oct 17, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions spec/command-palette-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ describe "CommandPalette", ->
expect(palette.isVisible()).toBeTruthy()
atom.commands.dispatch palette[0], 'command-palette:toggle'
expect(palette.is(':visible')).toBeFalsy()
expect(document.activeElement).toBe(editorElement)
expect(document.activeElement.closest('atom-text-editor')).toBe(editorElement)

describe "when the command palette is cancelled", ->
it "focuses the root view and hides the command palette", ->
expect(palette.is(':visible')).toBeTruthy()
palette.cancel()
expect(palette.is(':visible')).toBeFalsy()
expect(document.activeElement).toBe(editorElement)
expect(document.activeElement.closest('atom-text-editor')).toBe(editorElement)

describe "when an command selection is confirmed", ->
it "hides the palette, then focuses the previously focused element and emits the selected command on it", ->
Expand All @@ -81,7 +81,7 @@ describe "CommandPalette", ->

palette.confirmed(palette.items[3])

expect(document.activeElement).toBe(editorElement)
expect(document.activeElement.closest('atom-text-editor')).toBe(editorElement)
expect(eventHandler).toHaveBeenCalled()
expect(palette.is(':visible')).toBeFalsy()

Expand Down