Commit Graph

18 Commits

Author SHA1 Message Date
David Baker
8e288e14bf Add more hacky q.delays
To work around the fact that we now do more trips around the
event loop to update view state (because of going vis the store).
Also add comment saying how horrible this is.
2017-06-06 15:59:24 +01:00
Luke Barnard
feaff9d99d Fix tests for new-guest-access
This time the test wasn't being flaky, but it does inspect a lot of the internal of RoomView, which has had some modifications recently. I've updated the test to reflect this and it passes locally.

Also, fix a bug in HomePage with an undeclared "error" which should be "err".

Let's see what Travis thinks of this!
2017-06-05 20:16:44 +01:00
Richard van der Hoff
f16086bbea Attempt to deflakify joining test
give the client a bit longer to get started.
2017-05-18 13:39:33 +01:00
Richard van der Hoff
593e101521 Fix a flaky test
Depending on timing, the first `httpBackend.flush()` could end up just flushing
a '/presence' call rather than the initial sync. The fix to that is simply to
not set the expectation on /presence.

While we're there, split out the flushes of /publicRooms and
/thirdparty/protocols, so that we can be sure that they happen.

There is probably still a bunch of flakiness there, but this should fix one
particular instance.
2017-04-18 13:45:31 +01:00
Luke Barnard
e40d3852ff Fix tests to reflect recent changes
This is an attempt to reduce flakiness (see https://github.com/matrix-org/matrix-react-sdk/pull/781 also)
2017-03-29 16:07:11 +01:00
Kegan Dougal
d876e4482b Fix broken tests caused by adding IndexedDB support
This test assumed that `/sync` would be called immediately after rendering
`<MatrixChat />` but this isn't true in an IndexedDB world: it bounces via
`store.startup()` first.

It looks like the tests resolve this by adding `q.delay(1)` so that's what
I've done: in the future it would be better to extend `HttpBackend` to have
a `waitFor(req) Promise` function so we can removing timing from the tests.
2017-02-17 14:32:08 +00:00
David Baker
161978ab05 Fix tests 2016-12-16 15:20:52 +00:00
David Baker
3938abc5dd add webkit vendor prefixed properties
for mavericks safari
2016-09-23 17:18:52 +01:00
David Baker
d0618c4f49 Update test now that /publicRooms is a post 2016-09-16 20:49:28 +01:00
Richard van der Hoff
dd6868c255 Fix joining test
This had been broken by
https://github.com/matrix-org/matrix-react-sdk/pull/399. Change the way we
populate the matrixclient used for the joining tests.
2016-08-10 22:39:53 +01:00
David Baker
c9ab977d73 Fix unit tests
ReplaceUsingAccessToken was, uh, replaced with replacedUsingCreds
2016-08-05 14:38:10 +01:00
David Baker
607923b58f Fix test since we peek by room ID, not alias 2016-06-17 17:49:36 +01:00
Richard van der Hoff
bf31d6d5fa Karma test tweaks
* Make sure we only get one js-sdk (and update runtime config to match)
* Don't verifyNoOutstandingRequests (since it is hard to be certain which we
  will get, and makes the tests too dependent on implementation-specifics).
* Disable color for npm test, to avoid confusing Jenkins
2016-04-13 17:41:23 +01:00
Richard van der Hoff
181a6a61ff tests: Don't add the div to the DOM 2016-04-13 17:20:06 +01:00
Richard van der Hoff
322af6513d Run some tests under karma
Including a regression test for
https://github.com/vector-im/vector-web/issues/1314
2016-04-13 17:20:06 +01:00
Richard van der Hoff
69ce3c43cf Revert "Merge branch 'develop' into rav/karma"
The karma tests don't pass yet, and aren't ready to land on develop.

This reverts commit 438453e61a, reversing
changes made to 50f94eb040.
2016-04-13 17:17:45 +01:00
Richard van der Hoff
a512e600a7 tests: Don't add the div to the DOM 2016-04-13 11:16:38 +01:00
Richard van der Hoff
429d110212 Run some tests under karma
Including a regression test for
https://github.com/vector-im/vector-web/issues/1314
2016-04-13 10:15:04 +01:00