Michael Telatynski
ffa2ac172c
delint
2019-12-15 14:09:41 +00:00
Michael Telatynski
18f81d80db
Initial jest stuff. Blocked on Babel 7
2019-12-13 13:43:48 +00:00
Travis Ralston
7230d51cca
Merge pull request #3703 from matrix-org/travis/right-panel-v2
...
Refactor RightPanel to match expected behaviour
2019-12-11 10:50:45 -07:00
Travis Ralston
405b3f6be6
Fix member list not being open for end-to-end tests
2019-12-06 16:33:03 -07:00
Travis Ralston
185830e4f3
Fix end-to-end tests
...
The right panel needs to be opened manually now.
2019-12-06 14:22:27 -07:00
Michael Telatynski
a63fbbf2db
Add tests
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-12-05 00:11:10 +00:00
David Baker
a2e3f64963
Change read markers to use CSS transitions
...
Removes one of the two places we use Velocity, so we're one step
closer to getting rid of it for good.
Should therefore fix the fact that Velocity is leaking data entries
and therefore <hr> elements.
Hopefully also makes the logic in getEventTiles incrementally simpler,
if still somwewhat byzantine.
2019-11-26 19:06:02 +00:00
Michael Telatynski
d4d51dc61f
Rip out the remainder of Bluebird
2019-11-18 10:03:05 +00:00
Michael Telatynski
b3760cdd6e
Replace usages of Promise.delay(...) with own utils
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-11-14 14:25:54 +00:00
Michael Telatynski
41f4f3ef82
make end-to-end test failure more verbose
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-11-14 14:04:50 +00:00
Michael Telatynski
168b1b68bb
Revert "s/.done(/.then(/ since modern es6 track unhandled promise exceptions"
...
This reverts commit 09a8fec2
2019-11-12 11:56:21 +00:00
Michael Telatynski
09a8fec261
s/.done(/.then(/ since modern es6 track unhandled promise exceptions
2019-11-12 11:51:23 +00:00
Bruno Windels
616ff5ce76
adjust list item numbers in test that are now preserved
2019-10-22 15:43:40 +02:00
Bruno Windels
fc175a971c
Merge pull request #3537 from matrix-org/bwindels/merge-e2e-tests
...
Merge end-to-end tests
2019-10-21 08:31:35 +00:00
Bruno Windels
b03ebb964b
split up installing static webserver and riot copy
...
so we can just do the latter for the e2e tests on CI
2019-10-18 17:18:18 +02:00
Bruno Windels
dca968375d
Update test/end-to-end-tests/run.sh
2019-10-18 12:33:42 +00:00
Bruno Windels
3d15026da3
Update test/end-to-end-tests/run.sh
2019-10-18 12:33:32 +00:00
Bruno Windels
15a75737ff
Update test/end-to-end-tests/README.md
...
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2019-10-18 12:29:09 +00:00
Bruno Windels
76c7f58235
Update test/end-to-end-tests/README.md
...
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2019-10-18 12:28:58 +00:00
Bruno Windels
142a32b528
Update test/end-to-end-tests/README.md
...
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2019-10-18 12:28:47 +00:00
Bruno Windels
06e69d114f
Update test/end-to-end-tests/README.md
...
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2019-10-18 12:28:31 +00:00
Bruno Windels
5025a0ffea
Update test/end-to-end-tests/README.md
...
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2019-10-18 12:28:12 +00:00
Bruno Windels
8a028029ee
Update test/end-to-end-tests/install.sh
...
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2019-10-18 12:28:04 +00:00
Bruno Windels
6236909d93
Update test/end-to-end-tests/README.md
...
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2019-10-18 12:27:52 +00:00
Bruno Windels
683947e0b7
Update test/end-to-end-tests/README.md
...
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2019-10-18 12:27:43 +00:00
Bruno Windels
15bbf3a999
fix the lint fix
2019-10-10 12:12:13 +02:00
Bruno Windels
4b9a29cb60
put exec perms back on install script
2019-10-10 11:55:31 +02:00
Bruno Windels
6f9604992b
copyright
2019-10-10 11:42:59 +02:00
Bruno Windels
645a9d836f
install static webserver for server symlinked riot on CI
2019-10-10 11:40:04 +02:00
Bruno Windels
2d848bba29
fix lint
2019-10-09 17:57:55 +02:00
Bruno Windels
ebc2bba0c3
warn if not installed yet when running e2e tests
2019-10-09 17:37:57 +02:00
Bruno Windels
f8358fa4d0
make e2e test safe to run from anywhere
2019-10-09 17:37:41 +02:00
Bruno Windels
59cc36ca65
don't fetch riot/master by default when installing e2e tests
2019-10-09 17:34:40 +02:00
Bruno Windels
de21cb24e0
Merge remote-tracking branch 'e2etests/bwindels/use-cider' into bwindels/merge-e2e-tests
2019-10-09 17:12:50 +02:00
Bruno Windels
cad71913e9
only run riot static server if no riot url has been provided
2019-10-09 16:59:00 +02:00
Bruno Windels
ae38e0b357
Merge remote-tracking branch 'e2etests/bwindels/bigmerge' into bwindels/merge-e2e-tests
2019-10-09 16:55:32 +02:00
Bruno Windels
ca86969f92
move everything to subfolder to merge into react-sdk
2019-10-09 16:52:48 +02:00
Michael Telatynski
aae5bb9f39
Use new React Shallow renderer with hooks support
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 13:08:16 +02:00
Michael Telatynski
5c960dccb7
delint
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 12:51:08 +02:00
Michael Telatynski
efeb6e87c4
Use new React Shallow renderer with hooks support
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 12:51:08 +02:00
Michael Telatynski
34530843f4
Factor out generic EventListSummary from MELS
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 12:50:03 +02:00
Travis Ralston
0862ad029d
Fix permalinks test
2019-09-30 21:15:31 -06:00
Travis Ralston
fc66e69c02
Rename RoomPermalinkCreator -> Permalinks due to scope
...
The file handles more than just a RoomPermalinkCreator, so we should name it accordingly.
2019-09-30 20:39:58 -06:00
Travis Ralston
64aa6695f5
Move matrix-to.js to utils/permalinks/RoomPermalinkCreator
...
Just a little bit of refactoring to make the feature of custom prefixes a bit easier.
2019-09-30 12:16:46 -06:00
Bruno Windels
7f4e070807
fix deserialize unit tests
2019-09-23 15:34:01 +02:00
Michael Telatynski
d5c96b86d4
fix test
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-19 10:31:34 +01:00
Michael Telatynski
02dfdffc4f
Fix failing test due to newly added assumption
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-18 14:35:13 +01:00
Travis Ralston
99b8193ce7
Use the new ShallowRenderer over ReactTestUtils
...
Mostly because the ReactTestUtils renderer doesn't exist anymore.
2019-09-17 14:33:32 -06:00
Michael Telatynski
bf30cfe699
Fix other test
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-11 17:44:04 +01:00
Michael Telatynski
1c7d67e8b3
fix test
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-11 17:44:04 +01:00
Michael Telatynski
70ff2bc9cd
Switch to createReactClass: views/rooms and test/components. React 16 :D
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-06 15:04:46 +01:00
Bruno Windels
be79cdddb0
apply autocomplete changes to mock to fix editor unit tests
2019-08-29 18:00:38 +02:00
Bruno Windels
c44fbb73d0
fix bug when replacing range starting at end of previous part
2019-08-28 15:52:39 +02:00
Bruno Windels
994bcb5c85
dont expect rendered to be called from range.replace()
anymore
...
as this is now called from the `transform` method, unused in this test
2019-08-27 16:43:05 +02:00
Bruno Windels
e0b99b5cc8
Merge pull request #3342 from matrix-org/bwindels/cider-replace-emoticons
...
Auto-replace emoticons with emojis in new composer
2019-08-27 14:40:53 +00:00
Michael Telatynski
bcbd603874
Merge pull request #3345 from matrix-org/t3chguy/react16_3
...
Switch from react-addons-test-utils to react-dom/test-utils. React 16 :D
2019-08-26 19:44:51 +01:00
Bruno Windels
0e65f71a37
support incrementing/decrementing doc positions with predicate
2019-08-26 16:16:27 +02:00
Bruno Windels
10291bafe0
add support for selecting ranges in the editor model, and replacing them
...
this to support finding emoticons and replacing them with an emoji
2019-08-26 16:16:27 +02:00
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
Michael Telatynski
e5d3198f53
Merge pull request #3339 from matrix-org/t3chguy/substitute_handle_global
...
Iterate over all instances of variable/tag for _t substitutions
2019-08-23 19:43:40 +01:00
Michael Telatynski
310457059b
[i18n] only append tail if it is actually needed
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-08-22 18:31:02 +01:00
Michael Telatynski
b5daba9026
Iterate over all instances of variable/tag for _t substitutions
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-08-22 18:17:08 +01:00
Bruno Windels
5cebce9bbf
fix bug detected by tests
2019-08-22 14:41:40 +01:00
Bruno Windels
1dd052d9dd
fix test after refactoring
2019-08-22 14:38:24 +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
Bruno Windels
299cf8542c
Split MessageEditor in edit-specifics & reusable part for main composer
2019-08-05 15:31:18 +02:00
Bruno Windels
af3eebd0a6
add undo steps after word boundary (or capped) when typing or removing
2019-08-02 11:31:01 +02:00
Bruno Windels
07b2e51dce
put max step length in constant
2019-08-01 16:27:17 +02:00
Bruno Windels
aa22c90f2c
HistoryManager + unit tests
2019-08-01 11:25:04 +02: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
fb77802d54
Merge pull request #3260 from matrix-org/t3chguy/hide_msg_action_buttons_on_perms
...
Introduce RoomContext for sharing state between RoomView and children
2019-07-31 11:43:26 +01:00
J. Ryan Stinnett
c338f8bf1f
Add room
context to test
2019-07-31 11:17:28 +01:00
Bruno Windels
e855a056c7
Merge pull request #3247 from matrix-org/bwindels/editortests
...
Unit tests for new editor
2019-07-30 14:46:33 +00:00
Bruno Windels
4b08bf0e76
add tests for removing multiple characters in edit
2019-07-30 12:31:40 +02:00
Michael Telatynski
fd039431bc
put maySendMessage stub on stubRoom in the right place
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-07-29 13:50:11 +01:00
Michael Telatynski
ac66388a7f
Add missing stubs to stubRoom.currentState
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-07-29 13:27:49 +01:00
Michael Telatynski
f45b1bfdda
Fix StubRoom for react-sdk tests
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-07-29 13:18:02 +01:00
Michael Telatynski
265ff452d7
Upgrade mockRoom to implement EventEmitter like mxRoom does
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-07-29 12:39:44 +01:00
Bruno Windels
b8a3c5ebd0
test serialization only produces html messages when needed
2019-07-25 18:47:29 +02:00
Bruno Windels
0b92077bba
tests for turning caret position from model into dom position
2019-07-25 18:38:00 +02:00
Bruno Windels
e8a31edeba
test html to editor model deserialization
2019-07-25 17:27:47 +02:00
Bruno Windels
08ff9e598a
put mock code in separate file to reuse elsewhere
2019-07-25 17:27:29 +02:00
Bruno Windels
94957fcfd0
add more tests for empty lines
2019-07-25 16:06:43 +02:00
Bruno Windels
7f5ba08de9
test typing in middle of pills
2019-07-25 15:06:32 +02:00
Bruno Windels
a474f53c51
more auto-complete tests
2019-07-25 14:50:20 +02:00
Bruno Windels
d6133eefd9
tests for non-editable parts
2019-07-25 14:50:20 +02:00
Bruno Windels
a7259b31b6
first set of model tests
2019-07-25 14:50:20 +02:00
Bruno Windels
419c800167
add tests for diffAtCaret
2019-07-25 14:50:20 +02:00
Bruno Windels
595dc82543
unit test + fixes + comments + simplication for diffDeletion
2019-07-25 14:50:20 +02:00
David Baker
2eb8a8879b
Merge pull request #3199 from matrix-org/dbkr/terms
...
ToS for ISes/IMs: prompt on use screen
2019-07-23 10:32:11 +01:00
Travis Ralston
ff0c4c0571
Merge pull request #3211 from matrix-org/travis/send-proper-uia
...
Send the correct UIA alongside the wrong UIA for backwards comaptibility
2019-07-12 08:14:01 -06:00
Travis Ralston
7a3aa9be2e
Remove unused identityEnabled property from ValidatedServerConfig
...
See https://github.com/vector-im/riot-web/issues/10229
2019-07-11 15:11:09 -06:00
Travis Ralston
ba5238d86a
Finally fix tests
2019-07-11 15:01:56 -06:00
Travis Ralston
698fd3b897
Hopefully actually make the tests happy
2019-07-11 14:45:36 -06:00
Travis Ralston
a9419135aa
Fix tests to use UIA proper
2019-07-11 14:38:28 -06:00
David Baker
e6fdff43d8
unsused variable
2019-07-11 16:02:02 +01:00
David Baker
69fa34d71f
Fix ScalarAuthClient to refresh tokens if they fail
...
Also add a test to make sure it does it
2019-07-11 16:00:24 +01:00
Travis Ralston
111b28971a
Merge pull request #3202 from matrix-org/travis/stably-use-stable-apis
...
Use r0 media endpoints for group tests
2019-07-11 08:20:08 -06:00
David Baker
6b815327a0
apparently I was doing array bracket spacing wrong
2019-07-11 14:44:45 +01:00
David Baker
3ab5acde9d
Add unit test for terms agreement flow
2019-07-11 14:32:04 +01:00
Michael Telatynski
959f8fd844
Fix tests
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-07-10 21:58:08 +01:00
Travis Ralston
90212c76a5
Use r0 media endpoints for group tests
2019-07-10 13:24:47 -06:00
Bruno Windels
8b16f91b3d
fix karma tests?
2019-06-13 15:50:23 +02:00
David Baker
7602d76723
fix test
2019-06-11 13:16:49 +01:00
Travis Ralston
4c1ac38dd4
Merge branch 'develop' into travis/feature/wellknown2
2019-05-14 10:53:01 -06:00
Travis Ralston
f86ccae4a0
Give all the matrix.to tests a room ID to abuse
2019-05-13 14:31:40 -06: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
David Baker
ce9f3d8a57
Rename
2019-03-11 11:38:54 +00:00
David Baker
61ebf4d920
spurious semicolon
2019-03-08 13:52:04 +00:00
David Baker
ce1623691e
Fix instantly sending RRs
...
Splits UserActivity into a tristate of 'active' (last < 1s), 'passive' (lasts a
couple of mins) and neither. Read receipts are sent when 'active', read markers
are sent while 'passive'.
Also fixed a document / window mix-up on the 'blur' handler.
Also adds a unit test for UserActivity because it's quite complex now
(and changes UserActivity to make it testable by accessing the singleton
via sharedInstance() rather than exporting it directly).
Fixes https://github.com/vector-im/riot-web/issues/9023
2019-03-08 12:46:38 +00: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
Bruno Windels
f97ea37717
permalink is one word
2019-02-25 18:43:08 +01:00
Bruno Windels
476b81fc1e
add test for membership change
2019-02-25 18:43:08 +01:00
Bruno Windels
5ef673e80e
port existing tests
2019-02-25 18:43:08 +01:00
Travis Ralston
b12362dd37
Disable dragging tests for room list
...
We don't support dragging, so don't test it.
2019-02-13 19:51:34 -07: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
Travis Ralston
d20bdbbc1a
Disable room settings tests
2019-01-28 14:11:10 -07: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
0ebde5266e
Appease the linter again
2019-01-03 22:40:44 -07:00
Travis Ralston
f59625f7bd
Fix last active test
...
Time is backwards from all the other tests: larger is older, so we want LessThanOrEqual. Also ensure all the power levels are the same to prevent the sort algorithm from running a PL ordering.
2019-01-03 22:24:24 -07:00
Travis Ralston
34d5870a03
Appease the linter
2019-01-03 22:07:09 -07:00
Travis Ralston
77dfba8a22
Add unit tests for MemberList
...
Particularly the ordering of the tiles.
2019-01-03 21:55:52 -07: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
Travis Ralston
f08a54ed1e
Don't consider ACL'd servers as permalink candidates
...
and fix the bug where it was picking 4 servers instead of 3. This was due to `<=` instead of `<` in the `MAX_SERVER_CANDIDATES` loop. Added tests for all the things.
Fixes https://github.com/vector-im/riot-web/issues/7752
Fixes https://github.com/vector-im/riot-web/issues/7682
2018-12-05 18:00:09 -07:00
J. Ryan Stinnett
22ff76e6b7
Add error to UI when group member list fails to load
...
Signed-off-by: J. Ryan Stinnett <jryans@gmail.com>
2018-12-04 18:46:15 -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
Travis Ralston
0cdc44a205
Appease the linter
2018-10-26 20:49:01 -06:00
Travis Ralston
3bc5e2beb3
Fix and test matrix.to alias permalinks
...
Fixes https://github.com/vector-im/riot-web/issues/7614
Regression of https://github.com/matrix-org/matrix-react-sdk/pull/2250
2018-10-26 19:47:53 -06:00
Travis Ralston
c389540522
Appease the linter
2018-10-26 10:22:18 -06:00
Travis Ralston
43980addd0
Add hostname sanity tests
...
In the event someone changes how the hostname parsing works.
2018-10-25 15:22:52 -06:00
Travis Ralston
b9bfbdc22d
Fix the tests so they actually test something
2018-10-25 15:22:28 -06:00
Travis Ralston
e8cb636631
Pick servers for ?via on matrix.to links based on some heuristics
2018-10-24 18:01:08 -06:00
Bruno Windels
0912b8dcc2
Merge pull request #2218 from matrix-org/bwindels/phasedrollout
...
Phased rollout of lazy loading
2018-10-15 17:27:28 +02:00
Bruno Windels
63f1c41d18
fix test lint
2018-10-15 17:15:22 +02:00
Bruno Windels
f717c5697b
tests for phased rollout function
2018-10-15 16:41:04 +02:00
David Baker
a58de9e189
Also test the two options while we're at it
2018-10-11 21:04:50 +01:00
David Baker
53e13be047
Add some unit tests for QueryMatcher
...
Which 1) has a fairly complex interface with lots of subtleties and
2) is really trivial to unit test.
2018-10-11 20:50:48 +01:00
Bruno Windels
e951a22d31
fix tests
2018-09-18 17:09:14 +02:00
David Baker
a07799879c
Fix tests
2018-09-04 18:50:18 +01:00
David Baker
bd0a9cf3a0
Merge remote-tracking branch 'origin/develop' into dbkr/room_upgrade
2018-08-29 15:51:07 +01:00
David Baker
cb84feefa9
Add stub for getVisibleRooms()
...
Fixes the tests
2018-08-23 12:14:52 +01:00
David Baker
f679acea08
Revert "Revert "Fix showing peek preview while LL members are loading""
2018-08-22 16:35:58 +01:00
David Baker
bf7633250a
Revert "Fix showing peek preview while LL members are loading"
2018-08-22 16:16:17 +01:00
Bruno Windels
db7dd8e9e8
fix tests
2018-08-22 16:02:12 +02:00
David Baker
353b6e9e6d
Add stub
2018-08-17 15:15:53 +01:00
Bruno Windels
cead4096d8
Merge pull request #2118 from matrix-org/bwindels/feature_lazyloading
...
Lazy loading of room members
2018-08-16 18:14:55 +02:00
Bruno Windels
1675d3c4ba
room stub not having getVersion method broke tests
2018-08-15 13:22:26 +02:00
Bruno Windels
90fc15ff3e
adjust room constructor
2018-08-07 15:33:37 +02:00
Bruno Windels
b9bbb7ee16
pass in userId with room in test
2018-08-02 11:40:56 +02:00
Bruno Windels
34cb89e86a
fix tests
2018-07-25 16:10:49 +02:00
Matthew Hodgson
021409aafe
apply review feedback from @lukebarnard1
...
(cherry picked from commit 37d4bce)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-09 19:54:57 +01:00
Matthew Hodgson
efdc5430d7
merge develop
2018-07-09 17:50:07 +01:00
Luke Barnard
15bd2e157f
Test everything
2018-07-05 14:55:29 +01:00
Luke Barnard
d53c836fd7
Implement aggregation by error type for tracked decryption failures
2018-07-05 13:54:44 +01:00
Luke Barnard
01dd387970
Track UISIs in bulk
...
Piwik supports sending an event value, which we can use to indicate
cardinality of UISIs to be tracked instead of tracking them individually.
This means we can track them at a lower frequency of (fairly arbitrary)
60s.
2018-06-28 15:07:27 +01:00
Luke Barnard
488cc416cf
For now, shelve persistance across sessions
2018-06-15 17:08:11 +01:00
Luke Barnard
c5252be4a8
Test everything, not just DFT
2018-06-15 16:51:11 +01:00
Luke Barnard
f08274585e
Persist tracked event ID hash using localStorage
2018-06-15 15:30:54 +01:00
Luke Barnard
011154396c
Add extra, useful expectation to test
2018-06-15 15:15:48 +01:00
Luke Barnard
ac0416af96
Do not track previously tracked failures
2018-06-15 14:48:20 +01:00
Luke Barnard
62601d657d
Implement DecryptionFailureTracker for less agressive tracking
...
Instead of pinging Analytics once per failed decryption, add the failure
to a list of failures and after a grace period, add it to a FIFO for
tracking. On an interval, track a single failure from the FIFO.
2018-06-15 13:42:18 +01:00
Akihiko Odaki
35ab573bc5
Update sinon to 5.0.7
2018-05-21 18:44:00 +09:00
Matthew Hodgson
b616fd025e
comment out all the tests for now
2018-05-20 23:34:06 +01:00
Matthew Hodgson
d799b7e424
refactor roundtripping into a single place
...
and fix isRichTextEnabled to be correctly camelCased everywhere...
2018-05-20 16:30:39 +01:00
Luke Barnard
aa370b3b67
Merge pull request #1877 from matrix-org/luke/test-room-list
...
Add tests for RoomList
2018-05-04 13:57:57 +01:00
Luke Barnard
c06a04af97
Fix unrelated linting issue
2018-05-03 18:11:32 +01:00
Luke Barnard
e15b39092d
Add tests for testing room tile updates when tags (groups in LLP) are selected
2018-05-03 18:04:01 +01:00
Luke Barnard
80d251b622
Add tests for optimistic updates of moving room tiles
2018-05-03 15:41:35 +01:00
Luke Barnard
3e55a45601
Mock getGroups on MatrixClient for RoomList _makeGroupInviteTiles
2018-05-03 15:24:41 +01:00
Michael Telatynski
f2102e283c
Merge branches 'develop' and 't3chguy/m.relates_to' of github.com:matrix-org/matrix-react-sdk into t3chguy/m.relates_to
2018-05-02 13:08:38 +01:00
Luke Barnard
dc20f32ad7
Move waitForUpdate to test-utils
2018-05-02 11:19:01 +01:00
Michael Telatynski
f0bd4a54e7
Refactor tests to understand sendMessage instead of send{Text,Html}Message
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-05-01 13:26:24 +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
Matthew Hodgson
fe5e68de29
fix tests
2018-04-15 23:48:52 +01:00
Matthew Hodgson
7ae1b37b56
add notif UTs
2018-04-12 20:25:08 +01:00
Luke Barnard
d3dc2a33b4
Fix bug preventing setting room power levels
...
- don't use refs, use onChange of PowerSelector
- store power levels as state in the RoomSetting component
2018-02-28 16:32:20 +00:00
Luke Barnard
d91d1932f4
Add tests for RoomSettings
...
For setting:
- name
- topic
- history visibility
- power levels
Testing RoomSettings required more stubbing on the matrix client.
The power level tests should be failing at this commit, with
fixes being made in upcoming commits.
Some tests are marked as known failures that we should fix but
aren't necessarily bugs:
- SettingStore.setValue is used when saving despite the user not
having made a change.
- Testing directory publicity changes cannot be tested because we
update state asynchronously in componentWillMount (which we do
not block on in beforeEach).
Also, we needed to use `export default` to make sure everything
uses the same client peg and client.
2018-02-28 16:07:21 +00:00
Luke Barnard
cf4ae681f4
Offline mode ( #1723 )
...
* Allow the client to run without connection to HS (i.e. using indexeddb)
Allows running without having pushRules (it's safe not to have these
when running from indexeddb sync.)
This means rooms will be displayed with "unknown" notifcation state.
This assumes anything that uses the push rules will get pushRule state
again when the client starts syncing again.
For recovering from being disconnected,
* If an avatar has fallen back, try again on reconnection
* If a thumbnail image failed to load, retry on reconnect
* Load joined groups when reconnecting
Update tests to give MELS a context.matrixClient
2018-02-06 17:50:53 +00:00
Stefan Parviainen
414ee82582
Perform substitution on all parts, not just the last one
...
Signed-off-by: Stefan Parviainen <pafcu@iki.fi>
This way the substitutions don't need to appear in the same order in the
translated string.
2017-11-17 08:47:31 +01:00
Stefan Parviainen
2c1618bc10
Fix conflict and update strings
...
Signed-off-by: Stefan Parviainen <pafcu@iki.fi>
2017-11-15 20:40:51 +01:00
Stefan Parviainen
788be67c75
Clarifications
2017-11-14 20:08:27 +01:00
Stefan Parviainen
cdd03dd1c5
Use toEqual instead of toBe
2017-11-14 19:34:47 +01:00
Stefan Parviainen
2acd42e7c5
Make eslint happy
2017-11-13 21:10:08 +01:00
Stefan Parviainen
672d5080ad
Add unit tests for translation
2017-11-13 20:20:41 +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
8a64123ab8
Add sensible missing entry generator for MELS tests
...
Fixes vector-im/riot-web#5426 (because we don't test plurals anywhere else)
2017-10-27 16:55:13 +01: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
Luke Barnard
c4f049effe
Merge pull request #1243 from matrix-org/t3chguy/hide-join-part-2
...
T3chguy/hide join part (attempt) 2
2017-07-26 17:15:43 +01:00
Luke Barnard
f7145941fd
Add tests to assert correct MD mention link stripping
...
Tab-completed @Mentions should only be sent as display names in the `body` of the event. The HTML should be unaffected, and always sent as an anchor tag.
2017-07-24 14:42:20 +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
7455002b1a
InteractiveAuthDialogTest: increase timeout
...
Blindly increase the number of attempts, because it's failing on travis, but
not on my dev box...
2017-07-12 00:24:00 +01:00
Richard van der Hoff
ab61b6b1b6
Use matrix-react-test-utils rather than our own impl
...
waitForRenderedDOMComponentWithTag is now in matrix-react-test-utils.
2017-07-11 23:14:56 +01:00
Luke Barnard
3bab720a7b
Merge pull request #1208 from matrix-org/rav/timelinepanel_test_flakiness
...
Fix a flaky test in the timelinepanel code
2017-07-11 18:10:55 +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
Luke Barnard
c9df079464
Merge pull request #1176 from matrix-org/luke/feature-enable-RTE
...
Take RTE out of labs! 🎉
2017-07-10 13:56:00 +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
e3f2eb5232
Take RTE out of labs! 🎉
...
This stops react-sdk from tracking any state previously stored for the purposes of enabling or disabling the lab feature that enabled the new MessageComposer. It is now enabled permanently.
This is being done with the hope that we can get more feedback for it so that when we release we can be confident that people will be OK with the changes it brings.
2017-07-04 14:44:55 +01:00
Luke Barnard
030358e764
Clarify test names
2017-06-30 12:56:19 +01:00
Luke Barnard
80a73a50f5
Update tests
...
When sending the letter "a" we expect it to be sent as a text message when RTE is enabled because we now detect that there is no formatting or styled blocks in the composer. We also expect emoji to be sent as plaintext if there is no formatting
2017-06-30 12:39:08 +01:00
Luke Barnard
004d4828f8
Make the tests pass
...
sendTextMessage is not called when RTE Markdown is enabled, but rather sendHtmlMessage
2017-06-23 17:08:37 +01:00
Richard van der Hoff
57b4c422b1
Merge pull request #1061 from matrix-org/rav/megolm_key_encryption_errors
...
Improve error logging/reporting in megolm import/export
2017-06-12 10:09:52 +01:00
Luke Barnard
3218cae6e3
Expect to join by alias if given to RVS
2017-06-08 17:47:48 +01:00
Richard van der Hoff
b16e652acc
rewrite MegolmExportEncryption using async/await
...
... to make it easier to add exception handling
2017-06-08 14:45:01 +01:00
Richard van der Hoff
d9bc8ebc53
de-lint MegolmExportEncryption + test
2017-06-08 14:29:53 +01:00
Luke Barnard
619830617a
Merge branch 'develop' into luke/ilag-i18n
...
In order to get ILAG internationalised
Conflicts:
src/components/structures/LoggedInView.js
src/components/structures/MatrixChat.js
src/components/views/dialogs/ChatCreateOrReuseDialog.js
src/components/views/dialogs/SetDisplayNameDialog.js
src/createRoom.js
src/i18n/strings/en_EN.json
2017-06-05 16:08:03 +01:00
Luke Barnard
7808994b71
Modify RVS test to wait until room loaded
...
This allows for the alias resolution to occur before a join is attempted. In theory, join_room could in future do an optional view_room-esque thing before attemping a join which would be less fragile than dispatching things in the right order.
Also, make sure the store indicates that it is not loading when a room ID has been used - no alias resolution need take place.
2017-06-02 09:22:48 +01:00
Marcel
1b35f816fb
Fix languages.json
2017-06-01 21:10:32 +02:00
Marcel
46750c4b9b
Fix tests for PR #989
2017-06-01 20:40:27 +02:00
Matthew Hodgson
5c885922d9
Merge branch 'develop' into new-guest-access
2017-05-28 22:58:18 +01:00
David Baker
bb344740dd
Add test languages file
2017-05-26 13:09:29 +01:00
David Baker
0de0b8954d
Trailing whitespace
2017-05-26 12:03:36 +01:00
David Baker
e44f3cc709
Fix tests
...
* Serve translation files from the karma server
* Port UserSettingsStore to ES6 exports because the test runner
gets confused by ES6 importing a commonjs module
* Remove extra spaces in translations strings for MELS
* Fix 'his/her' back to be 'their'
* Change test to expect singular 'invitation' for a single person
(there may be multiple invitations, but IMO this should be
'rejected n invitations' and we can play with the wording later,
I don't think the singular is any worse than the plural).
* set language in the MELS tests (and wait for it to complete)
* Don't bother setting lang in other tests for now
2017-05-26 11:58:45 +01:00
David Baker
dfc8cf3f54
Merge branch 'dbkr/dont_put_src_in_resolve_root' into dbkr/translations
2017-05-25 23:16:39 +01:00
David Baker
ba8e37a84e
Don't include src in the test resolve root
...
Don't include src in resolve root for the karma test, as otherwise
modules from react sdk get pulled in instead of npm libraries like
'extend' which breaks everything in really subtle ways.
2017-05-25 23:13:49 +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
David Baker
d419c42a4f
Squash merge https://github.com/matrix-org/matrix-react-sdk/pull/801
2017-05-23 15:16:31 +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
Luke Barnard
5151264f60
Merge branch 'develop' into new-guest-access
...
Conflicts:
src/component-index.js
2017-05-11 13:22:30 +01:00
Luke Barnard
bfa3123f9b
Combine data-scroll-token and -contained-scroll-tokens
...
- Instead of using one attribute, use one that might just contain one token
- Use the first token when tracking a child
- Mandate that no commas can be in individual tokens
2017-05-04 10:00:13 +01:00
Luke Barnard
13d37e43ff
Mock isGuest
2017-05-02 10:14:54 +01:00
David Baker
23c38bd8a3
Put back both done's
...
mocha takes the exception arg and does the right thing
2017-03-16 17:47:15 +00:00
David Baker
375ae8fb04
Fix password UI auth test
...
By adding a way to wait a short time for a component to appear in
the DOM, so we don't get flakey failures like this when we change
something to returning a promise that needs to resolve before the
component actually appears.
2017-03-16 17:26:42 +00:00
David Baker
51467506f8
Port registration over to use InteractiveAuth
...
These changes are moved over from the dbkr/msisdn_signin branch
2017-02-24 11:41:23 +00:00