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

Commit 60b1f0c

Browse files
committed
Wait for status refresh in test, correct some assertions
1 parent adab645 commit 60b1f0c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spec/fuzzy-finder-spec.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,8 @@ describe('FuzzyFinder', () => {
12351235

12361236
gitDirectory = atom.project.getDirectories()[1]
12371237
gitRepository = atom.project.getRepositories()[1]
1238+
1239+
waitsFor(done => gitRepository.onDidChangeStatuses(done))
12381240
})
12391241

12401242
describe('git-status-finder behavior', () => {
@@ -1263,9 +1265,9 @@ describe('FuzzyFinder', () => {
12631265

12641266
runs(() => {
12651267
expect(atom.workspace.panelForItem(gitStatusView).isVisible()).toBe(true)
1266-
expect(gitStatusView.element.querySelectorAll('.file').length).toBe(2)
1268+
expect(gitStatusView.element.querySelectorAll('.file').length).toBe(4)
12671269
expect(gitStatusView.element.querySelectorAll('.status.status-modified').length).toBe(1)
1268-
expect(gitStatusView.element.querySelectorAll('.status.status-added').length).toBe(1)
1270+
expect(gitStatusView.element.querySelectorAll('.status.status-added').length).toBe(3)
12691271
})
12701272
})
12711273
})

0 commit comments

Comments
 (0)