Commit Graph

346 Commits (df7ebb2e7ce5894afd349f3a1f8cf930f80f5f90)

Author SHA1 Message Date
Robin Townsend 35cf0e1c7e Find components by name rather than class in ForwardDialog test
It makes things shorter and more readable!

Signed-off-by: Robin Townsend <robin@robin.town>
2021-05-10 01:10:39 -04:00
Robin Townsend eb07f1fb86 Test that ForwardDialog can render replies
Previously ForwardDialog was not giving its EventTile message preview
the information it needed to render a ReplyThread. This was a bit tricky
to fix since we were pulling a fake event out of thin air, so this
ensures it doesn't regress.

Signed-off-by: Robin Townsend <robin@robin.town>
2021-05-10 00:54:00 -04:00
Robin Townsend 74925b2c6d Test ForwardDialog
Signed-off-by: Robin Townsend <robin@robin.town>
2021-05-08 21:11:06 -04:00
Ayush PS 2ad0032f72 Added regression tests for Natural headers 2021-05-09 01:10:54 +05:30
Ayush PS 32edbc155f Merge remote-tracking branch 'origin/develop' into err 2021-05-07 19:16:00 +05:30
Ayush PS d1f23fb994 Partially added the tests [WIP] 2021-05-07 11:45:52 +05:30
Š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 a53696ff5e Fix tests 2021-04-21 16:53:29 -06:00
Travis Ralston a0049f956d Patch over legacy Groups test 2021-03-31 23:51:17 -06:00
Travis Ralston 5d9b36afc1 Fix tests 2021-03-25 23:47:41 -06: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 533c9fed64 Appease the linter 2021-03-10 12:32:18 -07:00
Travis Ralston 375ffafda6 Fix tests failing to load skin
We should find a better way to do this, but this works well enough.
2021-03-09 10:13:16 -07:00
J. Ryan Stinnett b12cf7912a
Merge pull request #5624 from SimonBrandner/show-room-name
Display room name in pills instead of address
2021-03-08 16:27:43 +00: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 f45510ed25 Fix test assuming too much about the underlying calls 2021-02-19 13:08:30 +00:00
Šimon Brandner a075568e89
Fixed tests
In the previous commits I have removed the native title/tooltip so it needs to be removed from the tests as well

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-02-12 11:34:09 +01:00
J. Ryan Stinnett 474c029db5 Fix permalink via parsing for rooms
This adjusts the app local link parsing path to better handle `via`s in query
params. Previously this path only expected them when an event ID was also
present, but it's also valid to have `via`s without event IDs as well.

Fixes https://github.com/vector-im/element-web/issues/16345
2021-02-03 15:18:19 +00:00
J. Ryan Stinnett 89b835dd20
Merge pull request #5575 from matrix-org/jryans/no-event-pills
Remove pills from event permalinks with text
2021-02-01 10:53:22 +00:00
J. Ryan Stinnett fa3ace8473 Rework message pilling to ignore event permalinks
This removes pills from event permalinks since they hide the text associated
with the link, which can cause nonsensical messages since words have been
removed. In addition, this moves away from fragile regexs to more
straightforward code to parse links and adds a test for this case.

Regressed by https://github.com/matrix-org/matrix-react-sdk/pull/5188
Fixes https://github.com/vector-im/element-web/issues/15159
2021-01-27 11:46:20 +00:00
J. Ryan Stinnett e49a931588
Merge pull request #5533 from aaronraimist/security-key
Change a bunch of strings from Recovery Key/Phrase to Security Key/Phrase
2021-01-21 17:46:02 +00:00
J. Ryan Stinnett 97a551c04a Fix test 2021-01-14 17:39:58 +00:00
David Baker 6371a4abd1 Fix tests
Remove stray file extensions in includes and update shared instance
name.
2021-01-13 16:02:35 +00:00
Aaron Raimist 4f96d5dee5
Change a bunch of strings from Recovery Key/Phrase to Security Key/Phrase
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-01-04 19:17:17 -06: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
macekj 0c85cb587d Merge branch 'develop' into emoji_quick_shortcut 2020-12-04 11:05:50 -05:00
Michael Telatynski eb25c39318 Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/socials
 Conflicts:
	src/i18n/strings/en_EN.json
