Richard van der Hoff
cdd2902b01
Update annoying TimelinePanel test
...
* Actually test what we were supposed to be testing (viz, that we can paginate
back down after we hit the top of the room)
* Make the cap on the number of events we show in the timeline a configurable
property, so that we can set it in the test
* Use a smaller cap in the test, so that we have to do less paginating to hit
the cap, to make the test run quicker.
* add some more logging so that we can see how far it's got if it gets stuck.
2016-08-24 16:28:00 +01:00
Richard van der Hoff
70c0290aec
Fix TimelinePanel test
...
https://github.com/matrix-org/matrix-react-sdk/pull/422 made events take up
less vertical space, so we now need more of them to allow us to scroll back.
2016-08-23 14:39:44 +01:00
Richard van der Hoff
5440fd7504
Fix tests
...
MatrixClientPeg no longer has a replaceUsingUrls method, so don't try to stub
it out.
2016-08-12 07:27:53 +01:00
Richard van der Hoff
244265d52b
Make sure that we clear localstorage before *all* tests
...
This was causing flaky tests, as sometimes the joining test would inherit an
"mx_is_guest" setting from a previous test run.
2016-08-11 11:42:29 +01:00
Richard van der Hoff
da7a556629
More tests for the loading process:
...
1. Check that localstorage is correctly updated on successful login (test for
https://github.com/matrix-org/matrix-react-sdk/pull/404 )
2. Check that the saved HS isused for guest registration (test for
https://github.com/matrix-org/matrix-react-sdk/pull/405 )
3. Test loginToken handling (test for
https://github.com/matrix-org/matrix-react-sdk/pull/406 /
https://github.com/vector-im/vector-web/pull/1946 )
2016-08-11 02:00:27 +01:00
Richard van der Hoff
dd6868c255
Fix joining test
...
This had been broken by
https://github.com/matrix-org/matrix-react-sdk/pull/399 . Change the way we
populate the matrixclient used for the joining tests.
2016-08-10 22:39:53 +01:00
Richard van der Hoff
fe4bb3e413
More app-loading tests
...
1. fix the 'Clean load' tests which had been broken by
https://github.com/matrix-org/matrix-react-sdk/pull/399 : make sure we clear
localStorage between tests.
2. Test the session rehydration properly by setting the localStorage rather
than setting up the MatrixClientPeg before loading the app.
3. Add some tests for the auto-guest-registration flows.
2016-08-10 14:37:30 +01:00
Richard van der Hoff
afc889ff4d
Some tests of the application load process
2016-08-10 00:15:04 +01:00
Richard van der Hoff
24841cc5c4
Start to factor out session-loading magic
...
Take some of the magic out of MatrixChat.componentDidMount() into a new
component.
Also delete the MatrixChat test. It wasn't really doing much, is broken by the
change, and I am replacing it with (better) app-level tests in the vector
project.
2016-08-10 00:05:44 +01:00
David Baker
c9ab977d73
Fix unit tests
...
ReplaceUsingAccessToken was, uh, replaced with replacedUsingCreds
2016-08-05 14:38:10 +01:00
David Baker
cbfb0ad998
Merge pull request #377 from matrix-org/dbkr/use_logout_api
...
Call the logout API when we log out
2016-08-03 17:51:42 +01:00
Richard van der Hoff
8a57881618
Add more logging to TimelinePanel-test
...
In an attempt to figure out why this is timing out sometimes, add even more
debugging.
2016-08-03 15:24:56 +01:00
David Baker
da03af6c1c
Fix tests
2016-08-03 10:51:58 +01:00
David Baker
a5272542ef
Lengthen timelinepanel test timeout again
...
It's now hitting this timeout on the jenkins box instead of the browser disconnect timeout
2016-07-14 10:40:12 +01:00
Kegsay
20210e7104
Log scrollTop and scrollHeight to try to debug flakey test
...
Sometimes it fails because awaitScroll() on :277 isn't resolving because onScroll isn't firing. We need to know if this is because we aren't changing scrollTop
2016-07-14 10:38:24 +01:00
David Baker
a2b64798f7
Fix timelinepanel test timeout
...
The previous fix was adjusting the wrong timeout: it's hitting browserNoActivityTimeout, so revert previous fix & do this instead
2016-07-05 14:35:34 +01:00
David Baker
1c280badde
Increase timeout on TimelinePanel test
...
Since it looks like this timeout sometimes isn't sufficient to scroll all the way up when jenkins is very busy
2016-06-23 18:36:44 +01:00
David Baker
dc50a0f24a
Add logging to TimelinePanel test
...
to see where it fails on jenkins
2016-06-23 16:20:40 +01:00
David Baker
607923b58f
Fix test since we peek by room ID, not alias
2016-06-17 17:49:36 +01:00
David Baker
53d92df6f8
Set up / teardown container div in before/afterEach
2016-06-17 15:50:13 +01:00
David Baker
b2f0ed09ab
Sort alphabetically (and name consistently)
2016-06-17 15:46:31 +01:00
David Baker
d3a463e9ac
restore the room header too
2016-06-17 12:23:45 +01:00
David Baker
b0bf24c136
Comment
2016-06-17 12:22:16 +01:00
David Baker
1fbf027a40
Some basic tests for RoomView
2016-06-17 12:20:26 +01:00
Richard van der Hoff
30f273c611
Merge pull request #283 from matrix-org/rav/issue_1427
...
Fix bug which stopped us scrolling down after we scrolled up
2016-04-21 14:26:42 +01:00
Richard van der Hoff
380b991d16
Merge pull request #281 from matrix-org/rav/velociraptor_fixes
...
Various fixes to the velociraptor
2016-04-21 14:25:07 +01:00
Richard van der Hoff
f551317b5d
Unmount TimelinePanel when test completes
...
... mostly because it seems like a nice idea.
2016-04-21 14:23:41 +01:00
Richard van der Hoff
9fcf8d00b4
Silence some 404s from the tests
...
Add an edit.png so we don't get a 404 every time we load some event tiles
2016-04-21 14:23:33 +01:00
Richard van der Hoff
2f435f4836
Fix bug which stopped us scrolling down after we scrolled up
...
Make sure that, if we scroll up enough to move the timelinewindow away from the
end of the timeline, we reset the canForwardPaginate flag.
2016-04-21 14:20:12 +01:00
Richard van der Hoff
e5e9a3819e
Load babel-polyfill in tests
...
Object.values() isn't available natively, so use polyfill for it.
2016-04-21 08:10:46 +01:00
Richard van der Hoff
dcd81da856
Fix test failures introduced by last PR
2016-04-19 21:10:23 +01:00
Richard van der Hoff
121fe34180
Improve parsing of keyword notification rules
...
For notification rules, the absence of a value on a 'highlight' tweak means
that the highlight should happen; this was previously confusing us.
Use the action parser from NotificationUtils to simplify the code.
Fixes https://github.com/vector-im/vector-web/issues/1330
2016-04-14 22:45:00 +01:00
Richard van der Hoff
ff5dff45f5
Start Notifications component refactor
...
Factor some things out of the mega Notifications component, and add a dummy
unit test to show willing
2016-04-13 18:44:41 +01:00
Richard van der Hoff
bf31d6d5fa
Karma test tweaks
...
* Make sure we only get one js-sdk (and update runtime config to match)
* Don't verifyNoOutstandingRequests (since it is hard to be certain which we
will get, and makes the tests too dependent on implementation-specifics).
* Disable color for npm test, to avoid confusing Jenkins
2016-04-13 17:41:23 +01:00
Richard van der Hoff
181a6a61ff
tests: Don't add the div to the DOM
2016-04-13 17:20:06 +01:00
Richard van der Hoff
322af6513d
Run some tests under karma
...
Including a regression test for
https://github.com/vector-im/vector-web/issues/1314
2016-04-13 17:20:06 +01:00
Richard van der Hoff
69ce3c43cf
Revert "Merge branch 'develop' into rav/karma"
...
The karma tests don't pass yet, and aren't ready to land on develop.
This reverts commit 438453e61a
, reversing
changes made to 50f94eb040
.
2016-04-13 17:17:45 +01:00
Richard van der Hoff
a512e600a7
tests: Don't add the div to the DOM
2016-04-13 11:16:38 +01:00
Richard van der Hoff
429d110212
Run some tests under karma
...
Including a regression test for
https://github.com/vector-im/vector-web/issues/1314
2016-04-13 10:15:04 +01:00
Richard van der Hoff
e051d1528c
Remember to load new timeline events
...
Fixes a bug where we wouldn't load new timeline events if they arrived when we
were scrolled up (https://github.com/vector-im/vector-web/issues/1367 )
2016-04-11 14:05:04 +01:00
Richard van der Hoff
967528608f
Merge pull request #265 from matrix-org/rav/limit_pagination
...
Stop trying to paginate after we get a failure
2016-04-08 16:00:51 +01:00
Richard van der Hoff
15d0df5d3b
Stop trying to paginate after we get a failure
...
Once TimelineWindow.paginate fails to return any results, set
can*Paginate=false, and use it as a flag to stop us trying to paginate any
further.
2016-04-08 15:05:15 +01:00
Richard van der Hoff
7e6ea192fd
Build our own stub MatrixClient for the tests
...
It turns out that a bunch of things rely on MatrixClient methods to return
promises rather than undefined. Rather than having to undo half the work done
by sinon.createStubInstance, just build our own object with as many methods as
we need stubbed out.
2016-04-08 14:50:04 +01:00
Richard van der Hoff
7a821ce9d1
Make it possible to only run one test file each time
2016-04-07 17:49:39 +01:00
Richard van der Hoff
a2168efcda
Correctly restore MatrixClientPeg after each test case
2016-04-07 16:47:17 +01:00
Richard van der Hoff
c5c9cad0cb
Merge pull request #261 from matrix-org/rav/issue_1151
...
Fix an issue where the scroll stopped working.
2016-04-05 12:55:59 +01:00
Richard van der Hoff
51fe77122b
Fix an issue where the scroll stopped working.
...
Under certain conditions, it was possible to get stuck in a state where any
user-initiated scroll would be met with "Working around
vector-im/vector-web#528" and overridden. Fix this by removing the duplication
between _lastSetScroll and recentEventScroll, and using _lastSetScroll which is
more reliable.
2016-04-05 10:41:32 +01:00
Richard van der Hoff
b6e4e9caf3
Fix a bug where we tried to show two ghost read markers at once.
...
I think this was responsible for the readmarker just disappearing rather than
animating.
While we're here, decrease the delay on the animation, and instead make it take
slightly longer to disappear.
2016-03-31 18:27:46 +01:00
Richard van der Hoff
25b35a09b9
Clean up some redundancy in the MessagePanel test
2016-03-31 17:01:11 +01:00
Richard van der Hoff
3ba7f9f23a
Fix failing test
...
DOM styles are strings, not numbers
2016-03-31 01:01:49 +01:00
Richard van der Hoff
dc5c0928b2
Some basic tests for MessagePanel
...
Check that it puts the read marker in the right place, and check that the
animation works.
... all of which has been surprisingly painful.
2016-03-31 00:48:46 +01:00
Richard van der Hoff
cbcca0bfa1
Fix undefined error in test
2016-03-29 00:12:59 +01:00
Richard van der Hoff
5f3b82a767
Stub out the matrix client
2016-03-29 00:12:59 +01:00
Richard van der Hoff
7e1e2347b5
Don't need alias for test-component-index
2016-03-29 00:12:59 +01:00
Richard van der Hoff
d7801ef3a4
Vaguely working webpack test
2016-03-29 00:12:59 +01:00
Richard van der Hoff
e099aa9ce0
test component index and stub component
2016-03-29 00:12:58 +01:00