Commit graph

56 commits

Author SHA1 Message Date
J. Ryan Stinnett
585d28692d Fix loading tests for welcome page 2019-02-11 15:18:29 +00:00
J. Ryan Stinnett
50baa09f5e Revert "Disable even more tests"
This was only done because CI was missing
matrix-org/matrix-react-sdk@5977859dd9.

This reverts commit e55ceef905.
2019-02-11 10:06:44 +00:00
David Baker
fdb7a781e0
Merge pull request #8466 from vector-im/jryans/add-welcome-page
Add configurable welcome page
2019-02-08 17:17:24 +00:00
J. Ryan Stinnett
e55ceef905 Disable even more tests 2019-02-08 16:57:08 +00:00
J. Ryan Stinnett
ec83f792ad Fix / disable tests after welcome page 2019-02-08 16:35:39 +00:00
Bruno Windels
758723256e fix app tests after force enabling lazy loading + removing feature flag 2019-02-08 11:48:06 +00:00
J. Ryan Stinnett
2d360eab74 Remove support for team servers 2019-01-25 16:14:04 -06:00
J. Ryan Stinnett
e98346e7cd Rename login directory to auth 2019-01-21 17:46:03 -06:00
David Baker
0e580635eb Update tests for new platform layout 2018-12-18 18:13:51 +00:00
Richard van der Hoff
6ca0b3ad03 Update the tests to match https://github.com/matrix-org/matrix-react-sdk/pull/2340
See the react-sdk PR for some context.
2018-12-11 16:14:17 +00:00
David Baker
1dfaf70562
Revert "Revert "Run lint on travis builds and use modern node versions"" 2018-11-22 18:25:55 +00:00
David Baker
f701e2601a
Revert "Run lint on travis builds and use modern node versions" 2018-11-22 18:17:09 +00:00
Aaron Raimist
70fe4f67ee
eslint --fix on test/ 2018-10-19 20:59:07 -05:00
Michael Telatynski
f7a26ddb91
fix (race?) broken tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-11-19 20:46:40 +00:00
Matthew Hodgson
b9cf2c6b6c remove 'return to app' test 2017-10-26 18:08:42 +01:00
Richard van der Hoff
238afde00a Increase the timeout for clearing indexeddbs
Chrome seems to take ages (like, 1500ms regularly) to clear out the indexeddbs,
and that's causing test timeouts. Bump the timeout to hack around it.

