zulip/frontend_tests/node_tests
Steve Howell 6b39d6004e zjquery: Use Proxy to detect undefined stubs.
We now use a Proxy to wrap zjquery elements, so
that we can detect callers trying to invoke methods
(or access attributes) that do not exist.  We try
to give useful error messages in those cases.

The main impact here is that we force lots of tests
to explicitly stub `length`.

Also, we can't do equality checks on zjquery
objects any more due to the proxy object, but the
easy workaround is to compare selectors.  (This
is generally an unnecessary technique, anyway.)

The proxy wrapper is fairly straightforward, and
we just have a few special cases for things like
"inspect" that happen when you try to print out
objects.
2019-05-20 11:28:32 -07:00
..
.eslintrc.json lint: Add JS indentation eslint rules for node_tests. 2018-05-06 19:35:18 -07:00
activity.js ui: Replace set_up_scrollbar with data-simplebar attribute. 2019-05-19 18:06:38 -07:00
alert_words_ui.js tests: Test closing alert word status msg. 2018-07-23 14:53:49 -04:00
alert_words.js node tests: Consolidate some set_global() calls. 2018-08-02 08:02:12 -04:00
billing_helpers.js billing: Use underscore built in contains function. 2019-01-08 10:47:35 -08:00
billing.js billing: Add node test for billing.js. 2019-01-08 10:47:35 -08:00
bot_data.js lint: Fix comma spacing in node tests. 2018-12-07 13:14:28 -08:00
buddy_data.js user status: Change Active now to Online now in full user profile. 2019-03-14 15:19:09 -07:00
buddy_list.js Completely replace perfect-scrollbar with SimpleBar. 2019-05-17 12:06:51 -07:00
channel.js node tests: Consolidate some set_global() calls. 2018-08-02 08:02:12 -04:00
color_data.js stream_color: Make stream color assignment more efficient. 2018-11-29 13:00:25 -08:00
colorspace.js Add run_test helper for individual tests. 2018-05-15 08:24:44 -07:00
common.js node tests: Consolidate some set_global() calls. 2018-08-02 08:02:12 -04:00
components.js components: Add disable_tab attribute. 2019-05-13 17:27:32 -07:00
compose_actions.js quote/reply: Leave message intact for IE/Chrome. 2019-01-23 10:57:40 -08:00
compose_fade.js subject -> topic: Rename compose fields. 2018-12-09 21:28:45 -08:00
compose_pm_pill.js compose pill: Add has_unconverted_data() helper. 2018-10-12 11:20:30 -07:00
compose_ui.js compose: Fix buggy escaping of LaTeX in quote-and-reply. 2019-04-13 10:52:44 -07:00
compose.js zjquery: Use Proxy to detect undefined stubs. 2019-05-20 11:28:32 -07:00
composebox_typeahead.js typeahead_helper: Add sorter function for slash commands. 2019-03-21 13:33:27 -07:00
copy_and_paste.js paste: More robust check to verify if clipboard data is an image. 2019-01-25 11:40:33 -08:00
dict.js Add run_test helper for individual tests. 2018-05-15 08:24:44 -07:00
dispatch.js settings: Add option for fixed/fluid width. 2019-05-09 13:57:57 -07:00
drafts.js zjquery: Use Proxy to detect undefined stubs. 2019-05-20 11:28:32 -07:00
emoji_picker.js emoji: Move emoji_collection from emoji picker to emoji.js. 2018-07-23 12:35:08 -07:00
emoji.js emoji: Change fallback emojiset for text emojiset. 2018-09-21 18:34:12 -07:00
fetch_status.js message_fetch: Deduplicate logic for finish_newer_batch. 2018-12-13 08:43:56 -08:00
filter.js frontend: Use topic on message. 2019-01-07 19:20:56 -08:00
general.js frontend: Use topic on message. 2019-01-07 19:20:56 -08:00
hash_util.js frontend: Use topic on message. 2019-01-07 19:20:56 -08:00
hashchange.js settings: Streamline how we launch settings. 2018-12-07 11:40:56 -08:00
hotkey.js copy_and_paste: Bind default copy handler to hotkeys. 2019-05-13 17:58:12 -07:00
i18n.js settings: Update tip in Notifications tab. 2019-04-23 15:24:39 -07:00
input_pill.js input pills: Fix modal gets closed when user click on remove-pill-btn. 2018-11-28 16:33:08 -08:00
keydown_util.js keydown_util: Ignore alt-arrow and similar things. 2018-12-04 12:24:39 -08:00
lightbox.js thumbnails: Rename data-original to data-src-fullsize. 2018-07-30 13:00:23 -07:00
list_cursor.js node tests: Bring list_cursor to 100% coverage. 2018-08-24 10:00:04 -07:00
list_render.js list_render: Extend test to verify that list sorting is case insensitive. 2019-04-21 16:09:02 -07:00
markdown.js tests: Fix accidental uses of assert() -> assert.equal(). 2019-02-20 10:41:42 -08:00
message_edit.js message_edit: Allow editing topics indefinitely. 2018-12-04 17:41:21 -08:00
message_events.js frontend: Use topic on message. 2019-01-07 19:20:56 -08:00
message_fetch.js Refactor: Split up add_messages api. 2019-01-07 17:17:55 -08:00
message_flags.js message_flags: Batch read flag requests to at most 1k message IDs at a time. 2019-05-15 17:56:48 -07:00
message_list_data.js frontend: Use topic on message. 2019-01-07 19:20:56 -08:00
message_list_view.js message_list_view: Move edited position conditionals to JS. 2019-05-06 21:37:54 -07:00
message_list.js frontend: Use topic on message. 2019-01-07 19:20:56 -08:00
message_store.js message_store: Add an each helper. 2019-02-25 21:12:07 +00:00
muting.js page load: Fix two bugs related to muting/unreads. 2018-12-15 13:44:30 -08:00
narrow_activate.js compose: Fix narrow button text when switching to PM. 2019-03-11 21:58:05 -07:00
narrow_local.js frontend: Use topic on message. 2019-01-07 19:20:56 -08:00
narrow_state.js filter: Eliminate a few "subject" references. 2018-12-29 11:38:39 -08:00
narrow_unread.js frontend: Use topic on message. 2019-01-07 19:20:56 -08:00
narrow.js node: Fix a node test broken by recent narrowing fix. 2019-03-08 13:31:29 -08:00
notifications.js frontend: Use topic on message. 2019-01-07 19:20:56 -08:00
password.js Add run_test helper for individual tests. 2018-05-15 08:24:44 -07:00
people_errors.js minor: Change error to warning for missing user ids. 2018-10-29 12:57:15 -07:00
people.js org_settings: Fix error with undefined profile_field in bot settings. 2019-04-25 15:56:44 -07:00
pm_conversations.js Add run_test helper for individual tests. 2018-05-15 08:24:44 -07:00
pm_list.js zjquery: Use Proxy to detect undefined stubs. 2019-05-20 11:28:32 -07:00
popovers.js user popover: Pop user menu closer to avatar. 2019-03-08 15:24:01 -08:00
presence.js presence: Use people.is_my_user_id() for check. 2019-01-03 13:49:44 -08:00
reactions.js emoji: Move emoji_collection from emoji picker to emoji.js. 2018-07-23 12:35:08 -07:00
recent_senders.js frontend: Use topic on message. 2019-01-07 19:20:56 -08:00
rtl.js rtl.js: Fix support for supplementary planes of unicode characters (>= U+10000). 2018-08-14 11:39:29 -07:00
schema.js lint: Fix comma spacing in node tests. 2018-12-07 13:14:28 -08:00
scroll_util.js Completely replace perfect-scrollbar with SimpleBar. 2019-05-17 12:06:51 -07:00
search_legacy.js Simplify narrow/search interactions. 2018-10-24 16:54:35 -07:00
search_pill.js tests: Fix accidental uses of assert() -> assert.equal(). 2019-02-20 10:41:42 -08:00
search_suggestion_legacy.js search: Duplicate search_suggestions.get_suggestions. 2018-07-23 11:29:10 -07:00
search_suggestion.js search: Do not display All messages suggestion if bar not empty. 2018-07-23 11:29:10 -07:00
search.js Revert "search: Open typeahead on empty string only if lookup triggered by Tab." 2018-12-04 13:58:00 -08:00
server_events.js notification: Show wrong narrow notification for non locally echoed message. 2019-02-13 15:51:41 -08:00
settings_bots.js eslint: Add key-spacing linter rule. 2018-12-18 10:41:06 -08:00
settings_muting.js muting: Use stream_id in muting.get_muted_topics(). 2018-12-14 16:05:37 -08:00
settings_org.js models: Alter video_chat_provider field type to integer. 2019-05-13 12:02:28 -07:00
settings_profile_fields.js custom profile field: Minor tweaks in field-table in admin settings. 2018-08-21 11:42:59 -07:00
settings_user_groups.js typescript: Migrate dict.js to typescript. 2019-03-21 10:48:44 -07:00
stream_data.js streams: Hide unsubscribed streams in settings to guest users. 2019-05-13 17:27:32 -07:00
stream_events.js server events: Add realm-time-sync event to update stream privacy. 2019-05-07 17:33:59 -07:00
stream_list.js zjquery: Use Proxy to detect undefined stubs. 2019-05-20 11:28:32 -07:00
stream_search.js left sidebar: Fix closing stream search. 2019-02-25 09:47:44 -08:00
stream_sort.js eslint: Enable no-extra-parens rule. 2018-06-11 07:51:24 -04:00
submessage.js submessages: Add update_message() function. 2018-05-30 14:47:36 -07:00
subs.js Completely replace perfect-scrollbar with SimpleBar. 2019-05-17 12:06:51 -07:00
support.js support: Add support for scrubbing realm. 2019-05-06 20:12:54 -07:00
templates.js subscriptions: Migrate notification setting defaults model. 2019-05-08 17:45:10 -07:00
timerender.js lint: Fix comma spacing in node tests. 2018-12-07 13:14:28 -08:00
top_left_corner.js top left: Simplify markup for main links. 2019-01-30 13:53:20 -08:00
topic_data.js frontend: Use topic on message. 2019-01-07 19:20:56 -08:00
topic_generator.js zblueslip: Convert node_tests/topic_generator.js to zblueslip. 2018-07-10 16:22:52 -04:00
topic_list.js streams: Avoid showing more topics option when it's useless. 2019-03-14 21:51:24 -07:00
transmit.js frontend: Use topic on message. 2019-01-07 19:20:56 -08:00
typeahead_helper.js typeahead_helper: Add sorter function for slash commands. 2019-03-21 13:33:27 -07:00
typing_data.js Add run_test helper for individual tests. 2018-05-15 08:24:44 -07:00
typing_status.js Add run_test helper for individual tests. 2018-05-15 08:24:44 -07:00
ui_init.js zjquery: Use Proxy to detect undefined stubs. 2019-05-20 11:28:32 -07:00
ui.js hotkey: Update test for hotkey deprecation. 2018-09-21 10:59:55 -07:00
unread.js frontend: Use topic on message. 2019-01-07 19:20:56 -08:00
upgrade.js billing: Add node tests for upgrade.js. 2019-02-04 22:37:05 -08:00
upload.js uploads: Remove unusable UI elements if file uploading is disabled. 2019-05-08 17:10:07 -07:00
user_events.js custom profile fields: Markdown rendering for custom profile field values. 2019-01-01 21:06:21 -08:00
user_groups.js typescript: Migrate dict.js to typescript. 2019-03-21 10:48:44 -07:00
user_pill.js pills: Enable user avatar images for user pills. 2018-07-10 15:07:56 +05:30
user_status.js user status: Add ability to edit status text. 2019-01-29 10:27:49 -08:00
util.js message_edit_history: Add UI for seeing topic edits. 2019-03-25 15:10:47 -07:00
voting_widget.js poll_widget: Add highlight for vote count if current user votes. 2019-03-01 16:35:18 -08:00
widgetize.js poll-widget: Refactor comment to option. 2019-01-29 09:34:14 -08:00
zblueslip.js zblueslip: Add exception_msg and wrap_function functions. 2018-07-10 16:22:52 -04:00
zjquery.js docs: Explain stubbing for node tests. 2019-04-13 22:45:22 -07:00