Commit Graph

119 Commits

Author SHA1 Message Date
JC Brand
f897703565 Rename emit to trigger for consistency with Backbone.Events 2019-03-29 21:56:56 +01:00
JC Brand
7481643453 Validation error when trying to add an already existing contact 2019-03-28 15:54:47 +01:00
JC Brand
34b8cd2ee6 Prevent user from adding themselves as contact 2019-03-28 15:36:08 +01:00
JC Brand
cc865de0f0 Add new config setting autocomplete_add_contact
Determines whether search suggestions are shown in the "Add Contact" modal.
2019-03-28 14:34:12 +01:00
JC Brand
75ae76ad93 Use _converse.AutoComplete in "Add Contact" modal 2019-03-28 10:47:14 +01:00
JC Brand
69632f243a Remove jQuery from spec/controlbox.js 2019-03-01 11:56:22 +01:00
JC Brand
9f5031c278 Make converse.initialize an async function
- Combine all test init functions into `initConverse`
- Use `async` functions in more tests
- Replace `var` with `let` and `const` in more tests
- New utils method `toStanza` which converts a string to a Node
2019-02-12 15:34:50 +01:00
JC Brand
2857293ad1 Fix failing tests by waiting and slightly improve code 2018-12-06 13:10:34 +01:00
JC Brand
4e6ac905b8 Async/await in controlbox tests 2018-11-26 12:58:06 +01:00
JC Brand
e07bb52d2a Use async/await 2018-11-18 18:05:46 +01:00
JC Brand
9bc8bdf34c Test updates after updating to use latest strophe.js
`toLocaleString` now returns element attributes in alphabetical order
(for better cross-browser consistency).

Also, `toLocaleString` is now used in favor of `outerHTML` because
browsers aren't consistent with one another in their output.
2018-10-03 21:11:20 +02:00
JC Brand
ca9229a906 createMessage now returns a promise.
Also, fix all broken tests, mostly related to this.
2018-08-18 17:12:22 +02:00
JC Brand
1443fdd447 (WIP) Wait for promises before opening chats in API methods 2018-08-01 11:10:43 +02:00
JC Brand
596082eecc Get tests to run agains the webpack build 2018-06-03 16:40:20 +02:00
JC Brand
c01e9f8265 Move methods from chatbox view to message view
Specifically the methods related to requesting an upload slot and uploading a file.
Also show a progress indicator while a file is being uploaded.

Updates #161
2018-04-17 15:21:38 +02:00
JC Brand
4f2b040f22 Allow setting a nickname when adding a roster contact 2018-03-30 14:22:51 +02:00
JC Brand
95406a149d Re-add xhr_user_search_url and autocomplete when adding contacts 2018-03-30 14:22:51 +02:00
JC Brand
2977643bf7 Fix failing tests 2018-03-18 03:35:34 +00:00
JC Brand
11f02f78fe Fix more failing tests 2018-03-17 18:54:19 +00:00
JC Brand
ca141401a0 Fix failing tests 2018-03-13 13:42:00 +01:00
JC Brand
4652385bb4 Remove jQuery from non-tests config 2018-01-04 12:11:03 +00:00
JC Brand
671691353a Use Backbone.NativeView instead of Backbone.View 2018-01-03 20:41:03 +00:00
JC Brand
c6d2108024 Let RosterView also be an OrderedListView 2017-12-22 15:53:03 +00:00
JC Brand
b5e7bd5605 Move roster tests into their own module 2017-12-22 14:39:29 +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
6c6ef1f1f9 Refactoring of the roster view.
* Removed the dependency on jQuery
* Contacts are now shown inside a group element, simplifying the code
2017-12-19 18:44:31 +00:00
JC Brand
8662f751e3 Refactor converse-vcard and add API method to fetch a VCard 2017-12-02 18:01:56 +01:00
JC Brand
add3b8efb3 utils now no longer depends on jquery. 2017-08-16 09:05:15 +02:00
JC Brand
16d62bf9e4 Fix broken tests due to using ES2015 promises 2017-07-11 17:05:02 +02:00
JC Brand
02e5921415 Fix problem of stuck/hanging tests on TravisCI 2017-06-19 15:05:22 +02:00
JC Brand
a128a70d41 Discriminate between which unread messages to indicate per tab 2017-06-07 00:55:57 +02:00
JC Brand
f897fbb7c0 Show number of unread mesages on the "Contacts" tab 2017-06-05 21:42:25 +02:00
JC Brand
5949ca9e36 Show number of unread messages on the "Rooms" tab 2017-06-05 14:52:24 +02:00
JC Brand
b32a8c5391 Update and simplify HTML/CSS for choosing status
Should also fix some of the issues mentioned in #847
2017-05-08 21:25:22 +02:00
JC Brand
c81599931c Fix failing tests based on recent unread message changes 2017-04-24 15:57:22 +02:00
JC Brand
f3373c44fd Fixes #850. .where method doesn't match numbers. 2017-04-21 18:06:28 +02:00
JC Brand
d2eadbdce4 Use classList API 2017-04-06 23:21:52 +02:00
JC Brand
0c43e4b87c Upgrade to Jasmine 2.5.3 2017-04-06 11:31:05 +02:00
Anshul Singhal
3dd6ff1751 Fixes the duplication bug in adding contact and adds test for the same 2017-03-08 15:33:43 +01: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
51fc401a24 Fix failing tests due to new defaults. 2017-02-17 09:45:34 +00:00
JC Brand
fe6a9ca748 Merge converse-api and converse-core
Otherwise `require('converse-core')` can be called, exposing the inner converse
object.
2017-02-14 14:35:52 +00:00
JC Brand
b7b9711296 Rename the closured converse object to _converse
to indicate that it's private and to differentiate it from the outer "global"
converse object.
2017-02-02 18:34:13 +00:00
JC Brand
4dcb855562 Split API into public and private (plugin only) parts. 2017-02-02 18:30:59 +00:00
JC Brand
3494691286 Fix failing tests
after allowing chatting with pending/requesting contacts
2017-02-02 16:37:41 +01:00
JC Brand
081f075aa9 Add eslint with lodash checking and apply its suggestions 2017-02-01 14:02:18 +01: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
c3b2a913bb Don't open the controlbox on requesting contacts.
Can get annoying very quickly
2016-11-22 17:41:57 +01:00