1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-07 23:02:56 +03:00
Commit Graph

1904 Commits

Author SHA1 Message Date
Kegan Dougal
22506513b4 Add more webstore unit tests. 2015-07-01 14:20:14 +01:00
Kegan Dougal
994fcceace Add another storeRoom test. Add stub tests for WebStorage. 2015-07-01 12:03:34 +01:00
Kegan Dougal
a0fddf7ab3 Linting. 2015-06-30 17:58:35 +01:00
Kegan Dougal
c8da373ecc Add first cut webstorage implementation. Add very basic test. 2015-06-30 17:56:58 +01:00
David Baker
9ea080b7bb Fetch the user's push rules before any events arrive, so we can annotate events with push data when they arrive. 2015-06-26 15:11:27 +01:00
Kegan Dougal
20b5553e48 Implement MatrixClient tests without a scheduler/store. 2015-06-26 14:26:57 +01:00
Kegan Dougal
fd0eb0c674 Finish timline integration tests. 2015-06-26 13:53:01 +01:00
Kegan Dougal
3c4bda8580 Add MatrixScheduler.removeEventFromQueue/getQueueForEvent and QUEUED state.
This is to allow the UI to show "queued" on events as well as allow the
removal of events in the queue.
2015-06-26 09:52:52 +01:00
Kegan Dougal
041f96ae6d Add remaining stub tests 2015-06-25 17:56:18 +01:00
Kegan Dougal
f240563fb5 Add room state/syncing stub tests 2015-06-25 17:49:46 +01:00
Kegan Dougal
e8d17a5ab3 Add missing pagination test 2015-06-25 17:36:21 +01:00
Kegan Dougal
f49234a772 Add pagination tests 2015-06-25 17:29:25 +01:00
Kegan Dougal
46d5c2bd61 Add pagination test; fix null token bug. 2015-06-25 16:33:22 +01:00
Kegan Dougal
325c00c660 Set Room.oldState.paginationToken to null at the start of the timeline. Fix linting errors. 2015-06-25 15:28:25 +01:00
Kegan Dougal
c4c68a0287 Add local echo tests. 2015-06-25 15:24:56 +01:00
Kegan Dougal
21df000604 Add Room.addEvents UT 2015-06-25 14:00:52 +01:00
Kegan Dougal
0be3c6837d Add utils UTs. Remove unused functions. 2015-06-24 17:42:02 +01:00
Kegan Dougal
74fcbdee3f Add retryFn -1 test. 2015-06-24 17:14:11 +01:00
Kegan Dougal
332bdcd101 Add Scheduler UTs. 2015-06-24 17:05:06 +01:00
Kegan Dougal
913178b284 Linting 2015-06-24 15:38:18 +01:00
Kegan Dougal
2a83248168 Add User UTs 2015-06-24 15:37:55 +01:00
Kegan Dougal
8f16948430 Appease linters 2015-06-24 14:57:48 +01:00
Kegan Dougal
1b665c176a Add RoomState UTs 2015-06-24 14:57:04 +01:00
Kegan Dougal
0bc9951f13 Add RoomState UT stubs. 2015-06-24 13:52:17 +01:00
Kegan Dougal
d3377e3dea Add RoomMember UTs. Fix disambiguation bug. Add CHANGELOG. 2015-06-24 13:35:19 +01:00
Kegan Dougal
b3efafebbe Restructure test layout. 2015-06-24 12:53:15 +01:00
Kegan Dougal
a12133ec9f Appease linters 2015-06-24 11:44:00 +01:00
Kegan Dougal
f763eb3f37 Convert all helper functions which make events to use kwargs 2015-06-24 11:43:16 +01:00
Kegan Dougal
26a23b19b3 Use an opts for helper mk functions; poor man's keyword args. 2015-06-24 11:14:54 +01:00
Kegan Dougal
9d967fb232 Add some UTs to Room methods 2015-06-24 11:05:18 +01:00
Kegan Dougal
c6b11fc382 Make Room.calculateRoomName private to avoid confusion with Room.name. 2015-06-15 09:31:46 +01:00
Kegan Dougal
7a02c5d167 Add concept of 'sentinel' RoomMembers which watch state at a particular point in time.
New sentinels are only created when the RoomMember state changes, so we don't
needlessly deep copy RoomMembers f.e. MatrixEvent. Sentinels co-exist with
RoomState.members which are single instances to which listeners can be attached.
This gets the best of both worlds (don't have to keep re-attaching listeners on
member changes, don't have needless memory consumption).
2015-06-12 15:38:02 +01:00
Kegan Dougal
61f107f6f9 Hide the data store from the end-user. Proxy calls to getRoom. 2015-06-11 16:36:30 +01:00
Kegan Dougal
19a5b99dea Add RoomMember and RoomState event emissions with UTs. Hook everything up.
Distinguish between inserts and updates to the members dictionary to allow
listeners to add more hooks to the member before it has been given state.
2015-06-11 14:29:32 +01:00
Kegan Dougal
911ca1d5c5 Implement Room event emissions with UTs.
Shuffle test groupings into EventEmitter and startClient. Add more jsdoc.
2015-06-11 13:22:21 +01:00
Kegan Dougal
4c3e56ad4c Add test for event emitting. Fix reEmit function. 2015-06-11 11:58:31 +01:00
Kegan Dougal
fc2c6f403d Re-add power-level/typing UTs as RoomMember tests. 2015-06-10 17:19:56 +01:00
Kegan Dougal
5cf29ae1b1 Make RoomMember set its own properties, not RoomState.
Also make it clear which methods may fire events off using @fires. This
shifts a lot of RoomState logic to RoomMember.
2015-06-10 17:06:28 +01:00
Kegan Dougal
b2620507fa Remove startClient(callback); Emit 'syncError' and 'event'.
'syncError' event is intended to be used to update the UI to say "connection
lost". Add UTs for 'event' emissions.
2015-06-10 16:19:38 +01:00
Kegan Dougal
f9f8816b7d Return '?' instead of 'Unknown' for rooms which names cannot be calculated.
This makes it easier to localise in the future (if name == '?'), whilst
still indicating an unknown name. Ideally we would be returning null, but
this would require null checks every time the room name was accessed, which
isn't ideal. This also makes the UT for this less brittle (rather than
comparing literal english strings which are prone to breakage when we
inevitably change 'Unknown' to 'unknown' or something else.
2015-06-10 09:44:53 +01:00
Kegan Dougal
44e3b55975 Appease linters. 2015-06-09 17:06:40 +01:00
Kegan Dougal
4ff6ecd58c Add room name UTs and add self-chat room name. 2015-06-09 17:05:56 +01:00
Kegan Dougal
fd2bd4784d Fix linters 2015-06-09 16:08:14 +01:00
Kegan Dougal
13462ad1aa Add more Room and RoomState unit tests. 2015-06-09 16:07:44 +01:00
Kegan Dougal
a0bd25a6d2 Handle power levels and update RoomMember properties.
Add unit tests for RoomState.
2015-06-09 15:23:04 +01:00
Kegan Dougal
2fb68cfed2 Handle m.typing events. 2015-06-09 10:27:37 +01:00
Kegan Dougal
8d2f058d3d Appease linters 2015-06-08 17:31:53 +01:00
Kegan Dougal
a43447b00e Add tests to exercise room name / timeline logic; fix some bugs as a result. 2015-06-08 17:27:10 +01:00
Kegan Dougal
8d8efd037b Appease linters. 2015-06-08 10:32:20 +01:00
Kegan Dougal
c4aeac31c1 Fix tests; add logs and use promises when flushing. 2015-06-08 10:17:24 +01:00