Wait for next animation frame before measuring when stylesheets change

Fixes #4479
This commit is contained in:
Nathan Sobo
2014-12-09 14:56:20 -07:00
parent 2028045254
commit b386b00bc0
2 changed files with 9 additions and 3 deletions

View File

@@ -1908,7 +1908,8 @@ describe "TextEditorComponent", ->
}
""", context: 'atom-text-editor'
nextAnimationFrame()
nextAnimationFrame() # handle stylesheet change event
nextAnimationFrame() # perform requested update
scrollbarCornerNode = componentNode.querySelector('.scrollbar-corner')
expect(verticalScrollbarNode.offsetWidth).toBe 8