Commit Graph

96 Commits (7dc39baaf3f9bb50bb2919172abbae1ade158968)

Author SHA1 Message Date
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
Akihiko Odaki 35ab573bc5 Update sinon to 5.0.7 2018-05-21 18:44:00 +09:00
Luke Barnard c06a04af97 Fix unrelated linting issue 2018-05-03 18:11:32 +01:00
Luke Barnard dc20f32ad7 Move waitForUpdate to test-utils 2018-05-02 11:19:01 +01:00
Luke Barnard 7915d97ed7 Also run other tests 2018-04-27 14:56:48 +01:00
Luke Barnard a1c4424224 Add tests for GroupView 2018-04-27 14:28:24 +01:00
Travis Ralston 10519f9465 Fix the tests
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-05 14:56:41 -07:00
Travis Ralston ae10a11ac4 Convert synced settings to granular settings
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-29 01:43:52 -06:00
Luke Barnard d3f9a3aeb5 Run eslint --fix
Fixing 1000s of lint issues. Some rules cannot be `--fix`ed but this goes some way to linting the entire codebase.
2017-10-11 17:56:17 +01:00
turt2live 0363f73e28 Fix the MessagePanel test
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-09-14 20:57:28 -06:00
David Baker 609d61d53c Revert "Implement sticky date separators" 2017-09-06 17:40:58 +01:00
Luke Barnard 69bce6aee5 Update tests to reflect not supressing first date separator 2017-08-30 17:35:26 +01:00
Michael Telatynski 928294eba3
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/hide-join-part-2 2017-07-21 19:23:42 +01:00
Michael Telatynski f036fd1d0f
first attempt at stubbing tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-21 19:16:30 +01:00
Richard van der Hoff 0d7cc59d99 replace q method calls with bluebird ones
```
find src test -name '*.js' |
    xargs perl -i -pe 's/q\.(all|defer|reject|delay|try|isFulfilled)\(/Promise.$1(/'
```
2017-07-12 18:05:40 +01:00
Richard van der Hoff 0254d2b3a2 q(...) -> Promise.resolve
```
find src test -name '*.js' | xargs perl -i -pe 's/\b[qQ]\(/Promise.resolve(/'
```
2017-07-12 18:05:08 +01:00
Richard van der Hoff a06bd84213 replace imports of `q` with bluebird
update `package.json`

```
find src test -name '*.js' |
   xargs perl -i -pe 'if (/require\(.[qQ].\)/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'

find src test -name '*.js' |
   xargs perl -i -pe 'if (/import [qQ]/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'
```
2017-07-12 18:05:08 +01:00
Richard van der Hoff 1139dd2be5 Fix a flaky test in the timelinepanel code
Sometimes it was possible for there to be a scroll event before the initial
pagination completed, which then upset the rest of the test. Just give it a few
ms to sort itself out instead.
2017-07-11 17:34:46 +01:00
Richard van der Hoff 167ce88a80 Rewrite ScrollPanel test
It turns out that Chrome now implements scroll-anchoring itself (ie, content
stays in the same place when you add more stuff off-screen), which means we
cannot rely on back-pagination to make ScrollPanel do a scroll.

Instead, just do a scrollToToken. Which turns out to be considerably simpler
anyway.
2017-07-05 14:34:25 +01:00
Luke Barnard 298c5e4df3 Implement a store for RoomView
This allows for a truely flux-y way of storing the currently viewed room, making some callbacks (like onRoomIdResolved) redundant and making sure that the currently viewed room (ID) is only stored in one place as opposed to the previous many places.

This was required for the `join_room` action which can be dispatched to join the currently viewed room.

Another change was to introduce `LifeCycleStore` which is a start at encorporating state related to the lifecycle of the app into a flux store. Currently it only contains an action which will be dispatched when the sync state has become PREPARED. This was necessary to do a deferred dispatch of `join_room` following the registration of a PWLU (PassWord-Less User).

The following actions are introduced:
 - RoomViewStore:
    - `view_room`: dispatch to change the currently viewed room ID
    - `join_room`: dispatch to join the currently viewed room
 - LifecycleStore:
    - `do_after_sync_prepared`: dispatch to store an action which will be dispatched when `sync_state` is dispatched with `state = 'PREPARED'`
 - MatrixChat:
    - `sync_state`: dispatched when the sync state changes. Ideally there'd be a SyncStateStore that emitted an `update` upon receiving this, but for now the `LifecycleStore` will listen for `sync_state` directly.
2017-05-24 16:56:13 +01:00
Luke Barnard e1089574ae Write some tests for the RTS UI
Add tests that make assertions about the UI during registration when registration is done with a user recognised as a team member (by the mock rtsClient).
2017-05-17 09:46:17 +01:00