Commit Graph

216 Commits (8b41167490aa047bf296832bfa0db541f792fd5c)

Author SHA1 Message Date
Kerry 889b0cebb2
Fix 'my threads' filtering to include participated threads (#7882)
* move js utils into directory

Signed-off-by: Kerry Archibald <kerrya@element.io>

* typescripterize js test-utils

Signed-off-by: Kerry Archibald <kerrya@element.io>

* move test utils to directory

Signed-off-by: Kerry Archibald <kerrya@element.io>

* move remaining mock functions to directory

Signed-off-by: Kerry Archibald <kerrya@element.io>

* update imports

Signed-off-by: Kerry Archibald <kerrya@element.io>

* missed copyright

Signed-off-by: Kerry Archibald <kerrya@element.io>

* threads test helpers

Signed-off-by: Kerry Archibald <kerrya@element.io>

* forgotten copyright

Signed-off-by: Kerry Archibald <kerrya@element.io>

* comments

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix threads helper unsigned

Signed-off-by: Kerry Archibald <kerrya@element.io>

* test filter creation when thread capabilities enabled

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-02-24 09:44:34 +01:00
Kerry 5e76d988ca
convert test-utils to typescript (#7877)
* move js utils into directory

Signed-off-by: Kerry Archibald <kerrya@element.io>

* typescripterize js test-utils

Signed-off-by: Kerry Archibald <kerrya@element.io>

* move test utils to directory

Signed-off-by: Kerry Archibald <kerrya@element.io>

* move remaining mock functions to directory

Signed-off-by: Kerry Archibald <kerrya@element.io>

* update imports

Signed-off-by: Kerry Archibald <kerrya@element.io>

* missed copyright

Signed-off-by: Kerry Archibald <kerrya@element.io>

* type wait for update

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-02-23 11:21:11 +00:00
Kerry 8b9263c808
Clean up some unit test logs (#7857)
* kill some unit test logs in arrays-test

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove mock logs that are asserted against anyway

* remove more logs

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix safeCOunterpartTranslate warnings in tests

Signed-off-by: Kerry Archibald <kerrya@element.io>

* more safeCounterpartTranslate warnings

Signed-off-by: Kerry Archibald <kerrya@element.io>

* lint

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove more logs

Signed-off-by: Kerry Archibald <kerrya@element.io>

* add helper

Signed-off-by: Kerry Archibald <kerrya@element.io>

* naming

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-02-21 16:57:44 +00:00
J. Ryan Stinnett a939184e10
Tear down AppTile using lifecycle tracking (#7833) 2022-02-17 16:30:36 +00:00
J. Ryan Stinnett 0dc1355441
Fix right panel data flow (#7811) 2022-02-16 11:19:28 +00:00
Michael Telatynski 714136d4f7
Consolidate RedactionGrouper and HiddenEventGrouper into MELS (#7739) 2022-02-09 10:51:12 +00:00
Germain 544957bdad
Use typographical quotes in no threads UI (#7713) 2022-02-07 15:13:34 +00:00
Kerry cb1c94dd2b
Fix leaks in Login unit tests (#7704)
* make Login-test tsx, fix leaks

Signed-off-by: Kerry Archibald <kerrya@element.io>

* missed lint

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-02-02 11:18:55 +00:00
Michael Telatynski f2249b3e37
Fix CallEventGrouper map building to not occur during a Render phase (#7638) 2022-01-27 11:08:28 +00:00
Michael Telatynski 3c1ce77d48
Properly maintain aspect ratio of inline images (#7503) 2022-01-10 15:32:06 +00:00
Eric Eastwood 9289c0c90f
Refactor `ContextMenu` to use `RovingTabIndex` (more consistent keyboard navigation accessibility) (#7353)
Split off from https://github.com/matrix-org/matrix-react-sdk/pull/7339
2021-12-17 11:08:56 -06:00
Aaron Raimist 2e8a93834b Auto fix
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-12-09 09:10:23 +00:00
Aaron Raimist 7b94e13a84 Merge branch 'develop' into sort-imports
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-12-09 08:34:20 +00:00
Kerry 697b5d28b3
fix leaking registration test (#7304)
Signed-off-by: Kerry Archibald <kerrya@element.io>
2021-12-08 10:34:24 +01:00
Michael Telatynski fe24c8ad2a
Improve ThreadPanel ctx menu accessibility (#7217) 2021-11-29 17:42:53 +00:00
Germain 38750202ee
Design thread list tiles according to mockups (#7078) 2021-11-03 18:05:01 +00:00
Aaron Raimist bdc56be863
Auto fix
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-10-22 17:23:37 -05:00
Dariusz Niemczyk c31bd8c647
Remove unnecessary adapter in ThreadPanel-test.tsx (#6946) 2021-10-14 15:42:54 +01:00
Dariusz Niemczyk 562a880c7d
Create room threads list view (#6904)
Implement https://github.com/vector-im/element-web/issues/18957 following requirements:
* Create a new right panel view to list all the threads in a given room.
* Change ThreadView previous phase to be ThreadPanel rather than RoomSummary
* Implement local filters for My and All threads

In addition: 
* Create a new TileShape for proper rendering requirements (hiding typing indicator)
* Create new timelineRenderingType for proper rendering requirements
2021-10-14 15:27:35 +02:00
Dariusz Niemczyk bc336abf47
Fix missing snapshot serializer&enzyme init (#6932) 2021-10-13 11:09:43 +01:00
Michael Telatynski f5630acea7 Adhere to better eslint rules 2021-07-23 10:35:10 +01:00
Šimon Brandner b014763cd2
Merge remote-tracking branch 'upstream/develop' into feature/call-event-tile
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-07-02 13:14:14 +02:00
David Baker 08176beb58 Kill mock-clock
We already import sinon's one in UserActivitytest, so use that here too.
2021-07-01 21:52:15 +01:00
David Baker 543fe6382d Fix linting in tests
Or in the case of one test, disbale just the one rule it breaks
2021-07-01 20:54:04 +01:00
David Baker ee9be5438e eslint --fix 2021-07-01 20:43:05 +01:00
J. Ryan Stinnett ae0a8b8da4 Auto-fix lint errors 2021-06-29 13:11:58 +01:00
Michael Telatynski 8a3dc1bbdf fix tests 2021-06-18 17:56:18 +01:00
Šimon Brandner 949532c297
Merge remote-tracking branch 'upstream/develop' into feature/call-event-tile 2021-06-17 15:53:25 +02:00
Šimon Brandner fdda534053
Merge branch 'develop' into feature/call-event-tile
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-09 19:23:14 +02:00
Germain Souquet 6e0a908c59 Merge branch 'develop' into gsouquet/react-17 2021-06-09 12:01:35 +01:00
Germain Souquet d492ee4d8a Update Enzyme adapter name 2021-06-09 11:57:29 +01:00
Robin Townsend 0f64f4d692 Fix MessagePanel tests
Signed-off-by: Robin Townsend <robin@robin.town>
2021-06-05 10:49:44 -04:00
Šimon Brandner 6eb33ac730
Merge remote-tracking branch 'upstream/develop' into feature/call-event-tile
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-04 07:49:05 +02:00
Germain 7f83590846
Merge pull request #6079 from matrix-org/gsouquet/switch-rooms 2021-06-03 08:44:01 +01:00
Šimon Brandner 1c92e31683
Add missing license header
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-02 19:27:57 +02:00
Šimon Brandner e0572acb14
Write tests for CallEventGrouper
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-02 19:22:22 +02:00
Michael Telatynski f11a7083ae Switch to stable endpoint/fields for MSC2858 2021-06-01 11:01:09 +01:00
Germain Souquet c428736191 Update MessagePanel test to account for new DOM structure 2021-05-21 14:59:26 +01:00
Travis Ralston 379d19e2e0
Lint 2021-05-10 19:56:30 -06:00
Ayush PS 2ad0032f72 Added regression tests for Natural headers 2021-05-09 01:10:54 +05:30
Ayush PS d1f23fb994 Partially added the tests [WIP] 2021-05-07 11:45:52 +05:30
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 533c9fed64 Appease the linter 2021-03-10 12:32:18 -07:00
Travis Ralston 0dd4d45c49 Disable velocity mock option
This appears to have been removed in the beta
2021-02-26 22:36:42 -07:00
Michael Telatynski 2142a65a9b delint 2020-12-16 10:46:39 +00:00
Michael Telatynski 4c2b6f410b fix tests 2020-12-16 10:41:56 +00:00
Michael Telatynski 1b1c482f9c Iterate tests 2020-11-25 10:22:16 +00:00
Michael Telatynski 4997676f5d fix last remaining broken test 2020-11-05 16:57:51 +00:00
Michael Telatynski ae2d9941ff fix more tests 2020-11-05 16:54:25 +00:00
Michael Telatynski 54e41b5f32 fix tests 2020-11-05 16:27:41 +00:00
Michael Telatynski 72498df28f Remove create-react-class 2020-08-29 12:14:16 +01:00
J. Ryan Stinnett 86f39ee0ee Fix read marker visibility for grouped events
The recent "groupers" which extracted out timeline grouping logic forgot to
pass through the last event state for read marker computation. This causes the
read marker to become visible when e.g. returning to room if it was last placed
inside a grouped set of events (currently room creation and membership events).

Regressed by https://github.com/matrix-org/matrix-react-sdk/pull/4059
Related to https://github.com/vector-im/riot-web/issues/12338
2020-04-03 01:14:31 +01:00
Hubert Chathi 908ca6b6ef add test for grouping room creation events 2020-02-13 17:25:54 -05:00
Travis Ralston 1e70af00a3 Fix GroupView test
It was counting the wrong number of updates for reasons I don't understand.
2020-01-13 20:15:58 -07:00
Travis Ralston a8c8406ac4 Merge remote-tracking branch 'origin/t3chguy/jest' into travis/sourcemaps 2020-01-09 16:06:46 -07:00
Travis Ralston fde32f13a5 [CONFLICT CHUNKS] Merge branch 'develop' into travis/sourcemaps-develop 2020-01-09 14:15:09 -07:00
Travis Ralston 042bd35d79 Fix MatrixClientPeg imports 2019-12-22 21:15:54 -07:00
Michael Telatynski 937b32663c Migrate away from Legacy React Contexts 2019-12-17 17:26:12 +00:00
Michael Telatynski 409a111b02 wait additional tick 2019-12-17 12:42:47 +00:00
Michael Telatynski ab3fb6581b Down to 7 test failures 2019-12-17 11:24:37 +00:00
Michael Telatynski 0041dae664 26 test failures to go :D 2019-12-16 11:55:01 +00:00
Michael Telatynski 6ad31fe023 30 test failures to go :D 2019-12-16 11:12:48 +00:00
Michael Telatynski ffa2ac172c delint 2019-12-15 14:09:41 +00:00
Michael Telatynski 18f81d80db Initial jest stuff. Blocked on Babel 7 2019-12-13 13:43:48 +00:00
David Baker a2e3f64963 Change read markers to use CSS transitions
Removes one of the two places we use Velocity, so we're one step
closer to getting rid of it for good.

Should therefore fix the fact that Velocity is leaking data entries
and therefore <hr> elements.

Hopefully also makes the logic in getEventTiles incrementally simpler,
if still somwewhat byzantine.
2019-11-26 19:06:02 +00:00
Michael Telatynski d5c96b86d4 fix test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-19 10:31:34 +01:00
Michael Telatynski 02dfdffc4f Fix failing test due to newly added assumption
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-18 14:35:13 +01:00
Michael Telatynski bf30cfe699 Fix other test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-11 17:44:04 +01:00
Michael Telatynski 1c7d67e8b3 fix test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-11 17:44:04 +01:00
Michael Telatynski 70ff2bc9cd Switch to createReactClass: views/rooms and test/components. React 16 :D
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-06 15:04:46 +01: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
David Baker a87fb7eaa2 also remove from comment 2019-08-16 15:36:41 +01:00
David Baker 3c4c595f79 remove old serverCaps 2019-08-16 15:27:11 +01:00
David Baker 19c7a4627d fix test 2019-08-16 12:24:52 +01:00
Michael Telatynski 201d7fb448 Merge branches 'develop' and 't3chguy/prop-types' of github.com:matrix-org/matrix-react-sdk into t3chguy/prop-types
# Conflicts:
#	test/components/structures/MessagePanel-test.js
2019-07-31 12:21:00 +01:00
Michael Telatynski 1087e04bb5 Replace React.PropTypes with usage of the `prop-types` package
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-07-31 12:19:29 +01:00
J. Ryan Stinnett c338f8bf1f Add `room` context to test 2019-07-31 11:17:28 +01:00
Travis Ralston 90212c76a5 Use r0 media endpoints for group tests 2019-07-10 13:24:47 -06:00
David Baker 7602d76723 fix test 2019-06-11 13:16:49 +01:00
Travis Ralston ae63df95ea Fix tests to use new serverConfig prop 2019-05-03 11:34:30 -06:00
Bruno Windels 30dc6a9150 remove tests relying on scrollpanel behaviour
as BACAT scrolling relies on CSS from riot, which is not
included in the karma tests, we're removing these
tests in favor of later adding them to the e2e tests.
2019-03-28 17:57:08 +01:00
Bruno Windels 494779393f Merge branch 'develop' into bwindels/bacat-scrolling 2019-03-21 13:50:32 +01:00
J. Ryan Stinnett 99369a54fe
Typo
Co-Authored-By: dbkr <dbkr@users.noreply.github.com>
2019-03-20 18:11:42 +00:00
David Baker 58b2068fbf Set velocity's mock option in the unit test 2019-03-20 17:43:19 +00:00
Bruno Windels 95e61a57bc fix some tests 2019-03-15 10:16:21 +01:00
Bruno Windels 65807c7a66 Revert "remove test for #528 as we removed that fix"
This reverts commit 42030796c7.
2019-03-01 16:08:58 +01:00
Bruno Windels 42030796c7 remove test for #528 as we removed that fix 2019-02-26 10:49:03 +01:00
J. Ryan Stinnett 71c30b5641 Add some basic login tests 2019-02-05 16:33:12 +00:00
J. Ryan Stinnett 71d1a24fcb Add some basic registration tests 2019-02-05 09:26:45 +00:00
Bruno Windels 42161f3a23 fix tests 2019-01-30 18:43:16 +01:00
J. Ryan Stinnett 20b7debcaf Remove support for team servers 2019-01-25 16:13:30 -06:00
J. Ryan Stinnett 9470424bcb Enable linting for all auth related files 2019-01-23 18:32:36 -06:00
J. Ryan Stinnett 29be3ee4b5 Rename login directory to auth 2019-01-21 17:45:55 -06:00
Travis Ralston 8017f0a4a1 Merge remote-tracking branch 'origin/experimental' into travis/develop-for-real 2019-01-03 16:00:23 -07:00
David Baker f928be6f59 Revert "Merge pull request #2395 from matrix-org/dbkr/merge_develop_experimental"
This reverts commit ad47144355.
2019-01-03 15:37:03 -07:00
David Baker 7d161de35b Partial merge of develop to experimental
Does not include #2336 as the file has been moved out from underneath it:
will do this separately
2019-01-03 15:02:58 +00:00
Stephen Solka 0bb35944f9 replace expect.createSpy() with jest.fn()
Signed-off-by: Stephen Solka <stephen0q@gmail.com>
2019-01-02 16:59:48 -06:00
Stephen Solka c3185a4cdb breaking changes from expect upgrade
Signed-off-by: Stephen Solka <stephen0q@gmail.com>
2019-01-02 16:59:48 -06:00
J. Ryan Stinnett 5fc25fd6ba Only mark group as failed to load for summary
Currently, any error in the `GroupStore`s several requests can cause the whole
`GroupView` component to hide and be mark the group as failed to load.

Since it is known that group members may fail to load in some cases, let's only
show failed to load for the whole group when the summary fails.

This also strengthens the `GroupView` test by ensuring we wait for multiple
updates for checking results.

Signed-off-by: J. Ryan Stinnett <jryans@gmail.com>
2018-12-04 18:32:16 -06:00
Bruno Windels 734a7ef6c8 fix tests 2018-11-13 09:34:54 +01:00