Steve Howell
49a55ca6fa
Call blueslip.warn from stream_data.js functions.
...
It used to be calling blueslip.warning(), i.e. the wrong name,
and would crash.
(imported from commit ddc953488cdb22dd37ddf674dddf1e05f34eaec9)
2013-09-24 16:19:53 -04:00
Steve Howell
660475bd0c
Hide muted messages.
...
Instead of collapsing muted messages, just hide them altogether
in view where it makes sense to hide them.
(imported from commit 1c2c987ff302ceb135a025753cf421b4de1aea71)
2013-09-23 10:53:06 -04:00
Steve Howell
022ef6e9b9
Add narrow.muting_enabled()
...
(imported from commit 8972d1e3ca347397664094a7f150ec86fd2f8f8e)
2013-09-23 10:53:06 -04:00
Steve Howell
e79e74ade4
Add narrowed_to_topic() helper function.
...
(imported from commit 9190caa9b183893fb7ae883686b9bdbd661d5895)
2013-09-19 15:41:00 -04:00
Steve Howell
a4e2ed9fd2
Add test_narrowed() to narrow.js unit tests.
...
(imported from commit 060032ac00d0c28a9625e2885ee3156bc94ff130)
2013-09-19 15:40:59 -04:00
Steve Howell
51b8caf442
Add set_filter() to narrow unit tests.
...
(imported from commit 60734fa1a9d0d28e8c0277a41cc69186bc2b6c0e)
2013-09-19 15:40:59 -04:00
Steve Howell
c6a9297f1a
Add blueslip warnings to stream_data functions.
...
Warn inside these functions when you get data on streams that you
are not subscribed to:
add_subscriber
remove_subscriber
user_is_subscribed
The back end should be smart enough not to spam us with subscriber
info that we don't care about.
(imported from commit b27644be2abc37c11ddff884ef392ea208bd1bd3)
2013-09-19 08:52:54 -04:00
Steve Howell
e1b881629c
Use fold_case:true for subscribers Dict
...
(imported from commit 8acc794cb5369baadef512a9fcdb3537231dd604)
2013-09-17 10:32:13 -04:00
Steve Howell
4b90f1685d
Add stream_data.set_subscribers() method.
...
This allows us to encapsulate our use of Dict for the internal
data structure.
(imported from commit e8acc50b4c17d339015cb9db9939b9452a62cc8b)
2013-09-17 10:32:11 -04:00
Steve Howell
e83c026a27
Set focus-related flags correctly after a server reload
...
(imported from commit 408469c0da0cfa5513e6838329816cd88665981f)
2013-09-16 12:29:34 -04:00
Steve Howell
5eaeddea12
Get stream_data.js back to 100% coverage
...
(imported from commit 5b82a10d50b6599c0c42604fe86275b21f9a6396)
2013-09-12 17:23:52 -04:00
Steve Howell
0165dc54ad
Create blueslip error for undefined keys in Dict.
...
We create a blueslip error for undefined keys in Dict. This led
to a straightforward change in the unit tests for Dict. For the
unread test, to avoid the blueslip error, we had to be more specific
in setting up a user in one place, but this reduced our coverage,
leading to another small test being added.
(imported from commit 33e14795500d9283de2a7c03c4c58aec11cea4b8)
2013-09-11 18:07:37 -04:00
Steve Howell
9eefc8ae62
Test fold_case option of Dict
...
(imported from commit 630643767a21818c1ef4adb557c794e560783c3e)
2013-09-11 18:07:37 -04:00
Steve Howell
e9adaaa0c0
Avoid Dict crashes for undefined keys when fold_case is true.
...
The exceptions were cryptic before, and they were inconsistent with
the fold_case: false behavior.
(imported from commit a40704d1a22bcdc60d91be832ee3c81eb416c6dd)
2013-09-11 18:07:37 -04:00
Steve Howell
a8ebd80c89
Test that vanilla Dict handles undefined keys
...
(imported from commit 09846eafa55f2321ca10db950ad3785ce78ae2c6)
2013-09-11 18:07:37 -04:00
Steve Howell
c6131b630b
Handle undefined keys in muting.is_topic_muted
...
(imported from commit 96a9f0253e1c0e72a2b05577118dac438d190994)
2013-09-11 16:47:36 -04:00
Steve Howell
f616148181
Make muting case insensitive for streams and topics
...
(imported from commit 6e731a5305a6d19896c61300aedf0fb4a387e148)
2013-09-11 16:47:36 -04:00
Steve Howell
0641e693fa
Add muting.set_muted_topics
...
(imported from commit c84cd085e513d57e3913543d40cd8fd6b5d45b67)
2013-09-11 16:47:36 -04:00
Steve Howell
04c6a8198a
Add muting.get_muted_topics
...
(imported from commit 5edb1d36ae66dfc42cf534edc452959df8306661)
2013-09-11 16:47:36 -04:00
Steve Howell
8626276dc3
Add muting.unmute_topic
...
(imported from commit c3aa08b7d50c70cba86b43c12d618ba1d96832b4)
2013-09-11 16:47:35 -04:00
Kevin Mehall
7fea9e0755
Fix race condition in 06-unread
...
There was nothing to ensure that the changes resulting from scrolling
happened before the unread counts were checked. We already had a long
wait there; might as well do those checks after it to ensure that the
DOM is updated.
(imported from commit 0d4014ae6a74dd684521fecabefc4bf79015f842)
2013-09-10 18:06:57 -04:00
Kevin Mehall
5991b0003f
Fix 06-unread PM count selector for changes in 2b82fbb
...
(imported from commit 0d8e52f17fb06092efff7cdf4fc4b01ab4901e2f)
2013-09-10 18:06:57 -04:00
Leo Franchi
a1d7e6336c
Add stub for .on() in activity test
...
(imported from commit 82727e18739cb8bed7b2c64f8013e7f0fe386b94)
2013-09-10 13:25:59 -04:00
Steve Howell
5bcc403ea4
Add filter tests for is:alerted predicate
...
(imported from commit 077fdab5437f498f015da7ed81a77036c9ff6361)
2013-09-10 13:13:18 -04:00
Scott Feeney
17cad06a2d
Add Dict.from_array()
...
(imported from commit 0650edb2217afa2c37be1bbc4f9e2ac40f4c0e2c)
2013-09-06 23:13:47 -04:00
Leo Franchi
663fd4653f
Feature-flag alert words to staging + reddit
...
(imported from commit 1fe9c596b26ce6676514719e4ed2e185108685cb)
2013-09-05 10:21:39 -04:00
Leo Franchi
41b286232d
Allow filtering to alerted messages with is:alerted
...
(imported from commit 99834f1ee1b9b2e0f5c7427afa1494bf404e3626)
2013-09-05 10:18:41 -04:00
Leo Franchi
897dd87b94
Add a span around alert words to mark them visually
...
(imported from commit 9b8fbbd957086f1eeaa3409e5830aa6d7974fbe8)
2013-09-05 10:18:40 -04:00
Steve Howell
1e88bb914e
Add test_private_suggestions() to search_suggestion.js
...
(imported from commit db89f8574a4f7e169e66ebaff3a9c2cd49a4b0dc)
2013-08-28 17:41:17 -04:00
Steve Howell
8363b7c59a
Add test_subset_suggestions() to search_suggestion.js
...
(imported from commit db9173ffa92ca225baf24a1103807034e4f31a7f)
2013-08-28 17:41:16 -04:00
Steve Howell
857680102f
Remove enforce_arity checks from Dict
...
(imported from commit 8fdb6d8807e5c16349c7fcf71f25ce73348a5fe1)
2013-08-28 12:29:11 -04:00
Jessica McKellar
b27f27f932
node tests: add some asserts for stream_data.delete_sub.
...
(imported from commit 3428f32206105b240e230e1050e7c16cd9c3729c)
2013-08-28 10:24:52 -04:00
Steve Howell
667372068c
Add idempotency test coverage for muting.js
...
(imported from commit 50496866fa11df433150ff28f0f1e58e9e8b33bc)
2013-08-27 15:40:54 -04:00
Allen Rabinovich
2bb6f45af2
Add a data-name attribute to stream elements in the stream list and modify the test accordingly
...
(imported from commit 24791703015a47ae89fdf628d6511736b9d0f026)
2013-08-27 09:44:57 -07:00
Steve Howell
a2bf6c3dd7
Test stream_data.in_home_view()
...
(imported from commit 29f1a187000e1818797c1a4781afaabca0ed29de)
2013-08-26 13:59:33 -04:00
Steve Howell
b486f06e71
Test stream_data.get_invite_only for unknown stream
...
(imported from commit fb4e51b44b8c20844a7575af1a471a626273ae39)
2013-08-26 13:59:33 -04:00
Steve Howell
5e2de02dfc
Test stream_data.get_color() for unknown stream
...
(imported from commit 7507e43de3f261a19d210c58863d1e614567f4bc)
2013-08-26 13:59:32 -04:00
Steve Howell
ca5cf073f4
Add test_get_and_set() to stream_data tests
...
(imported from commit 007486f08879ea8b98524a91ef3fc02565cc4d86)
2013-08-26 13:59:32 -04:00
Steve Howell
96a2f0d907
Test TypeError exception in Dict.from
...
(imported from commit 088bf04ecf10338e2d1cff1b86d5beb263ee19dc)
2013-08-26 11:21:30 -04:00
Steve Howell
5dda9a5816
Test is_subscribed=false path of unread.get_counts
...
(imported from commit 7fb6531fb6d2d475bf43de6267fd018cc7347d7a)
2013-08-26 11:21:30 -04:00
Steve Howell
1821005dfe
Restore subject counts for Uppercase streams
...
(imported from commit ef0e78d39c56da67544441a73ea257f215fefd94)
2013-08-26 11:21:29 -04:00
Steve Howell
ffa9cfd492
Test that unread.process_loaded_messages ignores read messages.
...
(imported from commit 262f20933551e786022de564f46c75f901d8123f)
2013-08-26 11:21:29 -04:00
Steve Howell
582eef8305
Add test_message_unread()
...
(imported from commit 7f26cafb90757a9c490a148b6dd7b4f4f0fb5f95)
2013-08-26 11:21:29 -04:00
Steve Howell
06065d50bf
Add dict.num_items()
...
(imported from commit 209a01b61d18d4b65b54e473cf727065aada68e8)
2013-08-26 11:21:29 -04:00
Steve Howell
63fa194139
Turn off the "muted" topic special case
...
(imported from commit ea34ea060eb29864c4816d0f14ee106dcb10be9d)
2013-08-23 18:33:48 -04:00
Steve Howell
4a7bab9a6f
Allow collapsing of recipient sections.
...
This is experimental, for staging only. There might be a better
way to model this than dueling force_expand/force_collapse flags,
but it works for now. The code in collapse_recipient_group()
could also be DRYed up relative to expand_summary_row().
(imported from commit 107151d1ecd640970fb7700d41278a003bd1abaa)
2013-08-23 15:57:31 -04:00
Steve Howell
b3ebb13469
Remove some ".d" suffixes in predicate tests.
...
I was saying bar.d in places where I wasn't really specifically
testing the .d feature, and it was distracting and just an
unintentional consequence of copy/paste.
(imported from commit 7b137b28cb33c72b83f02fe1d2961c5c6accc263)
2013-08-23 14:10:03 -04:00
Steve Howell
439e984f3d
Break up Filter predicate tests
...
(imported from commit 780559045d6ea84612617db9249d7f191dbd86d9)
2013-08-23 13:56:28 -04:00
Steve Howell
3239efd864
Simplify MIT regex code and harden tests
...
(imported from commit 96c988fb8c90d04dd4bcd7d2bbc04f1b1c8d8cb7)
2013-08-23 13:32:10 -04:00
Steve Howell
df812b40f9
Have test excercise Filter.predicate caching code.
...
(imported from commit 504abea7c1ef3a9cdb58b5bbcf2d751c5d98b1ea)
2013-08-23 13:32:10 -04:00