element-web/test
Andy Balaam 8b7f49e74e
Rewrite doesRoomOrThreadHaveUnreadMessages to use the receipt rewrite from js-sdk (#11903)
* Rewrite doesRoomOrThreadHaveUnreadMessages to use the receipt rewrite from js-sdk

* Remove unit tests that rely on receipt timestamps

Previously, if we found a receipt for an unknown event, we would use the
receipt timestamp and declare all events before that time to be read.
Now, we ignore such "dangling" receipts until we find the event they
refer to.

This new behaviour is more correct, but does lead to more messages being
considered unread.

This commit deletes tests that checked for the old behaviour.

* Check for a missing thread in determineUnreadState

* Fix incorrect way to find room timeline

* More realistic test setup to support new receipt code

* Update snapshot to expect a room to be unread when there are no receipts

* Formatting fixes

* Update snapshot to show menu and notif button

* Disable some flaky tests

* Disable some flaky tests

* Fix test to make a threaded receipt for an event that is actually in the thread

---------

Co-authored-by: Florian Duros <florianduros@element.io>
Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
2023-11-29 13:36:52 +00:00
..
@types
__snapshots__ Allow creating knock rooms (#11182) 2023-07-10 08:01:03 +00:00
accessibility
actions/handlers Move session manager out of beta (#10968) 2023-05-26 01:58:28 +00:00
audio Move `mediaDevices` mock out of `setupManualMocks` (#11413) 2023-08-16 08:29:34 +00:00
autocomplete Add MatrixClientPeg::safeGet and use it in tests (#10985) 2023-06-05 18:12:23 +01:00
components Rewrite doesRoomOrThreadHaveUnreadMessages to use the receipt rewrite from js-sdk (#11903) 2023-11-29 13:36:52 +00:00
contexts OIDC: Persist details in session storage, create store (#11302) 2023-07-20 21:30:19 +00:00
dispatcher
editor Deserialise spoilers back into slash command form (#11805) 2023-10-26 13:35:02 +00:00
events
hooks Fix useRoomMembers missing updates causing incorrect membership counts (#11392) 2023-08-09 12:27:37 +00:00
i18n Use Intl for names of languages (#11427) 2023-08-22 14:07:16 +00:00
images
img
models Fix misunderstanding of functional members (#11918) 2023-11-22 12:08:16 +00:00
modules Implement updated open dialog method of the Module API (#11395) 2023-08-21 12:09:17 +00:00
notifications
settings Default bundled emoji font to on (#11935) 2023-11-27 09:59:09 +00:00
setup Locallazy: Convert even more strings (#11679) 2023-10-02 11:43:00 +01:00
stores Right panel: view third party invite info without clearing history (#11934) 2023-11-27 22:30:57 +00:00
test-utils Rewrite doesRoomOrThreadHaveUnreadMessages to use the receipt rewrite from js-sdk (#11903) 2023-11-29 13:36:52 +00:00
toasts Add ringing for matrixRTC (#11870) 2023-11-21 17:12:08 +00:00
utils Update RoomSummaryCard navigation links (#11812) 2023-11-16 03:25:34 +00:00
voice-broadcast Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
widgets Add config to skip widget_build_url for DM rooms (#11044) 2023-06-06 14:07:51 +00:00
Avatar-test.ts
ContentMessages-test.ts Default intentional mentions (#11602) 2023-09-14 11:36:15 +00:00
DecryptionFailureTracker-test.js
DeviceListener-test.ts DeviceListener: Remove usage of deprecated keybackup API (#11614) 2023-09-20 11:34:18 +00:00
HtmlUtils-test.tsx Switch to importing models/event from main js-sdk export (#11363) 2023-08-07 08:24:58 +00:00
Image-test.ts
KeyBindingsManager-test.ts
LegacyCallHandler-test.ts Add MatrixClientPeg::safeGet and use it in tests (#10985) 2023-06-05 18:12:23 +01:00
Lifecycle-test.ts OIDC: revoke tokens on logout (#11718) 2023-10-15 21:35:25 +00:00
Markdown-test.ts
MatrixClientPeg-test.ts Add MatrixClientPeg::safeGet and use it in tests (#10985) 2023-06-05 18:12:23 +01:00
MediaDeviceHandler-test.ts Add MatrixClientPeg::safeGet and use it in tests (#10985) 2023-06-05 18:12:23 +01:00
Notifier-test.ts Add ringing for matrixRTC (#11870) 2023-11-21 17:12:08 +00:00
PosthogAnalytics-test.ts Report crypto sdk in posthog (#11834) 2023-11-13 14:16:12 +00:00
PreferredRoomVersions-test.ts Allow creating knock rooms (#11182) 2023-07-10 08:01:03 +00:00
Reply-test.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
RoomNotifs-test.ts Show knock rooms in the list (#11573) 2023-09-19 11:24:35 +00:00
Rooms-test.ts Pass around MatrixClients instead of using MatrixClientPeg (#10984) 2023-06-01 14:43:24 +01:00
ScalarAuthClient-test.ts
SdkConfig-test.ts
SlashCommands-test.tsx Disable upgraderoom command without developer mode enabled (#11744) 2023-10-13 09:48:32 +00:00
SlidingSyncManager-test.ts
Terms-test.tsx Pass around MatrixClients instead of using MatrixClientPeg (#10984) 2023-06-01 14:43:24 +01:00
TestSdkContext.ts
TextForEvent-test.ts Fix instances of double translation and guard translation calls using typescript (#11443) 2023-08-22 16:32:05 +01:00
Unread-test.ts Rewrite doesRoomOrThreadHaveUnreadMessages to use the receipt rewrite from js-sdk (#11903) 2023-11-29 13:36:52 +00:00
UserActivity-test.ts Replace sinon fake timers with jest timers (#11275) 2023-07-17 12:29:51 +00:00
WorkerManager-test.ts Load web workers in a way that Webpack 5 can bundle them 2023-11-11 16:03:08 +01:00
createRoom-test.ts Always allow call.member events on new rooms (#11948) 2023-11-28 12:13:31 +00:00
email-test.ts
globalSetup.ts Improve randomString mock for better snapshots (#11375) 2023-08-09 09:39:48 +01:00
languageHandler-test.tsx Migrate more strings to translation keys (#11694) 2023-10-03 19:17:26 +01:00
linkify-matrix-test.ts Fix clicking MXID in timeline going to matrix.to (#11263) 2023-07-14 10:55:55 +00:00
predictableRandom.ts GYU: Account Notification Settings (#11008) 2023-06-29 15:46:31 +00:00
setupTests.ts Improve randomString mock for better snapshots (#11375) 2023-08-09 09:39:48 +01:00
slowReporter.js
theme-test.ts Apply `strictNullChecks` to `src/components/views/spaces/*` (#10517) 2023-06-28 15:39:19 +01:00
useTopic-test.tsx Switch to importing models/Room from main js-sdk export (#11361) 2023-08-04 07:36:16 +00:00