Bruno Windels
c9c765b5b8
fix getEventType
2020-02-04 13:12:38 +01:00
Bruno Windels
208c371afb
add failing test for getEventType
2020-02-04 13:10:06 +01:00
Bruno Windels
4945463beb
fix lint
2020-02-03 20:12:21 +01:00
Bruno Windels
5398fac348
add (failing) tests for getEventType and getOtherPartyUserId
2020-02-03 19:16:48 +01:00
Travis Ralston
1b80c83676
Merge branch 'develop' into travis/update-qr-code
2020-01-29 15:11:06 +00:00
Travis Ralston
ec4dc582b6
Remove tests for old QR code stuff
2020-01-29 15:10:35 +00:00
Bruno Windels
470bdf8741
fix tests
2020-01-29 15:19:18 +01:00
Travis Ralston
b8092cd00b
Make the tests pass
2020-01-23 20:41:52 -07:00
Bruno Windels
3faeec4add
fix lint
2020-01-23 15:59:47 +01:00
Bruno Windels
b2afaabb8c
add unit tests for verifying your own device over to_device messages
2020-01-23 15:52:07 +01:00
Bruno Windels
0c52887688
copyright year
...
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com >
2020-01-23 10:51:19 +00:00
Bruno Windels
dc38f78da2
add unit tests for verification request
2020-01-22 17:39:21 +01:00
Bruno Windels
bd9a2c13eb
implement API change in sas test for requestVerificationDM
2020-01-20 17:55:48 +01:00
Bruno Windels
e5c65d53f8
set transaction_id for remote echos in TestClient
...
as InRoomChannel looks at this to decide whether an event is
a remote echo (and to pass it to the verifier or not)
2020-01-20 17:54:26 +01:00
Bruno Windels
c12a3b6610
more fixup: make sure remote echo doesn't arrive earlier for TestClient
2020-01-20 17:35:44 +01:00
Bruno Windels
77d0a76186
fixup: another timeout
2020-01-20 14:52:34 +01:00
Bruno Windels
e89528315d
enable fake timers for consistency
...
although it doesn't make or break the test
2020-01-20 14:04:32 +01:00
Bruno Windels
c34ccc9d53
adjust test: requestVerification returns the request instead of verifier
2020-01-20 14:03:43 +01:00
Bruno Windels
e51ba795f3
to make this work while using fake timers, don't use setTimeout
...
but instead use Promise.resolved() as then always runs in the next tick.
2020-01-20 13:56:39 +01:00
Travis Ralston
034b8db070
Convert tests to ES6
...
The earlier commit, d3ce0cb82f , has most of the juicy details on this. In addition to d3ce's changes, we also:
* Use `TestClient` in many integration tests due to subtle behaviour changes in imports when switching to ES6. Namely the behaviour where setting the request function is less reliable in the way we did it, but `TestClient` is very reliable.
* We now use the Olm loader more often to avoid having to maintain so much duplicate code. This makes the imports slightly easier to read.
2019-12-17 15:16:37 -07:00
Travis Ralston
ca6a52727c
Fix logger imports in tests
2019-12-10 11:39:56 -07:00
Michael Telatynski
70eb8a7300
Merge pull request #1100 from matrix-org/t3chguy/remove_bluebird_13
...
Remove Bluebird: phase 2.5
2019-12-10 16:58:22 +00:00
Bruno Windels
df6ebf83b4
fix tests
2019-12-09 17:45:01 +01:00
Michael Telatynski
c4ae27dae6
Merge branches 'develop' and 't3chguy/remove_bluebird_13' of github.com:matrix-org/matrix-js-sdk into t3chguy/remove_bluebird_13
2019-12-02 22:56:13 +00:00
Michael Telatynski
0170cb066d
add another clean-up to sas.spec.js
2019-12-02 22:34:46 +00:00
Hubert Chathi
59b25d6837
increase timeout on flush to fix failing unit test
...
also remove unused requests
2019-11-28 16:53:21 -05:00
Travis Ralston
7392b4de17
xit instead of comment
2019-11-27 19:23:59 -07:00
Travis Ralston
79b0a5fada
Add issue to comment
2019-11-27 19:21:57 -07:00
Travis Ralston
aee9442e52
Disable broken cross-signing test
...
I don't know why it's broken, but the two errors I can get out of it are "unknown device for verification" and "user_signing key does not match". Someone who knows a bit more about cross-signing will probably need to take a look at this one.
Fixes https://github.com/vector-im/riot-web/issues/11520 (technically)
Opened https://github.com/vector-im/riot-web/issues/11545 to fix this correctly.
2019-11-27 19:20:09 -07:00
Travis Ralston
e0c90ec9e3
Fix test flakes in SAS verification with old MAC
...
This has similar fixes to 7ad5021147
Part of https://github.com/vector-im/riot-web/issues/11520
2019-11-26 23:29:06 -07:00
Travis Ralston
7ad5021147
Fix SAS verification test
...
There's 3 things going on in this commit:
1. `this` is maintained in the tests. Some binds are added instead of the `.call(this, ...)` syntax.
2. We use the right `origSendToDevice`
3. We ensure `downloadKeys` is actually on the client
The combination of these 3 fixes makes the test pass.
Part of https://github.com/vector-im/riot-web/issues/11520
2019-11-26 23:24:37 -07:00
Michael Telatynski
057303d57c
s/beforeEach/beforeAll/ for Olm.init() and cleanup sas.spec.js
2019-11-25 13:26:10 +00:00
Michael Telatynski
fd58957b06
migrate to jest from mocha+expect+istanbul
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
2019-11-20 19:52:50 +00:00
David Baker
d37ed9ff6f
lint
2019-11-15 12:39:14 +00:00
David Baker
e541b96a71
Change check{User|Device}Trust interfaces
...
...to return objects with functions rather than a bitmask
2019-11-15 12:15:13 +00:00
David Baker
a98e6964ef
Missed bits of callback renaming
2019-11-11 16:51:49 +00:00
David Baker
03fe4afe32
lint
2019-11-07 15:20:07 +00:00
David Baker
12627022d1
Convert sas verification test to callbacks
2019-11-07 15:18:16 +00:00
David Baker
49588da73d
Fix more tests
2019-10-29 19:39:31 +00:00
David Baker
3e2d845342
Merge remote-tracking branch 'origin/develop' into dbkr/cross_signing
2019-10-28 16:47:16 +00:00
David Baker
de1b545df1
lint
2019-10-28 15:42:42 +00:00
David Baker
8cad116dd7
Make tests pass
...
* Pass the http backend out of makeTestClients so we can tell it
to expect queries and flush requests out
* Change colons to dots in the key events
2019-10-28 14:56:35 +00:00
Hubert Chathi
d8e8dddd25
initial implementation of verification in DMs
2019-10-08 15:44:51 -04:00
Travis Ralston
f80af68686
End the verification timer when verification is done
...
Fixes https://github.com/matrix-org/matrix-js-sdk/issues/980
This also improves cleanliness in the tests to cancel/terminate timers when needed.
2019-07-10 14:51:12 -06:00
Hubert Chathi
6f6e7ea921
verify cross-signing key with SAS
2019-06-05 15:27:31 -04:00
Hubert Chathi
6a77df7b41
Merge branch 'develop' into dbkr/cross_signing
2019-06-05 12:48:17 -04:00
Hubert Chathi
4a9a1b40e9
initial implementation of secret storage and sharing
2019-06-04 15:04:45 -04:00
Janith Kasun
de8063a43a
Merge branch 'develop' into loglevel-extend
2019-05-19 09:40:38 +05:30
jkasun
a73dabcb67
Console logging to loglevel
2019-05-19 09:29:40 +05:30
J. Ryan Stinnett
761806c678
Add support for class properties
...
This enables compiler and linting features to allow class properties like we do
in the React SDK.
2019-05-13 13:52:37 +01:00