Commit Graph

103 Commits

Author SHA1 Message Date
JC Brand
b5e7bd5605 Move roster tests into their own module 2017-12-22 14:39:29 +00:00
JC Brand
1178badec8 Role was wrongly set to 'occupant' instead of 'participant' 2017-12-22 12:02:24 +00:00
JC Brand
ac643ae63f Refactor views to use Backbone.OrderedListView 2017-12-22 12:02:18 +00:00
JC Brand
ce1954a9f7 Improved roster performance.
Don't sort the roster group for each `chat_status` change. Instead batch
every 500ms.
2017-12-20 16:59:17 +00:00
JC Brand
fc94127014 Fix failing tests 2017-12-03 18:49:53 +01:00
JC Brand
add3b8efb3 utils now no longer depends on jquery. 2017-08-16 09:05:15 +02:00
JC Brand
439e37feaa disco: Refactor service discovery and add tests.
* `disco#items` are now only fetched when advertised by the entity.
* `identity` information is now also stored on the `DiscoEntity` model.
2017-07-21 17:38:08 +02:00
JC Brand
cf1e8f2921 Fix failing test for emoji picker 2017-07-15 15:16:38 +02:00
JC Brand
397927b189 Fix broken tests and update changelog 2017-07-12 09:58:14 +02:00
JC Brand
16d62bf9e4 Fix broken tests due to using ES2015 promises 2017-07-11 17:05:02 +02:00
JC Brand
6ef0536e31 Some work on using es6 promises 2017-07-10 21:14:48 +02:00
JC Brand
02e5921415 Fix problem of stuck/hanging tests on TravisCI 2017-06-19 15:05:22 +02:00
JC Brand
6c262f7213 Various small changes to reduce (non-critical) errors during testing 2017-06-14 20:14:45 +02:00
JC Brand
3866ab7bac No need for run-jasmine2.js with chrome headless 2017-06-13 14:50:34 +02:00
JC Brand
e907bec4d8 Run tests using chromium headless. 2017-06-13 14:49:23 +02:00
JC Brand
4db2e7bacf Allow settings to be passed in first. 2017-05-23 18:16:07 +02:00
JC Brand
095606a824 roomslist: Add initial test spec for converse-roomslist. 2017-05-16 12:00:43 +02:00
JC Brand
f636fa4855 mock: Allow for settings to be passed in first 2017-05-16 11:56:33 +02:00
JC Brand
07dbf14a7d bookmarks: enable registration of spy on the mock connection during init
We need this because when the plugin listens to a promise, we can't trigger it
again later (after adding our spy), we instead need to add the spy beforehand.
2017-05-08 21:28:56 +02:00
Novokreshchenov Konstantin
7c057910a8 Inconsistent unread messages count updating #873 (#874)
* Consistent unread messages count updating on ChatBoxView, Minimized ChatBoxView, RosterView and page's title

* Add tests for checking unread messages count updates in different GUI parts

* Update docs/CHANGES.md

* document windowStateChanged event in events.rst
2017-05-03 09:06:28 +02:00
JC Brand
f0deac9ec5 Updates #849
Refactor locales code to store the currently chosen locale as
`_converse.locale` and use that in converse-notifications.js
2017-04-19 14:37:52 +02:00
JC Brand
b41d978d00 Update sinon to 2.1.0 and eslint to 3.19.0
Also update clean-css
2017-04-06 23:09:22 +02:00
JC Brand
0c43e4b87c Upgrade to Jasmine 2.5.3 2017-04-06 11:31:05 +02:00
JC Brand
f8d9368163 MUC: only render and listen to 'scroll' event...
after the cached messages have been fetched.
2017-02-27 21:09:17 +00:00
JC Brand
3aa5a83d02 Add a test case based on #785 2017-02-20 20:47:08 +01:00
JC Brand
1a0cb07098 Install sinon via npm. Bump version in package.json 2017-02-14 08:21:05 +01:00
JC Brand
e6f8648bf0 Install jasmine via npm 2017-02-14 07:47:15 +01:00
JC Brand
4dcb855562 Split API into public and private (plugin only) parts. 2017-02-02 18:30:59 +00:00
Richard Icke
343e5777d1 first attempt to replace underscore with lodash 2017-02-01 14:00:38 +01:00
JC Brand
25d9880f9e Add config setting allow_non_roster_messaging
- Add a test case.
- Don't allow passing of `attrs` to `chats.open`. Not sure yet of the
  implications of this.
