Commit Graph

760 Commits

Author SHA1 Message Date
Abhijeet Kaur af7e08acb0 bots: Add UI to view bot types of existing bots in "Your bots".
Tweaked by tabbott for more standard internationalization.
2017-06-15 10:08:31 -07:00
Steve Howell d2b710b307 Add maybe_show_keyboard_shortcuts().
This prevents some strange UI experiences and some blueslip
errors by not opening keyboard help when other overlays or
popovers are open.
2017-06-15 10:15:29 -04:00
Yago González 1d47a7b505 node tests: Replace stub jQuery with zjquery. 2017-06-15 09:08:40 -04:00
Yago González 98e74db6e8 node tests: Remove unnecessary dependency (hashchange). 2017-06-15 09:08:40 -04:00
Yago González 31d81e2c9b node tests: Add coverage for unexpected exceptions in handleTex. 2017-06-15 09:08:40 -04:00
Yago González 6c0dfa7f8f node tests: Fix format in markdown.js tests.
Replaced 2-space indentation with 4 spaces, and removed a couple
unnecessary newlines.
2017-06-15 09:08:40 -04:00
Yago González 44078a73bf node tests: Add coverage for python_to_js_filter. 2017-06-15 09:08:40 -04:00
Yago González 97a07f311e node tests: Add coverage for add_subject_links. 2017-06-15 09:08:40 -04:00
Yago González ae67f9044d node tests: Add coverage for handleUnicodeEmoji. 2017-06-15 09:08:40 -04:00
Akhil 1bcc0dbd81 org-settings: Add UI for changing the notifications stream.
Added a dropdown in the organization settings page with a search-box and
required styles. Also added an element to disable it. Added a method to
populate the dropdown using list_rendering.js. Also altered response to
the event of deletion of the notifications stream on the frontend. On
selection of a new stream or on clicking 'Disable', a patch request is
made with stream-id to /json/realm.

Fixes: #3708.
2017-06-15 04:08:29 -07:00
Cory Lynch 11a7a476d7 search_suggestion: Add negation support for 'has' operator. 2017-06-15 02:32:00 -07:00
Cory Lynch da4e2954fe search_suggestion: Remove is:private as default suggestion. 2017-06-15 02:20:50 -07:00
Cory Lynch 89b8d07420 Make search suggestion messages more concise.
This involves updating filter.js, mostly. The
tests were updated appropriately for this change,
which also involved changing a caspar test for
narrowing.
2017-06-14 22:34:46 -07:00
Cory Lynch ab5b0e938d Add support for "has" operator in search_suggestions.
This was never a feature in the old search_suggestions
version, so a new helper function for it was added.

Relevant tests were also added, maintaining 100% coverage.
2017-06-14 22:34:46 -07:00
Cory Lynch a7ec8cd1f3 Improve topic in search_suggestion.js.
Also added some additional testing to handle
some edge cases that I'd like to make sure
don't break down.
2017-06-14 22:34:46 -07:00
Cory Lynch 69e8074d14 Improve person/group in search_suggestions.js.
The get_person_suggestions and get_group_suggestions functions
were updated to the new system. Support for negation is also
added in the new system.

Relevant tests were also updated. Also, note that the function
get_private_suggestions was removed, as it was rendered
obsolete by these updates.
2017-06-14 22:34:46 -07:00
Cory Lynch c8d4eff8aa Improve sent_by_me in search_suggestions.js.
Added appropriate tests.
2017-06-14 22:34:46 -07:00
Cory Lynch 79d56c94dc Improve default and special_filter in search_suggestion.js.
Special filter was updated to work even when it is not the first
token in a search query. Furthermore, the default query was
moved around to work with the changes to come for the new
suggestion system.

