               "1";"2"
               """)
 
-              waitsFor -> changeSpy.callCount > 1
+              waitsFor 'change callback called', -> changeSpy.callCount > 0
               waitsFor -> csvEditor.editor is undefined
 
             it 'replaces the table content with a form', ->

          fsp.removeSync(newPath)
          fsp.moveSync(csvEditor.getPath(), newPath)

        waitsFor -> spy.callCount > 0

      it 'detects the change in path', ->
        expect(spy).toHaveBeenCalledWith(newPath)

          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()
