Commit Graph

1102 Commits

Author SHA1 Message Date
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
Umair Khan
0c952dca73 04-compose.js: Remove waitForText. 2017-06-07 13:41:59 -07:00
Umair Khan
e4f6f53e74 casper: Add waitForSelectorText.
Fixes #1110
2017-06-07 13:41:59 -07:00
Jack Zhang
98a785bb25 message_edit: Replace highlighting replaced text with delete / insert.
Rationale: For the more off-to-the-side edit history view, changes
are easier to digest by highlighting deleted content in red followed
immediately by added and changed content in green.

TODO: Toggle for showing the edited messages without highlighting;
deleted content would not be shown in this view.
2017-06-07 11:06:15 -07:00
Steve Howell
ce1dd9f50b presence: Do not show bots in the buddy list.
(Before this fix, we were showing empty circles for bots
in small realms.)
2017-06-07 10:36:26 -06:00
Joshua Pan
6a5c01a36e node tests: Get unread.js to 100% node coverage. 2017-06-07 03:23:57 -06:00
Joshua Pan
0a56156017 node tests: Get stream_sort.js to 100% node coverage. 2017-06-07 03:23:57 -06:00
Joshua Pan
9f9cb618c9 node tests: Get recent_sender.js to 100% node coverage. 2017-06-07 03:23:57 -06:00
Joshua Pan
a6efbddd65 node tests: Test drafts_overlay_open(). 2017-06-07 00:02:14 -07:00