Commit Graph

4788 Commits

Author SHA1 Message Date
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
Joshua Pan
bbc0103183 drafts.js: Create initialize() function. 2017-06-07 00:01:55 -07:00
Cory Lynch
60b62ac81d typeahead_helper: Add test coverage for highlighting.
Specificially, the test_highlight_with_escaping, used in
most of our typeaheads.
2017-06-06 21:19:28 -07:00
David Coleman
13915740bb refactoring: use class attr to identify timerender date <span>.
The floating_recipient_bar is cloned from recipient_bar elements.
The cloning created elements in the DOM with duplicate id
attributes, specifically <span id="timerender{id}">, which
contains the date of the message stream. The timerender span
will now use class="timerender{id}" instead.

Fixes #4997.
Fixes #5128.
2017-06-06 20:01:21 -07:00
Jack Zhang
84e5fe733c message-editing: Show date lines between edits from different days.
Added show_date_row field to each item of content_edit_history.
We use date lines to separate events that happened on different days.

Fixes #4638.
2017-06-06 11:04:30 -07:00
Tim Abbott
b89be3f54b bookend: Make ordering of subscribe bookends consistent.
Previously, if we had both a date and a subscribe bookend, they would
appear in one order after new messages were sent (bookend_bottom of
the top group), and another after a reload (bookend_top of the bottom
group).  This makes the experience consistently a bookend_top.
2017-06-05 16:43:26 -07:00
Cory Lynch
080a3b9286 Add test coverage for 'stream_sort.js'.
Added new file to test stream sort. Specifically,
it tests the `sort_group` function's ability to put
streams into the corect pinned/normal/dormant category,
filter them based on keyword, and sort alphabetically.
2017-06-02 18:13:33 -06:00
Cory Lynch
5d7828096e Split out server_events_dispatch.js from server_events.js. 2017-06-02 16:49:18 -07:00
Steve Howell
ed9eca90f2 node tests: Isolate timerender.js from i18n/jquery.
This makes the test run a lot faster, and it fixes
some leaky behavior where the test used to work only
when other tests ran before it.
2017-06-02 14:18:51 -07:00
Steve Howell
0aaa182fbe node test: Use zjquery to test stream_list.js.
We use zjquery now for testing stream_list.js, which runs faster
than the real jQuery and allows some test isolation.  The nature
of the test is basically the same, but we don't actually render
templates.  Instead of making assertions about the DOM, we are
now making assertions about how the stream lists get constructed
from other elements.
2017-06-02 14:11:11 -07:00
Steve Howell
5dad7372f9 minor: Remove unneeded render in template tests.
(We have had ways to track partial templates for a while.)
2017-06-02 14:11:11 -07:00
Joshua Pan
3905602da5 node tests: Test user timezone functions in people.js. 2017-06-02 06:30:40 -06:00
Steve Howell
1a4c8a598d tests: Add more coverage to narrow_state.js in test_stream(). 2017-06-01 22:14:11 -07:00
Steve Howell
8a39e67876 node tests: Extract narrow_state tests to new module. 2017-06-01 22:14:11 -07:00
Joshua Pan
52518fbc29 node tests: Get people.js to 100% node coverage. 2017-06-01 20:27:58 -07:00