zulip/frontend_tests
Steve Howell da79fd206a ui_init: Handle page_params more cleanly.
This cleans up the handoff of page_params
data between ui_init and modules that
take over ownership of page_params-derived
data.

Read the long comment in ui_init for a bit
more context.

Most of this diff is actually test cleanup.
And a lot of the diff to "real" code is
just glorified `s/page_params/params/`
in the `initialize` functions.

One little oddity is that we don't actually
surrender ownership of `page_params.user_id`
to `people.js`.  We could plausibly sweep
the rest of the codebase to just use
`people.my_user_id()` consistently, but it's
not a super high priority thing to fix,
since the value never changes.

The stream_data situation is a bit messy,
since we consume `page_params` data in the
initialize() function in addition to the
`params` data we "own".  I added a comment
there and intend to follow up.  I tried
to mostly avoid the "word soup" by extracting
three locals at the top.

Finally, I don't touch `alert_words` yet,
despite it also doing the delete-page-params-data
dance.  The problem is that `alert_words`
doesn't have a proper `initialize()`.  We
should clean that up and have it use a
`Map` internally, too.
2020-02-26 13:14:09 -08:00
..
casper_lib casper: Use data-stream-id to find checkboxes. 2020-01-28 14:49:57 -08:00
casper_tests casper: Remove 12-toggle-message-editing test. 2020-02-25 12:26:24 -08:00
node_tests ui_init: Handle page_params more cleanly. 2020-02-26 13:14:09 -08:00
zjsunit js: Convert _.has to Object.prototype.hasOwnProperty. 2020-02-25 14:09:39 -08:00
.eslintrc.json lint: Check eslint indentation for casper tests. 2018-05-06 19:35:18 -07:00
run-casper run-casper: Flush stdout before calling subprocess. 2020-02-04 16:17:37 -08:00