Tomasz Kolek
4790316b57
Add user setting option to always send push notifications.
...
Add option in user's settings for getting mobile push notifications
even if a Zulip browser is online. Default is False.
Fixes : #1596 .
2016-10-25 10:52:29 -07:00
Rishi Gupta
b6da450b96
admin.js: Use RealmAlias instead of Realm to show the restricted domains.
...
Passes the allowed domains for a realm to the frontend, via
page_params.domains. Groundwork for allowing users to add and
remove domains via the admin setting page, rather than via the
realm_alias.py management command.
2016-10-25 10:07:20 -07:00
Brock Whittaker
fca61b2031
Add medium size avatars for use on the user's own settings page.
...
This adds a medium (500px) size avatar thumbnail, that can be
referenced as `{name}-medium.png`. It is intended to be used on the
user's own settings page, though we may come up with other use cases
for high-resolution avatars in the future.
This will automatically generate and upload the medium avatar images
when a new avatar original is uploaded, and contains a migration
(contributed by Kirill Kanakhin) to ensure all pre-existing avatar
images have a medium avatar.
Note that this implementation does not provide an endpoint for
fetching the medium-size avatar for another user.
[substantially modified by tabbott]
2016-10-25 09:42:14 -07:00
K.Kanakhin
16c3da6db5
tests: Add tests for SEND_MISSED_MESSAGE_EMAILS_AS_USER=False.
...
- Add tests for SEND_MISSED_MESSAGE_EMAILS_AS_USER is False (the
default!).
- Reorganized test case code by removing repeated parts of code,
improving code style and moving common parts to separate class
methods.
Fixes #1697 .
2016-10-21 08:47:24 -07:00
Steve Howell
44bbece5a6
Remove do_remove_subscription() calls in tests.py.
2016-10-20 22:05:19 -07:00
Steve Howell
bea8ba620b
Replace do_add_subscription() in tests/tests.py.
2016-10-20 22:05:19 -07:00
Tim Abbott
2bea0c46fe
HomeTest: Add a basic test for desktop_home.
2016-10-16 11:39:08 -07:00
Tim Abbott
3ee9e2c45f
tests: Add some basic i18n public URL tests.
2016-10-16 11:26:01 -07:00
Tim Abbott
122164fffb
DocPageTest: add test for /about/ page.
2016-10-16 11:19:27 -07:00
Umair Khan
36c6a5d758
Add support for changing user's name by admin.
...
Fixes : #1553
2016-10-11 16:36:48 -07:00
Umair Khan
a32cee4b10
Add test to show error msg for invalid subdomain.
2016-10-10 08:42:34 -07:00
Supriya
4959e8d10a
tests: Extract and use assert_max_length test helper.
...
This makes it much more explicit in which cases we're checking
equality or a maximum in our use of `assert_length`.
Fixes #1400 .
2016-09-25 15:44:58 -07:00
Steve Howell
a79a627166
tests: Add more cases to test_terms_of_service().
...
This gives us more test coverage on UserProfile.major_tos_version().
2016-09-24 16:56:34 -07:00
Steve Howell
feb94a90aa
tests: Add ModelTest class for miscellaneous model tests.
2016-09-19 18:25:02 -07:00
Steve Howell
068a783d88
tests: Test creating user with aliased realm.
2016-09-19 14:57:53 -07:00
Steve Howell
a58cad3093
tests: Extract test_alert_words.py
2016-09-18 22:08:53 -07:00
Steve Howell
ca18b631c5
tests: Add ZephyrTest.
2016-09-17 09:29:09 -07:00
Steve Howell
750720116f
tests: Add test_update_realm_api().
2016-09-17 08:31:23 -07:00
Steve Howell
c4dd3ba0d3
tests: Add test_illegal_name_changes().
2016-09-16 09:59:26 -07:00
Tim Abbott
29495b953a
Add test for GET /json/users/me/pointer.
2016-09-13 17:30:39 -07:00
Tim Abbott
4a2282a837
tests.py: Fix missing import needed for mypy.
2016-09-13 17:08:14 -07:00
Steve Howell
51c78571cc
tests: Add HomeTest.test_invites_by_admins_only().
2016-09-13 16:46:05 -07:00
Steve Howell
7cb8f6421d
tests: Add HomeTest.test_new_stream().
2016-09-13 16:46:05 -07:00
Steve Howell
eced842f4d
tests: Add HomeTest.test_notifications_stream().
2016-09-13 16:46:05 -07:00
Steve Howell
cad12b077f
tests: Extract HomeTest._get_page_params().
2016-09-13 16:46:05 -07:00
Steve Howell
1091b51bb4
tests: Add HomeTest.test_bad_pointer().
2016-09-13 16:46:05 -07:00
Steve Howell
7f771c64ae
tests: Add HomeTest.test_bad_narrow().
2016-09-13 16:46:05 -07:00
Steve Howell
2bf876d5bb
tests: Add HomeTest._sanity_check().
2016-09-13 16:46:05 -07:00
Steve Howell
dc2dde1509
tests: Add HomeTest.test_terms_of_service().
2016-09-13 16:46:05 -07:00
Steve Howell
fa4110b1d9
tests: Extract HomeTest._get_home_page().
2016-09-13 16:46:05 -07:00
Steve Howell
f5f7801302
tests: Extract test_presence.py
2016-09-13 14:51:36 -07:00
Steve Howell
329fa22f22
tests: Add test_mirror_presence().
2016-09-13 14:42:18 -07:00
Steve Howell
7f94c74bf8
tests: Add test_invalid_presence().
2016-09-13 14:36:47 -07:00
Tim Abbott
a7fe22f4ec
Add Zulip version number to page_params.
2016-09-08 15:29:24 -07:00
Ashish Kumar
c9b81379b6
Add test_bot_add_subscriptions().
...
Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2016-09-07 19:10:12 -07:00
Tim Abbott
797a7ef97b
notifications: Don't spoof emails as from users by default.
...
The previous default configuration resulted in delivery problems if
the Zulip server was authorized in the SPF records for the domains of
all users on the Zulip server.
2016-08-24 14:10:52 -07:00
Steve Howell
fd6ee7117f
tests: Renamed AuthedTestCase to ZulipTestCase.
2016-08-22 19:07:44 -07:00
Brock Whittaker
6936d49202
Live update new avatars across users.
...
This sends an event when a new avatar is uploaded that refreshes the
avatar for all browser clients without the need to reload the browser.
Fixes : #1359 .
2016-08-18 15:32:29 -07:00
Steve Howell
552a6dc017
tests: Add DocPageTest.
2016-08-18 13:28:58 -07:00
Steve Howell
d1c34a6618
tests: Fix test_create_user_backend().
...
It was passing in a UserProfile object to client_put(),
which is unnecessary and can break the url coverage
report.
2016-08-18 13:28:58 -07:00
Tim Abbott
bfa987f26e
Add missing realm_uri and server_uri to HomeTest.
2016-08-13 16:52:56 -07:00
Tim Abbott
ed01842f95
notifications: Fix missed message emails with multiple senders.
...
Previously, missed message emails with multiple senders would
incorrectly have a "," outside the quoted sender name part of the from
address string, resulting in confusing email output.
2016-08-12 12:28:06 -07:00
Tim Abbott
386c6c2a31
settings: Refactor SYSTEM_ONLY_REALMS configuration.
2016-08-12 12:12:53 -07:00
Umair Khan
af9f308f0e
Send double columned language list in page_params.
2016-08-10 16:19:28 -07:00
Umair Khan
73e5289736
Add default_language_name in page_params.
2016-08-10 16:19:28 -07:00
Rag Sagar
2fef36f15a
Add realm-level default language setting.
...
Adds a new field default language in the zerver_realm model.
This realm level default language will be used as default language
for newly created users. Realm level default language can be
changed from the administration page.
Fixes #1372 .
2016-08-09 17:38:29 -07:00
Tim Abbott
4e8054b84a
Refactor queue worker tests to match actual API.
2016-08-04 15:57:03 -07:00
Rag Sagar
b9f2397073
Add validation and tests for default language setting.
2016-07-31 17:44:10 -07:00
Tim Abbott
297566510c
test_activity: Increase expected query count by 1.
...
This is required because the Zulip UserProfile caching logic has
changed with 8e5e6a06f2
, and sometimes
the current user will not be in the cache.
2016-07-29 21:15:10 -07:00
Steve Howell
9fb071947d
Remove expected_run_time from @slow test decorator.
2016-07-29 16:41:21 -07:00
Steve Howell
ffe364c719
Don't pass UserProfile object to client_put().
...
This was in AdminCreateUserTest.test_create_user_backend().
For end to end tests we are logged in, and we need to verify
that our decorators add UserProfile to the parameters of
the view on our behalf, so that we don't get false positives.
In an upcoming commit, we will want to be able to serialize
the parameters for client_put to produce url coverage reports,
so that is another reason not to pass in the UserProfile
object. (That was how this was discovered.)
2016-07-28 13:57:28 -07:00
Steve Howell
6937f63fd5
Add client_get() test helper.
2016-07-27 20:49:33 -07:00
Steve Howell
38f2a2f475
Add client_post() test helper.
...
This makes us more consistent, since we have other wrappers
like client_patch, client_put, and client_delete.
Wrapping also will facilitate instrumentation of our posting code.
2016-07-27 20:49:32 -07:00
Tim Abbott
375551aaa6
Clean up most hardcoding of mit.edu domain checks.
...
This moves all this code to be gated on a few virtual realm settings.
2016-07-26 20:30:12 -07:00
Tim Abbott
c17676b00c
Cleanup MIT hardcoding for disabling presence.
2016-07-26 20:30:12 -07:00
Steve Howell
1da9325476
Require non-empty full_name or password in json_change_settings
2016-07-23 14:53:15 -07:00
Steve Howell
14717f414c
Add default for full_name in json_change_settings.
2016-07-23 14:53:15 -07:00
Steve Howell
f27ad0d800
Add test_changing_nothing_still_returns_success().
...
(in ChangeSettingsTest)
2016-07-23 14:53:15 -07:00
Steve Howell
728ac09df9
Remove ChangeSettingsTest.post_with_params().
...
The individual tests now explicitly show all the parameters
they are passing to the endpoint, which makes them easier
to troubleshoot.
2016-07-23 14:53:15 -07:00
Umair Khan
dce48d58b6
Cache translations.
...
Fixes : #1158
2016-07-21 10:23:31 -07:00
acrefoot
0dfb76fc5e
Change HTTP verb for create_user_backend to PUT ( #1326 )
2016-07-20 12:57:47 -07:00
Tim Abbott
fb386da552
settings: Extract settings.SAVE_FRONTEND_STACKTRACES.
2016-07-19 15:28:41 -07:00
Tim Abbott
0aaa55fb8f
settings: Extract settings.SHARE_THE_LOVE.
2016-07-19 15:28:41 -07:00
Tim Abbott
50c3e42f0e
Fix test failure due to recent merge interaction.
...
599b15cb84
broke master because it had
previously only been tested before HomeTest was created.
2016-07-18 16:37:25 -07:00
Steve Howell
1a9a630526
Add zerver.tests.tests.HomeTest.test_home.
2016-07-18 12:22:14 -07:00
Eklavya Sharma
29673411df
Make backend tests (hackishly) pass on python3.4.
...
Replace bot_owner=bot_owner by bot_owner_id=bot_owner.id while
creating a UserProfile object.
2016-07-15 11:13:33 -07:00
Steve Howell
a5b9e3b893
Add test_patch_bot_avatar().
...
Fixes : #1002
2016-07-13 22:53:46 -07:00
Steve Howell
538962f3ca
Add test_add_bot_with_username_in_use().
2016-07-13 22:53:40 -07:00
Steve Howell
468faf5724
Add test_add_bot_with_bad_username().
2016-07-13 22:53:40 -07:00
Steve Howell
de4cc80aa0
Add test_add_bot_with_too_many_files().
2016-07-13 22:53:40 -07:00
Steve Howell
e9ddf28b2c
Add test_add_bot_with_user_avatar().
2016-07-13 22:53:40 -07:00
Umair Khan
636466ff8b
Fix unreliable tests for missed messages.
...
Generate random token using getrandints.
Resolves the proximal issue discussed in #1212 .
2016-07-13 10:51:21 -07:00
Steve Howell
c069c8f1e7
Add test_update_api_key_for_invalid_user().
2016-07-13 07:51:00 -07:00
Steve Howell
aea79517f5
Test bot_owner logic in /json/users
...
This fixes a small gap in our coverage for get_members_backend.
2016-07-12 23:01:56 -07:00
Steve Howell
108ce82571
Add test_api_with_insufficient_permissions().
2016-07-12 22:16:00 -07:00
Steve Howell
cee47e7f82
Add test_api_with_nonexistent_user().
2016-07-12 22:16:00 -07:00
Steve Howell
f43be3bd8f
Add test_updating_non_existent_user().
2016-07-12 22:16:00 -07:00
Steve Howell
45d1eefc52
Add test_create_user_backend().
...
This tests provides full line coverage on the
create_user_backend view.
2016-07-12 12:29:24 -07:00
Eklavya Sharma
73a3c9fa47
On python 3, skip expected failures in backend tests.
2016-07-12 09:27:55 -07:00
Eklavya Sharma
801bcdd956
zerver/tests/tests.py: Fix non-deterministic failure.
...
Replace occurences of list(d.keys()) by sorted(d.keys()).
2016-07-09 17:54:54 -07:00
Eklavya Sharma
2f2e543a0e
zerver/tests/tests.py: Replace assertItemsEqual.
...
Replace assertItemsEqual(a, b) by assertEqual(sorted(a), sorted(b))
because assertItemsEqual has been removed in python 3.
2016-07-09 17:54:54 -07:00
Umair Khan
75bd3541ea
Add tests for new email policy.
...
- Update test_extra_context_in_missed_stream_messages
- Add test_extra_context_in_personal_missed_stream_messages
- Add test_extra_context_in_huddle_missed_stream_messages
2016-07-08 10:58:25 -07:00
Tim Abbott
6723525fd3
Annotate zerver/tests/tests.py.
2016-06-16 14:07:34 -07:00
Tim Abbott
45883386ce
AlertWordTests: Cleanup confusing message variable reuse.
2016-06-16 13:55:58 -07:00
Tim Abbott
10dd9addb7
Fix ChangeSettingsTest caching issue causing test failures.
2016-06-15 14:57:58 -07:00
Tim Abbott
06079042d4
ChangeSettingsTest: Move login to test helper method.
2016-06-15 14:28:24 -07:00
Tim Abbott
8f67b7e498
Simplify check_for_toggle_param.
2016-06-15 14:23:51 -07:00
Ashish Kumar
0a98d9edcf
Add test_enter_sends_setting.
2016-06-15 14:23:51 -07:00
Ashish Kumar
8a55098ca7
Add test_time_setting.
2016-06-15 14:23:51 -07:00
Ashish Kumar
345df3538f
Add test_toggling_left_side_userlist.
2016-06-15 14:23:51 -07:00
Ashish Kumar
24767302c4
Update test_ui_settings to use new abstraction.
2016-06-15 14:23:51 -07:00
Ashish Kumar
006e528e18
Update test_notify_settings to use new abstraction.
2016-06-15 14:23:51 -07:00
Ashish Kumar
5ae06e8c33
Added test helper function: check_for_toggle_param
2016-06-15 14:18:55 -07:00
Tim Abbott
be96cf809d
Move Zulip backend tests to zerver.tests.
2016-04-11 22:16:09 -07:00