Umair Khan
94e0bb5abb
Fix race conditions in 03-narrow casper tests.
...
Re-arranges code so that two waitFor functions that can have
a race condition are separated by a then function.
Fixes : #1455
2016-09-21 17:54:42 +05:00
Tim Abbott
535a40ded9
requirements: Add enum34 for ipython on python 2.
...
I guess we don't have anything that tests ipython in CI, so this was
missed when I upgraded ipython earlier this week.
2016-09-20 22:37:47 -07:00
Steve Howell
13d6f52203
provision: Handle VENV_CACHE_PATH not existing.
...
If VENV_CACHE_PATH does not exist (which can happen if you destroy
your vagrant environment), then do a short circuit return in
try_to_copy_venv().
2016-09-20 06:55:08 -07:00
Tim Abbott
59f3fd55c9
requirements: Upgrade moto and dependencies.
2016-09-19 22:55:05 -07:00
Umair Khan
e3078b226a
Optimize incremental virtualenv creation.
...
This adds a new system for copying packages from old virtualenvs that
are sufficiently similar to the new virtualenv required.
In practice, this results in a huge performance improvement for
re-provisioning Zulip development environments when the requirements
files have changed (which is the dominant performance problem with
provision today).
Fixes : #1507 .
2016-09-19 22:35:32 -07:00
Tim Abbott
27e4ed126f
requirements: Upgrade various Python dependencies.
2016-09-19 22:32:02 -07:00
Tim Abbott
0cab02b58a
Upgrade mypy to latest upstream git.
...
This new mypy version supports some performance improvements and
should also facilitate running mypy on our scripts more efficiently.
2016-09-19 22:19:38 -07:00
Brock Whittaker
f87c78d3f1
Add preview button to subscriptions page.
...
This adds a preview button to the subscriptions page to allow a user
to check out the stream without having to subscribe.
The button’s default state is hidden but on subscription row hover it
shows itself.
The preview button updates its text from "Narrow" to "Preview" and
back when a user subscribes and unsubscribes from a stream.
Fixes : #1519 .
2016-09-19 22:13:47 -07:00
Tim Abbott
47045179fc
Fix traceback rendering narrows to non-subscribed streams.
...
This fixes a bug where Zulip would throw a TypeError if the user were
to try to narrow to a stream they had never been subscribed to. With
the new "preview" feature on the subscriptions page, this will now
happen much more often.
2016-09-19 22:10:52 -07:00
Brock Whittaker
706f422c3a
Massively refactor settings page templates and styling.
...
This restructures the styling for the Zulip settings and
administration pages to minimize use of Bootstrap and use a consistent
styling library for similar elements.
While it is basically a wash in terms of the page's visuals, it will
make our life a lot easier for future work on improving the settings
pages section of the site.
2016-09-19 21:55:06 -07:00
Tim Abbott
68c51912c9
extract_recipients: Add a type: ignore for problematic arguments.
...
We'll want to redo this function to be less crazy, but this is a quick
fix to be able to upgrade mypy.
2016-09-19 21:48:12 -07:00
Tim Abbott
e488d4d6e8
log_event: Fix unicode handling of log writing.
2016-09-19 21:45:52 -07:00
Tim Abbott
939528303d
upload: Add type: ignore for mimetypes.guess_type stubs issue.
2016-09-19 21:40:08 -07:00
Steve Howell
6b3f945a7e
dead code: Remove linebreak().
2016-09-19 18:25:03 -07:00
Steve Howell
c2277afd06
Simplify bulk_get_streams().
...
We can always expect a realm here.
2016-09-19 18:25:03 -07:00
Steve Howell
eb09dd217d
Simplify get_stream_backend.
...
Assume that get_stream_backend() always receives a realm, not a
realm id. We can be pretty confident of that now due to mypy.
2016-09-19 18:25:03 -07:00
Steve Howell
1dbc94bcd9
annotations: Require a Realm for get_stream().
2016-09-19 18:25:02 -07:00
Steve Howell
feb94a90aa
tests: Add ModelTest class for miscellaneous model tests.
2016-09-19 18:25:02 -07:00
Steve Howell
7d257b03fc
test: Add coverage for Recipient.__unicode__().
2016-09-19 18:25:02 -07:00
Steve Howell
e0d59d9386
dead code: Remove Stream.create().
2016-09-19 18:25:02 -07:00
Steve Howell
a67d17b9f7
tests: Add coverage for RealmFilter.__unicode__().
2016-09-19 14:57:53 -07:00
Steve Howell
5daa2b10d5
tests: Add coverage for RealmEmoji.__unicode__().
2016-09-19 14:57:53 -07:00
Steve Howell
068a783d88
tests: Test creating user with aliased realm.
2016-09-19 14:57:53 -07:00
Steve Howell
2d0d823a59
tests: Add test_fetch_raw_message().
2016-09-19 14:25:21 -07:00
Steve Howell
7d4995ded0
tests: Add test_render_message_api().
2016-09-19 14:25:21 -07:00
Steve Howell
d0f9374b71
tests: Add test_messages_in_narrow().
2016-09-19 14:25:21 -07:00
Steve Howell
318f8e86a1
tests: Extract _update_tsvector_index().
2016-09-19 14:25:21 -07:00
Tim Abbott
9ed5ccd332
alert_words: Use the ID to reference create_alert_word_button.
2016-09-19 14:23:11 -07:00
Brock Whittaker
0274475e5e
Fixes hash system for saving page state.
...
This changes the JavaScript to fix the hash system to correctly save
state to allow a user to deep link to a particular app platform.
The mechanism is handled by a click event on #apps-tabs [data-toggle]
that fires a hash setter which then fires a hash getter which loads the
correct tab if necessary.
2016-09-19 13:19:01 -07:00
sunnypalace
3b76a489c9
Remove humbug-user-uploads and related code.
...
Fixes : #1672 .
2016-09-19 10:52:05 -07:00
Steve Howell
e2f7f7b672
tests: Add test_update_alert_words().
2016-09-18 22:08:53 -07:00
Steve Howell
a58cad3093
tests: Extract test_alert_words.py
2016-09-18 22:08:53 -07:00
Tim Abbott
ec850e3053
Revert "tests: Skip test_get_old_messages_with_search_pgroonga."
...
This reverts commit 8ae7e7b451
.
We believe this issue may have been fixed in
e80279c2e4
.
2016-09-18 20:26:35 -07:00
Kouhei Sutou
e80279c2e4
test: Add a missing PGroonga configuration
...
Fix #1769
2016-09-19 01:06:52 +09:00
Tim Abbott
8ae7e7b451
tests: Skip test_get_old_messages_with_search_pgroonga.
...
This test fails nondeterministically, apparently due to a problem in
pgroonga itself.
2016-09-17 12:29:24 -07:00
Steve Howell
1c37c0e93f
uploads: Remove redir=False codepath for serving S3 files.
...
It does not seem that we need to support this any more. Eliminating
the code gets us to 100% line coverage with our tests on view/uploads.py.
2016-09-17 12:13:07 -07:00
Steve Howell
9c0282139a
tests: Add test_serve_s3_error_handling().
2016-09-17 12:13:07 -07:00
Steve Howell
934385a238
tests: Add test_download_non_existent_file().
2016-09-17 12:13:07 -07:00
Steve Howell
5c54b53fc0
tests: Add test_file_too_big_failure().
2016-09-17 12:13:07 -07:00
Steve Howell
a630bbf8b8
uploads: Remove dead code in serve_local().
2016-09-17 12:13:07 -07:00
Steve Howell
ca18b631c5
tests: Add ZephyrTest.
2016-09-17 09:29:09 -07:00
Eklavya Sharma
2d3921e3e4
Add instructions for manually installing pgroonga.
2016-09-17 09:23:54 -07:00
Steve Howell
750720116f
tests: Add test_update_realm_api().
2016-09-17 08:31:23 -07:00
Umair Khan
ff0f413d26
Use npm caching in upgrade-zulip-stage-2.
2016-09-16 12:40:48 -07:00
Umair Khan
4301d11b4a
Use npm caching in tools/update-prod-static.
2016-09-16 12:40:48 -07:00
Umair Khan
a82990f63c
Use npm caching in tools/provision.py.
2016-09-16 12:40:48 -07:00
Umair Khan
ec74974de3
Create node_cache module for npm caching.
2016-09-16 12:40:48 -07:00
Tim Abbott
2c19719cee
test_bugdown: Fix i18n test flakiness with markdown rendering tests.
...
It appears that the assertRaisesRegexp approach we had before didn't
work properly on some systems, likely due to a bad interact with a
i18n (we haven't definitively determined the cause).
2016-09-16 11:49:52 -07:00
Steve Howell
a036a72db6
bugdown: Raise BugdownRenderingException.
...
We now raise an exception in bugdown.do_convert() if rendering
fails, to avoid silent failures, and then calling code can convert
the exception to a JsonableError.
2016-09-16 10:01:55 -07:00
Steve Howell
de25f07961
tests: Add BugdownErrorTests.
2016-09-16 10:01:55 -07:00