zulip/frontend_tests/casper_tests
Steve Howell 46a49777c4 Add stream ids to urls for stream-related narrows.
This commit prefixes stream names in urls with stream ids,
so that the urls don't break when we rename streams.

strean name: foo bar.com%
before: #narrow/stream/foo.20bar.2Ecom.25
after: #narrow/stream/20-foo-bar.2Ecom.25

For new realms, everything is simple under the new scheme, since
we just parse out the stream id every time to figure out where
to narrow.

For old realms, any old URLs will still work under the new scheme,
assuming the stream hasn't been renamed (and of course old urls
wouldn't have survived stream renaming in the first place).  The one
exception is the hopefully rare case of a stream name starting with
something like "99-" and colliding with another stream whose id is 99.

The way that we enocde the stream name portion of the URL is kind
of unimportant now, since we really only look at the stream id, but
we still want a safe encoding of the name that is mostly human
readable, so we now convert spaces to dashes in the stream name.  Also,
we try to ensure more code on both sides (frontend and backend) calls
common functions to do the encoding.

Fixes #4713
2018-02-19 09:03:11 -08:00
..
00-realm-creation.js form: During realm creation give option to install in root domain. 2017-10-19 16:10:14 -07:00
01-login.js casper: Always use REALMS_HAVE_SUBDOMAINS. 2017-08-24 20:44:37 -07:00
02-site.js lint: Fix several no-unused-vars eslint rule violations. 2016-12-03 18:43:47 -08:00
03-narrow.js right-sidebar: Enable up and down arrow keys. 2018-02-12 15:38:23 -08:00
04-compose.js 04-compose.js: Remove waitForText. 2017-06-07 13:41:59 -07:00
05-subscriptions.js Revert "Streams: Disallow certain markdown characters in stream names." 2018-02-05 16:55:21 -08:00
06-settings.js settings: Remove password confirmation in modal. 2018-01-23 14:38:59 -05:00
07-stars.js 07-stars.js: Remove waitForText. 2017-06-07 13:41:59 -07:00
08-edit.js refactor: new message content -> compose textarea. 2017-11-28 12:53:40 -08:00
09-navigation.js Add stream ids to urls for stream-related narrows. 2018-02-19 09:03:11 -08:00
10-admin.js org settings: Change create stream permission to be dropdown. 2018-01-23 14:26:40 -05:00
11-mention.js markdown: Require double-asterisk around all mentions. 2018-02-16 11:45:08 -08:00
12-toggle-message-editing.js org settings: Make button-clicking code more clear. 2018-01-16 13:25:19 -05:00
13-user-deactivation.js Rename "Administration" to "Organization" in the settings UI. 2017-04-07 17:32:56 -07:00
14-drafts.js compose: Re-open the compose editor after restoring a draft. 2017-12-22 08:57:39 -05:00
15-delete-message.js casper: Fix waiting condition in message deletion tests. 2017-05-30 22:49:59 -07:00