Commit dbccc08c authored by JC Brand's avatar JC Brand

Trying to avoid intermittent failure on Travis

parent fa85fc71
...@@ -3427,11 +3427,11 @@ ...@@ -3427,11 +3427,11 @@
'from': view.model.get('jid'), 'from': view.model.get('jid'),
'to': _converse.connection.jid 'to': _converse.connection.jid
}); });
spyOn(view, 'close').and.callThrough();
spyOn(_converse, 'emit'); spyOn(_converse, 'emit');
expect(_converse.chatboxes.length).toBe(2);
_converse.connection._dataRecv(test_utils.createRequest(result_stanza)); _converse.connection._dataRecv(test_utils.createRequest(result_stanza));
await test_utils.waitUntil(() => (view.model.get('connection_status') === converse.ROOMSTATUS.DISCONNECTED)); await test_utils.waitUntil(() => (view.model.get('connection_status') === converse.ROOMSTATUS.DISCONNECTED));
expect(view.close).toHaveBeenCalled(); expect(_converse.chatboxes.length).toBe(1);
expect(_converse.emit).toHaveBeenCalledWith('chatBoxClosed', jasmine.any(Object)); expect(_converse.emit).toHaveBeenCalledWith('chatBoxClosed', jasmine.any(Object));
done(); done();
})); }));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment