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

Wait for save to complete in buffer modifier indicator test #193

Merged
merged 1 commit into from
May 23, 2017
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
7 changes: 6 additions & 1 deletion spec/built-in-tiles-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,12 @@ describe "Built-in Status Bar Tiles", ->
editor.insertText("\n")
advanceClock(buffer.stoppedChangingDelay)
expect(fileInfo.classList.contains('buffer-modified')).toBe(true)
editor.getBuffer().save()

waitsForPromise ->
# TODO - remove this Promise.resolve once atom/atom#14435 lands.
Promise.resolve(editor.getBuffer().save())

runs ->
expect(fileInfo.classList.contains('buffer-modified')).toBe(false)

it "disables the buffer modified indicator if the content matches again", ->
Expand Down