@@ -526,7 +526,7 @@ describe "TreeView", ->
526
526
sampleJs .mousedown ()
527
527
expect (sampleJs).toHaveClass ' selected'
528
528
529
- if atom .workspace .buildTextEditor ().isPending ?
529
+ if atom .workspace .getActivePane ().getPendingItem ?
530
530
describe " when files are clicked" , ->
531
531
beforeEach ->
532
532
jasmine .attachToDOM (workspaceElement)
@@ -548,7 +548,7 @@ describe "TreeView", ->
548
548
549
549
it " opens it in the pane in pending state" , ->
550
550
expect (activePaneItem .getPath ()).toBe atom .project .getDirectories ()[0 ].resolve (' tree-view.js' )
551
- expect (activePaneItem . isPending ()). toBe true
551
+ expect (atom . workspace . getActivePane (). getPendingItem ()). toEqual activePaneItem
552
552
553
553
it " changes the focus to the file" , ->
554
554
expect (atom .views .getView (activePaneItem)).toHaveFocus ()
@@ -584,18 +584,18 @@ describe "TreeView", ->
584
584
585
585
it " opens it in pending state on first click" , ->
586
586
expect (activePaneItem .getPath ()).toBe atom .project .getDirectories ()[0 ].resolve (' tree-view.js' )
587
- expect (activePaneItem . isPending ()). toBe true
587
+ expect (atom . workspace . getActivePane (). getPendingItem ()). toEqual activePaneItem
588
588
589
589
it " terminates pending state on second click" , ->
590
590
sampleJs .trigger clickEvent (originalEvent : {detail : 2 })
591
591
waitsFor ->
592
- activePaneItem . isPending () is false
592
+ atom . workspace . getActivePane (). getPendingItem () isnt activePaneItem
593
593
594
594
it " does not create pending state on subsequent single click" , ->
595
595
sampleJs .trigger clickEvent (originalEvent : {detail : 2 })
596
596
sampleJs .trigger clickEvent (originalEvent : {detail : 1 })
597
597
waitsFor ->
598
- activePaneItem . isPending () is false
598
+ atom . workspace . getActivePane (). getPendingItem () isnt activePaneItem
599
599
600
600
describe " when a file is single-clicked, then double-clicked" , ->
601
601
activePaneItem = null
@@ -611,13 +611,13 @@ describe "TreeView", ->
611
611
612
612
it " opens it in pending state on single-click" , ->
613
613
expect (activePaneItem .getPath ()).toBe atom .project .getDirectories ()[0 ].resolve (' tree-view.js' )
614
- expect (activePaneItem . isPending ()). toBe true
614
+ expect (atom . workspace . getActivePane (). getPendingItem ()). toEqual activePaneItem
615
615
616
616
it " terminates pending state on the double-click and focuses file" , ->
617
617
sampleJs .trigger clickEvent (originalEvent : {detail : 2 })
618
618
expect (atom .views .getView (activePaneItem)).toHaveFocus ()
619
619
waitsFor ->
620
- activePaneItem . isPending () is false
620
+ atom . workspace . getActivePane (). getPendingItem () isnt activePaneItem
621
621
622
622
it " keeps focus on tree-view if the file is the active pane item" , ->
623
623
sampleJs .trigger clickEvent (originalEvent : {detail : 1 })
0 commit comments