2020-12-01 16:33:29 +00:00
Michael Telatynski 1b1c482f9c Iterate tests 2020-11-25 10:22:16 +00:00
macekj ba8d02a808 add quick shortcut emoji feature and tests
Signed-off-by: macekj <macekj@umich.edu>
2020-11-17 17:36:58 -05:00
Aleks Kissinger 5f3af7863a Merge branch 'develop' into katex 2020-11-10 18:19:20 +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
Aleks Kissinger 3f9f1d03c8 stubbed isGuest for unit tests 2020-10-29 13:22:09 +00:00
Michael Telatynski b2d04deb83 fix tests for the new sessionStorage key
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-08 10:04:01 +01:00
Michael Telatynski a8d88e01fb Write Enzyme tests for SendMessageComposer state/history persistence behaviour
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-07 00:10:40 +01:00
J. Ryan Stinnett 7bd5e3fa31 Move security-related dialogs to a common directory 2020-09-16 15:03:06 +01:00
Michael Telatynski c120458b81 fix test stub 2020-08-29 13:02:45 +01:00
Michael Telatynski 72498df28f Remove create-react-class 2020-08-29 12:14:16 +01:00
J. Ryan Stinnett ce226ab534 Replace Riot with Element in docs and comments
This only covers the simple cases of references to issues and repos. More
complex areas, such as deployment scripts, will be handled separately.

Part of https://github.com/vector-im/element-web/issues/14864
2020-08-03 18:33:36 +01:00
Michael Telatynski 38e93469d3 Fix broken test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-23 09:01:44 +01:00
Travis Ralston 2dfd636a9e Appease the linter 2020-07-17 16:28:49 -06:00
Travis Ralston c9b0b3b31d RoomSublist2 -> RoomSublist 2020-07-17 15:46:46 -06:00
Travis Ralston 96065ae982 RoomTile2 -> RoomTile 2020-07-17 15:43:29 -06:00
Travis Ralston a7c18bfbfa RoomList2 -> RoomList 2020-07-17 15:27:49 -06:00
Travis Ralston 2b15ba21dd Rename RoomListStore file 2020-07-17 15:11:34 -06:00
Travis Ralston 209a5d2220 Rename RoomListStore2 class name
We use `RoomListStore` as a singleton, and don't want the ugly `2` at the end of the actual store instance, so here we rename it to something half-decent.
2020-07-17 15:10:30 -06:00
Travis Ralston 3826d81358 Enable test mode 2020-07-10 11:05:56 -06:00
Travis Ralston bba8197592 Use the new layout store 2020-07-09 22:40:34 -06:00
Travis Ralston 75dbd5f1d4 Merge branch 'develop' into travis/room-list/enable 2020-07-09 22:28:16 -06:00
Travis Ralston 121e41d20b Remove irrelevant function 2020-07-07 16:20:53 -06:00
Travis Ralston 5ace405062 The linter will never be appeased 2020-07-07 16:01:42 -06:00
Travis Ralston 85af3ebcc0 Lie about DMs in tests 2020-07-07 15:58:15 -06:00
Travis Ralston 044c223899 Remove debug 2020-07-07 15:53:12 -06:00
Travis Ralston 767db73853 Appease the linter 2020-07-07 15:50:04 -06:00
Travis Ralston f89fcd1fe9 Fix tests and add general safety
We don't need the fake clock anymore, but we do have to wait for async actions to complete before moving forward.

This also exposes a number of functions for the store to be puppetted with.
2020-07-07 15:45:59 -06:00
Travis Ralston c774b88bda Initial pass of fixing tests
* Use new components
* Use new tagId prop on sublists
* Define onResize for the room list so it doesn't crash
2020-07-07 15:06:06 -06:00
Jorik Schellekens 99734dcfe8 please work 2020-07-07 17:11:14 +01:00
Jorik Schellekens af2b826136 Please fix test 2020-07-07 16:57:56 +01:00
David Baker 2969820371 LINT 2020-06-26 20:31:22 +01:00
David Baker 0579c9f748 Fix tests 2020-06-26 20:25:38 +01:00
Michael Telatynski 73d966443c fix tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-24 14:25:31 +01:00
Michael Telatynski 880e16aaa2 Merge branches 'develop' and 't3chguy/leaks' of github.com:matrix-org/matrix-react-sdk into t3chguy/leaks
 Conflicts:
	src/components/views/avatars/BaseAvatar.js
	test/components/views/messages/TextualBody-test.js
