diff --git a/test/app-tests/joining.js b/test/app-tests/joining.js index 442b67c2db..30ef70db90 100644 --- a/test/app-tests/joining.js +++ b/test/app-tests/joining.js @@ -95,7 +95,10 @@ describe('joining a room', function () { }); var roomView; - httpBackend.flush().then(() => { + // wait for /sync to happen + return q.delay(1).then(() => { + return httpBackend.flush(); + }).then(() => { var roomDir = ReactTestUtils.findRenderedComponentWithType( matrixChat, RoomDirectory);