Commit Graph

136 Commits

Author SHA1 Message Date
Tim Abbott 931630abae casper: Clean up wait logic in drafts tests. 2017-03-17 20:01:47 -07:00
Tim Abbott 1b2cbb0b85 casper: Fix incorrect wait condition for realm icons.
This wait condition was correct for uploading, but not for deleting.
2017-03-14 14:40:52 -07:00
Tim Abbott 900891b072 settings: Rename settings-status to account-settings-status. 2017-03-10 10:53:06 -08:00
Raghav Jajodia 05f0d1953b account-settings: Removed 'Updated settings' message from admin.
The 'Updated Settings' message we get at the bottom
of admin-page when we change the name is removed.
Fixes #3815.
2017-03-10 10:53:06 -08:00
Umair Khan 2894924ffb capitalization: Fix Only Admins may now create new streams. 2017-03-08 23:40:15 -08:00
Tim Abbott 3b59e6c3cc subs: Rename /#subscriptions to /#streams.
Fixes #3653.
2017-03-08 16:57:58 -08:00
Rishi Gupta 3797fa657e Change bot domains to string_id.EXTERNAL_HOST.
Change applies to both subdomains and non-subdomains case, though we use
just the EXTERNAL_HOST in the non-subdomains case if there is only 1 realm.

Fixes #3903.
2017-03-08 16:26:13 -08:00
Tim Abbott 13e82f1a16 casper: Fix test failure due to recent capitalization change. 2017-03-08 14:10:51 -08:00
Umair Khan 935cacfc86 capitalization: Fix View Source. 2017-03-08 12:33:37 -08:00
Steve Howell 8c61bb69cc casper: Fix flakiness with uploading realm icon. 2017-03-05 11:42:43 -08:00
K.Kanakhin 132534b3bb realm-icon: Add realm icon frontend tests. 2017-02-26 19:55:02 -08:00
Sampriti Panda 1929cc5190 Implement persistent drafts functionality
* Created a drafts modal to display/restore/delete drafts
* Created a Draft model to support storing draft data in localstorage
* Removed existing restore-draft functionality
* Added casper and node tests for drafts functionality

Fixes #1717.
2017-02-23 02:58:23 -08:00
Tim Abbott b05145d9d7 casper: Fix flaky 13-user-deactivation casper test.
This block of code:

casper.click('a[href^="#"]');

actually tried to click basically every link on the page, producing
highly undefined behavior.
2017-02-21 15:02:11 -08:00
Steve Howell d406d34fe0 Use user_id in admin_user_list.handlebars.
For our user administration, we now primarily work with user ids
that get put into data-user-id attributes.  We still put emails in the
tags to make our Casper tests easy to maintain.

This requires a minor change to the back end to pass down user ids
for the /users endpoint (in get_members_backend).
2017-02-14 23:07:44 -08:00
Igor Tokarev 55cffa1e69 Added keyboard shortcut to edit the last message.
Tweaked significantly by tabbott to update Casper tests, document the
new feature, and fix hotkeys.

Fixes #1147.
2017-02-12 00:29:28 -08:00
Tim Abbott 4060a97656 messages: Strip trailing whitespace in message contents.
I dug into why we never did this before, and it turns out we did, but
using `$.trim()` (which removes leading whitespace as well!).  When
removing the `$.trim()` usage.

Fixes #3294.
2017-02-11 23:01:22 -08:00
Tim Abbott d88c339cc4 casper: Use waitUntilVisible in toggle message editing tests. 2017-02-09 23:35:11 -08:00
Tim Abbott ed4f2452f2 casper: Use waitUntilVisible in realm creation tests. 2017-02-09 23:35:11 -08:00
Tim Abbott 89c515f8a5 casper: Use waitUntilVisible in narrow tests. 2017-02-09 23:35:11 -08:00
Tim Abbott 5b56fffc3c casper: Use waitUntilVisible in mention tests. 2017-02-09 23:35:11 -08:00
Tim Abbott 8ef3e7cde8 casper: Use waitUntilVisible in editing tests. 2017-02-09 23:35:11 -08:00
Tim Abbott 54883cafcc casper: Use waitUntilVisible in subscriptions tests. 2017-02-09 23:35:11 -08:00
Tim Abbott 2e290d3802 casper: Use waitUntilVisible in navigation tests. 2017-02-09 23:35:11 -08:00
Tim Abbott 532cfab846 casper: Use waitUntilVisible in settings tests. 2017-02-09 23:35:11 -08:00
Tim Abbott 1aac52d685 casper: Use waitUntilVisible in user deactivation tests. 2017-02-09 23:35:10 -08:00
Brock Whittaker 29dbb9e0b4 casper: Use waitUntilVisible and waitWhileVisible in admin tests.
This fixes a potential class of flakiness in the tests where they
interact with parts of the admin UI that aren't actually visible at
the moment via selectors, which probably doesn't test what we intend
to test properly.
2017-02-09 23:35:10 -08:00
Brock Whittaker 1143ed7219 redesign: Change /#settings and /#administration to an overlay.
This also adds a box-shadow to the #deactivate_self_modal so that it
looks similar to the old backdrop.
2017-02-09 23:35:10 -08:00
Tim Abbott 708c034d93 casper: Extract 13-user-deactivation.js from 10-admin.js.
For some reason, this section of tests basically totally breaks
whatever test runs after it.  To minimize the impact of that problem,
we move it to a separate file.
2017-02-09 23:32:37 -08:00
Tim Abbott d69c40eb75 casper: Clean up some admin casper tests.
This adds missing casper.then(), some waits for relevant selectors,
and tightens some of the selectors to be more precise.
2017-02-09 23:32:26 -08:00
Tim Abbott 699257c3bf casper: Extract extended editing tests out of 10-admin.js.
The casper test file 10-admin.js had gotten to be super huge, so a
split is a good idea regardless, but this should also make quaranteen
for tests broken by the settings redesign more manageable.
2017-02-09 00:53:24 -08:00
Tim Abbott 4857f3c2d2 casper: Use casper.then consistently in realm filters tests. 2017-02-09 00:34:56 -08:00
Tim Abbott 26ae2a69a9 casper: Clean up default stream tests a bit more.
This users casper.then in a more reasonable way, and also moves the
stream_name definition to the section where it's used.
2017-02-09 00:34:04 -08:00
Tim Abbott c4ba971247 casper: Fix test failures in 06-settings due to new translations. 2017-02-03 14:32:05 -08:00
Tim Abbott a889346c9f Remove zh_CN old Django name for Chinese. 2017-02-03 14:29:03 -08:00
brockwhittaker 59743a8508 Fix for TravisCI + casper.js race condition.
This changes the markdown preview test to use the
waitForSelectorTextChange method rather than waitWhileVisible
because it was not being generated fast enough in some cases
to show correctly with waitWhileVisible.
2017-01-31 17:53:20 -08:00
Steve Howell 8cfb9e427f Simplify the "Copy from Stream" feature.
I moved the UI element for "Copy from Stream" to be above
the list of users, including the filter box and check/uncheck
links, which no longer get applied to the list of streams.

