Commit Graph

725 Commits

Author SHA1 Message Date
Harshit Bansal
6615f2f2e8 common.js: Migrate common.js module to use IIFE module style.
This module was exposing its functions as globals. This PR fixes
it use the IIFE module style that we use in our other modules.
2017-06-22 19:06:32 -04:00
Cory Lynch
df83cee86b people.js: Ignore diacritics in search bar.
Fixes #5315
2017-06-21 19:13:44 -04:00
Yago González
e7bd18ec09 timerender: Make get_full_time produce a ISO 8601 date string.
Having get_full_time produce a date string non-compliant with RFC2822 or
ISO 8601 caused problems when showing edition timestamps on a message's
edit history.

Now it returns an ISO 8601 date string (1978-10-31T13:37:42Z).
2017-06-21 16:46:39 -04:00
Cynthia Lin
e832ebdc98 hotkeys: Add collapse/show message hotkey.
Fixes #4540
2017-06-21 15:54:09 -04:00
Cynthia Lin
a9afe43735 hotkeys: Add u hotkey for opening message sender profile.
Fixes #4873
2017-06-21 10:38:05 -04:00
Joshua Pan
1e4c133430 node tests: Test sort_recipientbox_typeahead() in typeahead_helper.js. 2017-06-21 00:03:05 -04:00
Joshua Pan
b48f8447e2 node tests: Fully cover compare_by_pms() in typeahead_helper.js. 2017-06-21 00:03:05 -04:00
Joshua Pan
1c34a3ae54 node tests: Fully cover sort_streams() in typeahead_helper.js. 2017-06-21 00:03:05 -04:00
Joshua Pan
ffde90fcd1 node tests: Add tests for sort_emojis() in typeahead_helper.js. 2017-06-21 00:03:05 -04:00
Joshua Pan
0563337240 node tests: Fully cover split_by_subscribers() in typeahead_helper.js. 2017-06-21 00:03:05 -04:00
Joshua Pan
a53a4b7f0d node tests: Add tests for render stream typeahead item. 2017-06-21 00:03:05 -04:00
Joshua Pan
7a93a425f8 node tests: Add tests for render person typeahead item. 2017-06-21 00:03:05 -04:00
Joshua Pan
ee48ac1854 node tests: Fully cover compare_by_popularity() in typeahead_helper.js. 2017-06-21 00:03:05 -04:00
Joshua Pan
649558476e node tests: Get rid of typeahead_helper dependency.
This also puts the global tests into their
own specific tests, which then allows us to
get rid of the typeahead_helper dependency.
2017-06-21 00:03:05 -04:00
Cory Lynch
6d90d7ccbb people.js: Ignore own email address in group PMs. 2017-06-20 21:22:45 -04:00
Aditya Bansal
4c8e4eea4e user_events.js: Make node test coverage reach 100%. 2017-06-20 20:57:10 -04:00
Cory Lynch
ff9498f85b bookend: Hide re-subscribe button for private streams.
Fixes #5181
2017-06-20 20:56:26 -04:00
Joshua Pan
5e611826da node tests: Call settings_bot.set_up() to get initial line coverage. 2017-06-20 19:49:23 -04:00
vaibhav
9a6e326305 Add support for generating and downloading flaskbotrc.
Flaskbotrc is a file containing config of all active
outgoing webhook bots. It is used to provide configuration
of all active outgoing webhook bots to zulip-bot-server.
2017-06-20 09:43:45 -04:00
Cory Lynch
005d06eb38 message_store.js: Add tests for message id change.
This gets message_store.js to 100% line coverage.
2017-06-20 06:24:27 -04:00
Cory Lynch
10b86da128 message_store.js: Add tests for erorrs/edge cases. 2017-06-20 06:24:27 -04:00
Cory Lynch
24b9108d09 message_store.js: Increase coverage for add_message. 2017-06-20 06:24:27 -04:00
Steve Howell
6c722843ef node tests: Fix namespace leaks related to require().
The node tests have purged modules from cache that were
included via things like set_global(), but calling require
directly would leak modules into the next test, which made
a couple tests only work when you ran the whole suite.  I
fixed those tests to work standalone.  And then I now make
dependencies explicitly clear the require cache before we
require them in namespace.js.
2017-06-19 22:36:58 -04:00
Vishnu Ks
9b16835c99 user_popover: Handle the case when user presence is unknown.
For bots and users who have not logged in for a long time the presence information is not known. For the these users make the presence indicator hidden.
2017-06-19 17:25:06 -04:00
Joshua Pan
ecaf628d76 node tests: Add test_set_user_status(). 2017-06-19 08:00:55 -04:00
Joshua Pan
a71a8d2343 node tests: Fully cover status_from_timestamp in presence.js. 2017-06-19 08:00:55 -04:00
Joshua Pan
8011212384 node tests: Fully cover update_info_for_small_realm in presence.js. 2017-06-19 08:00:55 -04:00
Joshua Pan
65c68d385e node tests: Add test_last_active_date(). 2017-06-19 08:00:55 -04:00
Joshua Pan
71dab26c84 node tests: Fully cover test_set_info in presence.js. 2017-06-19 08:00:55 -04:00
Cory Lynch
7f8ecb62c9 fenced_code.js: Improve coverage to 100%. 2017-06-19 06:53:25 -04:00
Cory Lynch
58a2ffbe1d Add search suggestion support for is:unread. 2017-06-19 06:51:13 -04:00
Cory Lynch
86d3e00bd0 Add search support for is:unread.
Fixes #1423.
2017-06-19 06:51:13 -04:00
Steve Howell
7e99262331 Add tests to settings_org.js.
This gets about 80% line coverage.
2017-06-16 18:57:07 -04: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