12 Commits

Author SHA1 Message Date
David Robertson
e68ec09628
Fix test to provide m.room.create state after join 2023-08-18 13:29:53 +01:00
David Robertson
29f6cd0a1c
Test debug 2023-08-18 13:29:53 +01:00
David Robertson
af893f526b
update tests 2023-04-04 22:25:39 +01:00
Kegan Dougal
ca6ceb28da BREAKING: Change the API to refer to lists by keys not index positions
This provides more flexibility to refer to lists as well as delete them.
2022-12-20 13:32:39 +00:00
Kegan Dougal
aa28df161c Rename package -> github.com/matrix-org/sliding-sync 2022-12-15 11:08:50 +00:00
Kegan Dougal
dcad80f51f bugfix: send correct deltas for deletions at the front of windows
Previously we wouldn't send deletions for this, even though they shift
all elements to the left. Add a battery of unit tests for the list delta
algorithm, and standardise on the practice of issuing a DELETE prior to
an INSERT for newly inserted rooms, regardless of where in the window
they appear. Previously, we may skip the DELETE at the end of the list,
which was just inconsistent of us.
2022-08-31 17:54:07 +01:00
Kegan Dougal
edf581f0e7 bugfix: resort lists when room tags are updated
Previously we didn't, which would cause problems when
tag changes caused rooms to appear/disappear from lists.
2022-08-23 09:49:26 +01:00
Kegan Dougal
c071cee921 Add support for not_tags 2022-08-22 18:31:44 +01:00
Kegan Dougal
b5b13b75a6 Add support for room tag filters
This includes favourites and low priority rooms. With integration
tests.
2022-08-22 18:02:48 +01:00
Kegan Dougal
c44f4b2c04 feature: add support for room_types and not_room_types filters
With integration tests.
2022-07-27 14:37:36 +01:00
Kegan Dougal
5b0e8568ea tests: move Match* functions to testutils/m
In preparation for migrating end-to-end style integration tests
to be actual end-to-end tests. The intended split is:
 - Does the test exclusively use the public sliding sync API for test assertions?
 - Does the test exclusively use the public sync v2 API for configuring the test?
If the answer to both questions is YES, then they should be end-to-end tests.
Some examples of this include testing core functionality of the API like
room subscriptions, multiple lists, filters, extensions, etc.

Some examples of tests which are NOT end-to-end tests include:
 - Testing connection handling (e.g sending multiple duplicate requests)
 - Ensuring outstanding requests get cancelled.
 - Testing restarts of the proxy.
 - Testing out-of-order responses.
 - Benchmarks.

These all involve configuring the test / asserting different things, which would
be extremely difficult to reliably engineer using a real homeserver.
2022-07-26 10:11:06 +01:00
Kegan Dougal
75c3579f9e refactor: move integration tests to tests-integration directory
Add tests-e2ee directory for end-to-end tests which require a synapse
server.
2022-07-25 15:06:13 +01:00