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

Commit 90123d2

Browse files
committed
Attach elements to jasmine DOM
Atom migrated to using customElements from document.registerElement. Due to this move, now there is need to attach some elements to the DOM on some specs.
1 parent 3ea9d1f commit 90123d2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

spec/tree-view-package-spec.coffee

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2688,6 +2688,8 @@ describe "TreeView", ->
26882688
dotFileView.dispatchEvent(new MouseEvent('click', {bubbles: true, detail: 1}))
26892689

26902690
runs ->
2691+
workspaceElement = atom.views.getView(atom.workspace)
2692+
jasmine.attachToDOM(workspaceElement)
26912693
atom.commands.dispatch(treeView.element, "tree-view:duplicate")
26922694
copyDialog = atom.workspace.getModalPanels()[0].getItem()
26932695

@@ -2710,6 +2712,8 @@ describe "TreeView", ->
27102712
dotFileView.dispatchEvent(new MouseEvent('click', {bubbles: true, detail: 1}))
27112713

27122714
runs ->
2715+
workspaceElement = atom.views.getView(atom.workspace)
2716+
jasmine.attachToDOM(workspaceElement)
27132717
atom.commands.dispatch(treeView.element, "tree-view:duplicate")
27142718
copyDialog = atom.workspace.getModalPanels()[0].getItem()
27152719

@@ -2732,6 +2736,8 @@ describe "TreeView", ->
27322736
atom.workspace.open('tree-view.js')
27332737

27342738
runs ->
2739+
workspaceElement = atom.views.getView(atom.workspace)
2740+
jasmine.attachToDOM(workspaceElement)
27352741
editorElement = atom.views.getView(atom.workspace.getCenter().getActivePaneItem())
27362742
atom.commands.dispatch(editorElement, "tree-view:duplicate")
27372743
copyDialog = atom.workspace.getModalPanels()[0].getItem()
@@ -5244,6 +5250,7 @@ describe 'Icon class handling', ->
52445250
waitForPackageActivation()
52455251

52465252
runs ->
5253+
jasmine.attachToDOM(workspaceElement)
52475254
treeView = atom.packages.getActivePackage("tree-view").mainModule.getTreeViewInstance()
52485255
files = workspaceElement.querySelectorAll('li[is="tree-view-file"]')
52495256

0 commit comments

Comments
 (0)