               ]
           })
 
-          waitsFor -> tableEditor = csvEditor.editor
+          waitsFor 'table editor restored', -> tableEditor = csvEditor.editor
           runs ->
             expect(tableEditor.getScreenRowHeightAt(1)).toEqual(100)
             expect(tableEditor.getScreenRowHeightAt(2)).toEqual(200)

          tableEditorButton = csvEditorElement.form.openTableEditorButton
          click(tableEditorButton)

        waitsFor -> tableEditor?

      describe 'when the table is modified', ->
        beforeEach ->
          csvEditor.editor.addRow()

          fsp.removeSync(csvDest)
          waitsFor -> deleteSpy.callCount > 0

        it "retains its path and reports the buffer as modified", ->
          expect(csvEditor.getPath()).toBe(csvDest)

          csvEditor.onDidOpen ({editor}) ->
            tableEditor = editor

        waitsFor "for #{CHANGE_TIMEOUT}ms", sleep CHANGE_TIMEOUT

        runs ->
          tableEditorButton = csvEditorElement.form.openTableEditorButton
          click(tableEditorButton)

        waitsFor 'table editor created', -> tableEditor?

      it 'now parses the table data properly', ->
        expect(tableEditor).toBeDefined()