2020-05-23 11:12:58 +01:00
Travis Ralston 7ff850deea
Merge pull request #4253 from matrix-org/travis/room-list-2
Rewrite the room list store
2020-05-21 13:30:32 -06:00
Jorik Schellekens adec5a4f92 fix test 2020-05-20 15:09:10 +01:00
Michael Telatynski e79959a4ec try fix tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-15 00:31:30 +01:00
Travis Ralston 2b4c19e9ba Merge branch 'travis/dispatcher-types' into travis/room-list-2 2020-05-14 13:40:37 -06:00
Travis Ralston 08419d195e Initial breakout for room list rewrite
This does a number of things (sorry):
* Estimates the type changes needed to the dispatcher (later to be replaced by https://github.com/matrix-org/matrix-react-sdk/pull/4593)
* Sets up the stack for a whole new room list store, and later components for usage.
* Create a proxy class to ensure the app still functions as expected when the various stores are enabled/disabled
* Demonstrates a possible structure for algorithms
2020-05-14 12:44:29 -06:00
Travis Ralston 90a898d03f Move dispatcher into a subdirectory
We're expecting to have a whole bunch of types for the dispatched payloads, so pull the thing into a directory we can throw them in.
2020-05-13 21:07:50 -06:00
Jorik Schellekens fd25170c57 lint test 2020-04-27 11:51:55 +01:00
Jorik Schellekens 18db25f601 Fix test 2020-04-27 11:51:55 +01:00
Michael Telatynski e942a35525 Fixxy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-16 14:09:41 +01:00
Travis Ralston b4b0c4c6df Add comments to highlight where we'll need m.widget support
For https://github.com/vector-im/riot-web/issues/13111
2020-04-09 15:14:07 -06: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
Travis Ralston c86d75693b Fix a number of minor code quality issues
Most of these are complaints from my IDE. Discovered by going through nearly every file looking for React warnings.
2020-03-31 14:05:56 -06:00
Travis Ralston 866ed68615 Ensure DMs tagged outside of account data work in the invite dialog
Fixes https://github.com/vector-im/riot-web/issues/12418

Includes a refactor so we don't need to litter the code with the same magic string for DM tags.
2020-02-24 19:43:49 -07:00
Michael Telatynski d783ce86c8 Use noreferrer in addition to noopener for edge case browsers
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-02-23 22:14:29 +00:00
Hubert Chathi 4a204b715d
Merge pull request #4059 from matrix-org/uhoreg/refactor_event_grouping
refactor event grouping into separate helper classes
2020-02-14 10:35:34 -05:00
Hubert Chathi 908ca6b6ef add test for grouping room creation events 2020-02-13 17:25:54 -05:00
Marco Zehe 8004a35179 Update to use proper quotes and fix code styling. And fix test.
Signed-off-by: Marco Zehe <marcozehe@mailbox.org>
2020-02-12 10:54:08 +01:00
Zoe 9a5663056d lint 2020-02-11 12:06:40 +00:00
Zoe 6b6d612041 Fix error message rendering for key entry
Relates to https://github.com/vector-im/riot-web/issues/12288
2020-02-11 12:02:12 +00:00
Zoe 544479a6ee test code cleaned up slightly 2020-02-04 11:31:16 +00:00
Zoe 150fe7a45a Tests for MKeyVerificationConclusion 2020-02-04 11:25:19 +00:00
J. Ryan Stinnett 5c4b91457e Fix tests 2020-01-30 22:28:56 +00:00
Michael Telatynski e1e53f567f add more tests 2020-01-22 11:56:27 +00:00
Michael Telatynski 9365a9cb30 Remove lolex where its not needed and move to dev-deps. Remove unused optimist
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-18 01:39:14 +00:00
Michael Telatynski 8ba54f5f7d Don't use expect and jest-mock anymore as they're implicit from jest
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-18 01:38:22 +00: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 bf6798e109 Appease the linter 2020-01-13 13:28:33 -07:00
Travis Ralston aa38946166 Actually define some tests in TextualBody's test
Jest really wants you to do things the right way.
2020-01-09 17:24:13 -07:00
Travis Ralston 54f3288dea Fix imports for tests
This doesn't fix the fact that someone called it "peg".
2020-01-09 17:23:27 -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 dc914774fb Delete files that were conflicting in the merge and deleted on develop 2020-01-09 14:19:19 -07:00
Travis Ralston fde32f13a5 [CONFLICT CHUNKS] Merge branch 'develop' into travis/sourcemaps-develop 2020-01-09 14:15:09 -07:00
Travis Ralston 59f608ffd6
Merge pull request #3761 from matrix-org/travis/babel7-wp-es6-export
Convert CommonJS exports to ES6 exports
2020-01-08 09:09:11 -07:00
Michael Telatynski bdef54622b delint and add copyright
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-06 14:52:08 +00:00
Michael Telatynski f1de6d060a Add a regression test for editing events and url previews
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-06 14:38:21 +00:00