Germain Souquet
5a7c0d87b6
Rename ReplyThread to ReplyChain to avoid confusion with m.thread
2021-10-15 17:42:44 +01:00
Eric Eastwood
9c3439a1aa
Show updated relation reply from edited message - v2 ( #6817 )
...
Part of https://github.com/vector-im/element-web/issues/10391
When `m.relates_to` -> `m.in_reply_to` is provided in `m.new_content`
for an edited message, use the updated reply.
ex.
```json
{
"type": "m.room.message",
"content": {
"body": " * foo bar",
"msgtype": "m.text",
"m.new_content": {
"body": "foo bar",
"msgtype": "m.text",
"m.relates_to": {
"m.in_reply_to": {
"event_id": "$qkjmFBTEc0VvfVyzq1CJuh1QZi_xDIgNEFjZ4Pq34og"
}
}
},
"m.relates_to": {
"rel_type": "m.replace",
"event_id": "$lX9MRe9ZTFOOvnU8PRVbvr1wqGtYvNQ1rSot-iUTN5k"
}
}
}
```
2021-09-17 15:18:52 -05:00
David Baker
28f5dc483b
Update eslint plugin & fix silly indenting
...
As per https://github.com/matrix-org/eslint-plugin-matrix-org/pull/15
this caused a bunch of silly indenting to creep in, so this fixes it
back to the previous style.
2021-08-03 17:07:37 +01:00
J. Ryan Stinnett
ae0a8b8da4
Auto-fix lint errors
2021-06-29 13:11:58 +01:00
Šimon Brandner
232b87a3b4
Improve formatting
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-29 19:57:02 +02:00
Šimon Brandner
46bfbbadf9
Enable indent rule and fix indent
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-27 17:23:27 +02:00
Travis Ralston
6ab235f10c
Fix tests for new call path
...
We have to mock `fetch` for the caching of the download icon, and then mock out all the function calls used by components to feed a Media object.
2021-03-11 09:42:55 -07:00
Travis Ralston
a8c8406ac4
Merge remote-tracking branch 'origin/t3chguy/jest' into travis/sourcemaps
2020-01-09 16:06:46 -07:00
Michael Telatynski
513ec30ef1
Fix tests v2
2019-12-17 18:02:45 +00:00
Michael Telatynski
f3ca4c0b7c
fix tests
2019-12-17 17:54:19 +00:00
Michael Telatynski
c3415d2121
delint
2019-12-17 12:09:01 +00:00
Michael Telatynski
e6d8487302
Fix more tests
2019-12-17 11:47:01 +00:00
Michael Telatynski
ab3fb6581b
Down to 7 test failures
2019-12-17 11:24:37 +00:00
Michael Telatynski
6ad31fe023
30 test failures to go :D
2019-12-16 11:12:48 +00:00
Michael Telatynski
18f81d80db
Initial jest stuff. Blocked on Babel 7
2019-12-13 13:43:48 +00:00
Michael Telatynski
d4d51dc61f
Rip out the remainder of Bluebird
2019-11-18 10:03:05 +00:00
Michael Telatynski
168b1b68bb
Revert "s/.done(/.then(/ since modern es6 track unhandled promise exceptions"
...
This reverts commit 09a8fec2
2019-11-12 11:56:21 +00:00
Michael Telatynski
09a8fec261
s/.done(/.then(/ since modern es6 track unhandled promise exceptions
2019-11-12 11:51:23 +00:00
Michael Telatynski
aae5bb9f39
Use new React Shallow renderer with hooks support
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 13:08:16 +02:00
Michael Telatynski
5c960dccb7
delint
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 12:51:08 +02:00
Michael Telatynski
efeb6e87c4
Use new React Shallow renderer with hooks support
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 12:51:08 +02:00
Michael Telatynski
34530843f4
Factor out generic EventListSummary from MELS
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 12:50:03 +02:00
Travis Ralston
99b8193ce7
Use the new ShallowRenderer over ReactTestUtils
...
Mostly because the ReactTestUtils renderer doesn't exist anymore.
2019-09-17 14:33:32 -06:00
Michael Telatynski
accb0abe2d
Switch from react-addons-test-utils to react-dom/test-utils. React 16 :D
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-08-24 11:47:07 +01:00
Michael Telatynski
959f8fd844
Fix tests
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-07-10 21:58:08 +01:00
Luke Barnard
cf4ae681f4
Offline mode ( #1723 )
...
* Allow the client to run without connection to HS (i.e. using indexeddb)
Allows running without having pushRules (it's safe not to have these
when running from indexeddb sync.)
This means rooms will be displayed with "unknown" notifcation state.
This assumes anything that uses the push rules will get pushRule state
again when the client starts syncing again.
For recovering from being disconnected,
* If an avatar has fallen back, try again on reconnection
* If a thumbnail image failed to load, retry on reconnect
* Load joined groups when reconnecting
Update tests to give MELS a context.matrixClient
2018-02-06 17:50:53 +00:00
Luke Barnard
8a64123ab8
Add sensible missing entry generator for MELS tests
...
Fixes vector-im/riot-web#5426 (because we don't test plurals anywhere else)
2017-10-27 16:55:13 +01:00
Luke Barnard
d3f9a3aeb5
Run eslint --fix
...
Fixing 1000s of lint issues. Some rules cannot be `--fix`ed but this goes some way to linting the entire codebase.
2017-10-11 17:56:17 +01:00
David Baker
0de0b8954d
Trailing whitespace
2017-05-26 12:03:36 +01:00
David Baker
e44f3cc709
Fix tests
...
* Serve translation files from the karma server
* Port UserSettingsStore to ES6 exports because the test runner
gets confused by ES6 importing a commonjs module
* Remove extra spaces in translations strings for MELS
* Fix 'his/her' back to be 'their'
* Change test to expect singular 'invitation' for a single person
(there may be multiple invitations, but IMO this should be
'rejected n invitations' and we can play with the wording later,
I don't think the singular is any worse than the plural).
* set language in the MELS tests (and wait for it to complete)
* Don't bother setting lang in other tests for now
2017-05-26 11:58:45 +01:00
Luke Barnard
24e94787dd
A lot of linting
2017-01-25 10:52:55 +00:00
Luke Barnard
d5edf26371
Improve comment
2017-01-25 10:39:39 +00:00
Luke Barnard
e9719b1766
Get rid of .only
2017-01-25 09:12:29 +00:00
lukebarnard
41d2697e28
Remove done
, const instead of var for requier
s
2017-01-18 12:03:38 +01:00
lukebarnard
867a532e5e
Remove parentDiv from tests
2017-01-18 11:58:54 +01:00
lukebarnard
78e2c787e0
Refactor and document test helpers.
2017-01-18 11:53:17 +01:00
lukebarnard
5dd1512ff2
Move aggregation code to dedicated function
2017-01-18 10:59:19 +01:00
lukebarnard
3ba9f50873
Move functions around, remove redundancies, add docs
2017-01-17 19:07:45 +01:00
lukebarnard
49f2b9df88
Remove duplicate test
2017-01-17 18:53:38 +01:00
lukebarnard
ade7c65617
Add test for MemberEventListSummary
2017-01-17 12:01:54 +01:00