A test also had to be modified to work with the new system.
2017-06-14 22:34:46 -07:00
Steve Howell 5482a6e129 Add test_narrowing() for stream_list. 2017-06-14 15:29:17 -04:00
Steve Howell dc9ea24d79 zjquery: Add get(). 2017-06-14 15:29:17 -04:00
Steve Howell 7722539504 zjquery: Add better trigger stubbing. 2017-06-14 15:26:41 -04:00
Steve Howell 39e8bed9ef Test stream_list.update_dom_with_unread_counts(). 2017-06-14 12:28:08 -04:00
Steve Howell 499962bb6b Change arg for stream_list.redraw_stream_privacy().
We now pass in a sub, not a stream name.
2017-06-14 11:24:42 -04:00
Steve Howell bc575685a9 Add more test coverage to stream_list.js. 2017-06-14 11:24:20 -04:00
Steve Howell bc5165a54e Add test coverage to stream_list.js. 2017-06-14 09:27:28 -04:00
Steve Howell 5272b6644e zjquery: Support $('<div>').html(). 2017-06-14 08:17:03 -04:00
Harshit Bansal 0e8f1f4e5d alert_words: Fix the UI to not allow users to create duplicate alert words. 2017-06-13 16:37:49 -07:00
Harshit Bansal 947f6e9190 casper_tests: Fix the broken alert words casper tests.
This commit fixes the broken alert word casper tests that were
commented out earlier due to flakes(see issue #1244).

Fixes: #1269.
2017-06-13 16:36:11 -07:00
Harshit Bansal 94fc7dfe20 alert_words_ui: Fix the data flow while removing an alert word.
Add `remove_alert_word()` function which uses the correct data flow
while removing an alert word.

`alert_words_ui.js` was structured differently from most of the other
settings. It was not using the triggers from the server for running
the success/failure handlers.
2017-06-13 16:36:11 -07:00
Steve Howell 66673f508b node tests: Add test_update_count_in_dom(). 2017-06-13 18:37:02 -04:00
Akhil ff9a929d7a typeahead: Remove highlighting and add common template. 2017-06-13 16:16:17 -04:00
Steve Howell 736f4c2930 zjquery: Fix missing wrapper from last commit. 2017-06-12 07:43:04 -04:00
Steve Howell 8da391b51e zjquery: Fix chaining semantics.
We now make it so that $('foo').addClass(whatever) and similar
functions properly return the wrapper object for chaining
purposes.  We may eventually want to change the wrapper object
to automatically dispatch to the first child object, but this
should work for now.
2017-06-12 07:28:23 -04:00
hackerkid a158676fb0 Add function to get last seen status from last active date. 2017-06-11 07:09:21 -05:00
Cory Lynch 12d1086d14 message_list: Add tests for sent_by_me. 2017-06-08 16:48:34 -07:00
Cory Lynch 863c298d3c message_list: Add tests for change_message_id. 2017-06-08 16:48:34 -07:00
Cory Lynch 6ecd7545ae message_list: Add tests for updates. 2017-06-08 16:48:34 -07:00
Cory Lynch d1e1e69abe message_list: Add tests for message_range. 2017-06-08 16:48:34 -07:00
Cory Lynch e229f79474 message_list: Add tests for add/remove and rerender. 2017-06-08 16:48:34 -07:00
Cory Lynch 537ae79398 message_list: Add tests for unmuted messages. 2017-06-08 16:48:34 -07:00
Cory Lynch 0f848b1770 message_list: Add tests for bookend. 2017-06-08 16:48:34 -07:00
Cory Lynch 4bd28a3ff3 message_list: Add more basic tests. 2017-06-08 16:48:34 -07:00
Joshua Pan ccd880094e util.js: Refactor util.strcmp into util.make_strcmp. 2017-06-07 19:45:46 -05:00
Joshua Pan 2bf48e58aa node tests: Get util.js to 100% node coverage. 2017-06-07 19:45:46 -05:00
Joshua Pan 9d862ab3d3 node tests: Make util.js use zjquery. 2017-06-07 19:45:46 -05:00
Umair Khan 520d1de052 12-toggle-message-editing.js: Remove waitForText. 2017-06-07 13:41:59 -07:00
Umair Khan 591098cd27 11-mention.js: Remove waitForText. 2017-06-07 13:41:59 -07:00
Umair Khan 33e46af898 08-edit.js: Remove waitForText. 2017-06-07 13:41:59 -07:00
Umair Khan 5ae822fc54 07-stars.js: Remove waitForText. 2017-06-07 13:41:59 -07:00
Umair Khan fe8204f1f0 05-subscriptions.js: Remove waitForText. 2017-06-07 13:41:59 -07:00