2017-02-01 10:49:13 +00:00
JC Brand
6c725409c2 converse-muc: Only send the delta when setting the member list.
As required by XEP-0045.

This requires that we first fetch the existing member list, compute the delta
and then send that if there is one.
2016-12-06 15:18:33 +00:00
JC Brand
7ad39cfdb9 Fetch the room information before opening the room. 2016-12-05 06:07:01 +00:00
JC Brand
de07b6a529 No need for two AMD-load cycles. 2016-11-30 12:18:58 +00:00
JC Brand
a5f76abcf1 Updates #729. Minimized chat boxes don't stay hidden
Bug got introduced during fix for #677

Eventually had to do a significant refactoring, to more consistently use the
`hidden` class instead of `display: None`. (relevant for #695)
2016-11-22 17:42:58 +01:00
JC Brand
a2f4acdcee All tests suites now updated and isolated. 2016-11-03 13:59:05 +00:00
JC Brand
50275cce64 Remove shared state between tests
Only a small subset of tests currently working with this.
2016-11-03 13:59:05 +00:00
JC Brand
01c3a50cc2 Add code to generically and recursively update user settings.
Also moved chatview specific settings.
2016-10-26 14:14:49 +02:00
JC Brand
c3456eeede Test fixes.
- Call `_initialize` after tests have run
  Since the tests call `teardDown`, which removes all chatboxes.
- Open controlbox when navigating to panel
2016-10-06 09:00:57 +02:00
JC Brand
052dd19252 Initial work on adding chatroom bookmarks. 2016-10-05 23:15:42 +02:00
JC Brand
dcd1a847bd Fix failing tests.
We now need to mock some extra XMPP stanzas being received when a user enters a chat
room in tests.
2016-07-26 07:12:56 +00:00
JC Brand
454f8ef034 Let converse.initialize return a deferred
and use that in the tests, instead of a callback.
2016-06-10 08:26:38 +00:00
JC Brand
bd23a7751a Add processing hints to OTR messages
so that they're not stored in MAM and not forwarded.

updates #553
2016-05-30 16:52:26 +00:00
JC Brand
c738d085c4 Indicate to the user when there are unread messages
further down in the chat box.
2016-05-28 10:07:11 +00:00
JC Brand
ffcdd09cb7 Add info on using transcripts. 2016-05-24 08:00:07 +00:00
JC Brand
218000551d Add the ability to replay transcripts of chat logs. 2016-04-28 14:58:09 +00:00
JC Brand
d2ee62da71 Make sure that there is a valid connection when login API is called
In the process I had to refactor some methods which required the mock
connection of tests to be changed as well.
2016-04-13 15:11:50 +00:00
JC Brand
f353fe8611 Bugfix for headline messages.
Couldn't handle messages with no "from" attribute.
Some refactoring to add code that checks if a messages is a headline to the
utils module.
Updated tests. Add sinon so that we can test returned value of spy.
2016-03-28 10:51:32 +00:00
JC Brand
82aa9fec2c Support for showing headline messages. 2016-03-21 10:00:10 +00:00
JC Brand
0aa0c02124 Add tests for src/converse-notification.js. updates #443
In the process refactored the code being tested.

- Move notifications code in MUC to src/converse-notification.js
- Trigger the 'contactStatusChanged' event in RosterContact and not in
  ChatBoxView (which might not exist).
2016-03-08 10:44:27 +00:00
JC Brand
0db447a585 Add some tests for the ping feature. 2016-02-19 13:02:42 +00:00