mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Update status class when window gains focus
This will keep the tree view in sync when Git operations are performed outside of the editor.
This commit is contained in:
@@ -887,6 +887,13 @@ describe "TreeView", ->
|
||||
it "adds a custom style", ->
|
||||
expect(treeView.find('.file:contains(tree-view.txt)')).toHaveClass 'modified'
|
||||
|
||||
describe "when the window gains focus after the contents are restored to a clean state", ->
|
||||
it "removes the custom style", ->
|
||||
expect(treeView.find('.file:contains(tree-view.txt)')).toHaveClass 'modified'
|
||||
fs.write modifiedFile, originalFileContent
|
||||
$(window).trigger 'focus'
|
||||
expect(treeView.find('.file:contains(tree-view.txt)')).not.toHaveClass 'modified'
|
||||
|
||||
describe "when a file is new", ->
|
||||
it "adds a custom style", ->
|
||||
expect(treeView.find('.file:contains(.gitignore)')).toHaveClass 'new'
|
||||
|
||||
Reference in New Issue
Block a user