Also: clear both dbs in parallel (can't hurt, right?) and improve diagnostics
on the process.
2017-07-20 11:01:27 +01:00
Richard van der Hoff
76181f4771 Merge remote-tracking branch 'origin/develop' into rav/bluebird 2017-07-13 12:04:54 +01:00
Richard van der Hoff
69eb1a49d4 Fix a broken test
turns out that you could call defer.resolve on q defers as an unbound function,
whereas that doesn't work with bluebird promises.
2017-07-13 00:56:13 +01:00
Richard van der Hoff
d5b550f89a replace q method calls with bluebird ones
```
find src test -name '*.js' |
    xargs perl -i -pe 's/q\.(all|defer|reject|delay|try|isFulfilled)\(/Promise.$1(/'
```
2017-07-13 00:50:01 +01:00
Richard van der Hoff
b29b4a959b q(...) -> Promise.resolve
```
find src test -name '*.js' | xargs perl -i -pe 's/\b[qQ]\(/Promise.resolve(/'
```
2017-07-13 00:50:01 +01:00
Richard van der Hoff
10decf95f6 replace imports of q with bluebird
update `package.json`

```
find src test -name '*.js' |
    xargs perl -i -pe 'if (/require\(.[qQ].\)/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'

find src test -name '*.js' |
    xargs perl -i -pe 'if (/import [qQ] /) { $_ = "import Promise from '\''bluebird'\'';\n"; }'
```
2017-07-13 00:48:31 +01:00
Richard van der Hoff
b2403d59b7 loading tests: wait for login component
Rather than a fixed delay, use matrix-react-test-utils to wait for the login
component to appear. Hopefully this will deflakify some tests.
2017-07-13 00:18:49 +01:00
Richard van der Hoff
bd1196716a Use external mock-request
mock-request is now factored out to matrix-mock-request; use it
2017-07-04 15:59:21 +01:00
Richard van der Hoff
ca3399df77 Clean up some log outputs from the integ tests 2017-06-20 17:41:21 +01:00
Richard van der Hoff
abf21675d5 Add some more logging to the tests
... to help diagnose when they fail
2017-06-20 16:24:04 +01:00
Richard van der Hoff
557d4ae4c1 Test 'return-to-app' functionality
Add a test for the 'log in as user' functionality, as well as the 'return to
app' functionality.
2017-06-19 10:47:36 +01:00
Richard van der Hoff
5a8a41ad50 Merge branch 'develop' into rav/fix_token_redirect 2017-06-19 09:05:19 +01:00
Richard van der Hoff
60be24c665 Rename promise 2017-06-19 09:04:24 +01:00
Richard van der Hoff
6df1574b8b onLoadCompleted is now onTokenLoginCompleted 2017-06-16 15:05:14 +01:00
Richard van der Hoff
f5b2a92e84 Give the login panel a bit longer to appear 2017-06-15 18:17:00 +01:00
Richard van der Hoff
1fcd462660 Tweak tests to match updates to matrixchat
Mostly this is just making it look at the `view` state rather than the
individual boolean flags.

One other tweak merits explanation: we now implement the initial
couldn't-register-as-guest login with an explicit switch to the LOGIN view,
which means that the URL gets updated to #/login.
2017-06-15 17:52:18 +01:00
Richard van der Hoff
a7a7ffd84b Merge pull request #4315 from vector-im/rav/test_rts_login
Add a test for the login flow when there is a teamserver
2017-06-15 16:13:05 +01:00
Richard van der Hoff
ca736cfce8 fix test description
logs in, not registers
2017-06-15 14:54:32 +01:00
Richard van der Hoff
98e694646c Add a test for the login flow when there is a teamserver
- just to check it keeps working.
2017-06-15 02:17:24 +01:00
Richard van der Hoff
4ca009b9f7 Remove onload simulator from loading test
This used to exist to reproduce the functionality in the window.onload handler
in vector/index.js -- which got removed in 31915db. Having it here is confusing
at best.
2017-06-14 18:01:44 +01:00
Richard van der Hoff
5ff59b0c23 Tests: delete indexeddbs after running 2017-06-14 17:08:49 +01:00
Richard van der Hoff
59da904353 Check that we don't register a guest account on /#/login (#4306)
If you go straight to a /#/login link, we shoudn't go registering guest
accounts or reanimating the saved creds.
2017-06-14 16:59:00 +01:00
Richard van der Hoff
aa07266f12 Test that we handle stored mx_last_room_id correctly
* Do we show the last room correctly on resume?
 * Do we show the home page if we have no last room?
 * If we follow a login link, and re-log-in, do we correctly vape the
   mx_last_room_id (#4283)
2017-06-13 12:52:35 +01:00
David Baker
15d0bd9271 Partially revert https://github.com/vector-im/riot-web/pull/4201
The q.delay is needed to make sure (or at least reasonably
sure...) that the login component has appeared by that point. The
done handler needs to be the error callback too otherwise failures
result in timeouts rather than the actual failure.
2017-06-06 15:54:45 +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
Luke Barnard
6cc7fa3a36 Expect a HomePage now instead of a directory, because one is now shown by default 2017-05-30 12:55:50 +01:00
David Baker
e07f9a8bc9 Pass through i18n keys in karma tests 2017-05-26 15:29:58 +01:00
Richard van der Hoff
ea67fa9c16 More riot-web test deflakification
Two changes:

1. wait longer for /sync to arrive in the loading tests, via an
   `expectAndAwaitSync` method.

2. https://github.com/matrix-org/matrix-react-sdk/pull/773 made it possible for
   MatrixChat to not show its syncing spinner despite `loading` being
   false. Update `awaitSyncingSpinner` accordingly, so that it doesn't fail
   when it happens to check MatrixChat at just taht moment.
2017-05-19 13:33:50 +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
David Baker
c4d3d66f31 Support for phone number registration/signin, mk2
Changes from https://github.com/vector-im/riot-web/pull/3381
2017-03-14 14:45:54 +00:00
Richard van der Hoff
e5b3ec83b3 Revert "Support for phone number registration / signin (#3381)"
This reverts commit 271fedd1e9.

This breaks against the current synapse release. We need to think more
carefully about backwards compatibility.
2017-03-09 20:41:11 +00:00
David Baker
271fedd1e9 Support for phone number registration / signin (#3381)
* WIP msisdn signin (css)

* Changed how highlights are done

to support keyboard based navigation

* Support for new InteractiveAuth registration

* CSS for msisdn auth entry component

* CSS tweaks for msisdn login

* Fix tests
2017-03-09 10:58:58 +00:00
Richard van der Hoff
5368c87dc1 Fix tests to run crypto code
Return a device_id from /login requests, so that all the crypto logic works.
2017-02-02 23:41:49 +00:00
Richard van der Hoff
fe64b04339 More test resilience
Give the tests more than one chance for the roomview to load.
2017-01-24 13:35:41 +00:00
Richard van der Hoff
597705716b Hopefully, fix intermittent test failure
This seeks to fix the intermittent failure of the "MatrixClient rehydrated from
stored credentials" tests.

The problem appears to be that the 'load_completed' is sometimes taking a while
to come through from the dispatcher - or rather, it is taking a long time to
get *sent* to the dispatcher: the chain of `q().then().catch().done()` in
componentDidMount can take a while to happen.

As a workaround, give the test a few goes when waiting for us to start
syncing. It's not ideal to be poking into the internal state of MatrixChat like
this, but it'll do for now.
2017-01-24 11:26:09 +00:00