The reason I no longer apply the filter to streams is...

    * It's kind of confusing to have filters apply to both
      streams and users.  There should be separate filters for
      them, and I will try to resuscitate that feature later.
    * The code to filter the streams was doing a sketchy
      regex operation against user-inputted data. (`match()`)
    * We want to use the same stream filtering code as the
      right sidebar uses.
    * It improves performance for the common case that you
      are filtering users.

The reason I no longer apply the check-all/uncheck-all actions
to streams is that it would be crazy to select all your streams
to copy users from, and it would be expensive/slow for large
realms, and it would likely be done by accident if somebody was
trying to manage individual users.

Finally, the check-all/uncheck-all actions have been scoped
to the users filtered by the text box, so I moved the links
under the text box to make that hopefully more clear to users.
2017-01-26 10:24:15 -08:00
Steve Howell 8c6dab9750 Use data-user-id for mention buttons in local echo.
The local echo code now marks up mention buttons with user ids
instead of email.  Our code in message_list_view.js deals with
either the old style or the new style of markup now to determine
which mention buttons need to be highlighted.

As part of this commit we extract mention_button_refers_to_me().
2017-01-21 21:45:12 -08:00
Tim Abbott 450ce61e6c Fix internationalization in streams page buttons/labels. 2017-01-16 18:00:10 -08:00
Tim Abbott e1e7788e67 Fix capitalization in 'Deactivated users'. 2017-01-16 18:00:10 -08:00
Tim Abbott 56bc421a6f Rename 'Filter Streams' to 'Filter streams'. 2017-01-16 18:00:10 -08:00
polypmer 2c58af9305 Check and Uncheck All only on visible (filtered) users.
When filtering users in the new stream form, check all
and uncheck all will only effect those users who are filtered,
visible in the dom.

Includes a Casper test for the new condition.
2017-01-12 13:58:54 -08:00
Tim Abbott 998dff9e50 lint: Add dangling commas in JavaScript objects. 2017-01-11 15:23:42 -08:00
Tim Abbott 7ca2d21d97 casper: Clean up some line-wrapping.
This feels a bit more readable than the original version; noticed it
while playing with the comma-dangle linter.
2017-01-11 15:23:42 -08:00
Bojidar Marinov 786dd0fca4 auth: Make min password length and strength configurable.
This adds some configuration options to settings.py, namely
PASSWORD_MIN_LENGTH and PASSWORD_MIN_QUALITY, which control
when the frontend validator invalidates the password.

Closes #2628
2017-01-10 04:55:41 -08:00
Tim Abbott 9f1fca30df subs: Access streams to copy from by ID in new stream creation. 2017-01-06 23:19:45 -08:00
Tim Abbott 9ff8c9e358 subs: Access users by ID in new stream creation. 2017-01-06 23:18:53 -08:00
Harshit Bansal 9931ad1324 Loosen realm filter pattern validator to support Git commit IDs.
Specify, we no longer require a prefix.

Also improves the clarity of the examples in the documentation.

Fixes: #2696.
2016-12-27 20:31:08 -08:00
Sanskar Modi e6beaa2711 Improve @all warnings user interface significantly.
* Doesn't pop up the warning until you actually try to send the message
* Eliminates the red warning.
* Changes confirm text to "Yes, send".
* Adds a stream size threshhold of 15 people; smaller streams don't
  prompt about this.

Fixes #2257.
2016-12-21 11:40:47 -08:00
Akhil 06615bee00 streams: Implement copy-subscribers feature.
In the new stream creation modal, added checkboxes for each stream
and a toggle to see or hide the checkboxes. Altered filtering to
filter streams and users. Added corresponding casper tests.

When a stream is checked/unchecked, it does not affect the state
of any user checkbox. This may be visually unclear as users can be
added even if their checkboxes are empty.

Fixes #2448
2016-12-17 11:20:47 -08:00
Umair Khan ab25cd7401 casper: Redirect to english url. 2016-12-15 13:44:13 -08:00