Commit Graph

15 Commits

Author SHA1 Message Date
Reid Barton 5a747ab690 Make the CasperJS frontend tests work again
(At least when PhantomJS doesn't crash...)

(imported from commit 62936b12883e4c6bbd3701da80783b4bffe46025)
2015-08-20 13:33:07 -07:00
Zev Benjamin bdee9721ec tests: Delay loading old messages and starting get_updates until phantomjs thinks the page has loaded
This doesn't affect code when not in testing.  It shaves 7 seconds off of casper
test time on my machine.

(imported from commit 7e27fa781bcf16f36d9c8f058427ba57c41068bd)
2014-03-11 13:06:22 -04:00
Zev Benjamin d6f01ed7b9 tests: Clear phantomjs local storage before starting tests
(imported from commit 83ee6f1c95a6f1e4005b36af6be2d60f70c81a1d)
2014-03-11 13:06:22 -04:00
Zev Benjamin 917a4363e7 tests: Only initialize casper once
(imported from commit 849b8cfc0545fb0ff51dbfc32d2bc6081c0a5215)
2014-03-11 13:06:22 -04:00
Zev Benjamin 719d551de6 tests: Always wait before sending messages
(imported from commit 1860f994b5698ba39ec9b45564c283f932d7502e)
2014-03-11 13:06:21 -04:00
Zev Benjamin 39f632134d tests: Rename casper helpers for clarity
send_message -> then_send_message
send_many -> then_send_many
wait_and_send -> then_wait_and_send

Hopefully this makes it clearer that they should not be called inside of steps.

(imported from commit 4fcc971817b25056100311ba55303da2c5527f0f)
2014-03-11 13:06:21 -04:00
Zev Benjamin 0ccb794007 tests: Don't add new steps during execution
Casper can technically handle it, but it's cleaner to create all steps ahead of
time.

(imported from commit 37cda128818d663f57b6e2282a781e8d099fa77d)
2014-03-11 13:06:20 -04:00
Jason Michalski eebbf0d4ee Show the new bot's default stream settings in the edit view
(imported from commit d6f1872e0dedd57ebde31da2caf075804195dfb0)
2014-03-05 14:16:19 -05:00
Allen Rabinovich 13045f953f Fix casper tests
(imported from commit 9376ba39e827794e0c7bd2404c08d702596786a4)
2014-02-27 20:25:28 -05:00
Jason Michalski 320c2b8eaf Fix casper tests for redesign
Commit "ecf0eb85 Redesign styles for message pane" removed the
right_part class, updates the tests to not use it.

(imported from commit 277eb3748913895b13ab7bdca11e668033c9f9b3)
2014-02-18 12:50:31 -07:00
Jason Michalski 2a8f0b4b3b Fixed expected_messages in casper tests
expected_messages was ltriming headings but we had a newline at the end
innerText. The ltrim was changed to a trim to correct this.

(imported from commit 5e411c5fc46a2cb675c1268041e95bbb2522c8f9)
2014-01-07 12:32:52 -05:00
Zev Benjamin a04ac35012 casper: Marginally improve page loaded detection
We really should be setting a variable in Javascript to indicate that
we've finished loading, but this hasn't bitten us yet.

(imported from commit ee1f7c76d9f3c482561cc5c44b81537c7e9636be)
2013-10-22 18:45:11 -04:00
Steve Howell 4a7bab9a6f Allow collapsing of recipient sections.
This is experimental, for staging only.  There might be a better
way to model this than dueling force_expand/force_collapse flags,
but it works for now.  The code in collapse_recipient_group()
could also be DRYed up relative to expand_summary_row().

(imported from commit 107151d1ecd640970fb7700d41278a003bd1abaa)
2013-08-23 15:57:31 -04:00
Scott Feeney f0e9786c08 Test user-sidebar unread counts & fix broken tests
This is hard to break up into separate commits; sorry about that.

Before this commit we had 3 tests:

1. Claims to check that an unread count was 3, but actually doesn't.
2. Checks that scrolling down causes the left-sidebar stream unread
   count to decrease.
3. Claims to check that unread counts are correct, but actually doesn't.

From talking to Leo, it seems that he originally tried to actually do
what tests 1 and 3 claim to do, but found it too fragile to check an
exact unread count because of font sizes, layout, etc.

We now have 4 tests. For each of the stream sidebar and user sidebar, we
test that:

1. Scrolling down causes the unread count to decrease
2. Logging out and back in again leaves the unread count unchanged

I've removed the two bogus tests and some other code that didn't seem to
serve a purpose.

(imported from commit 9f8e4b521e2765099510426d0b7e2960885e6f19)
2013-08-22 14:46:13 -04:00
Tim Abbott e111a2f9a5 [manual] Rename Django app from zephyr to zerver.
This needs to be deployed to both staging and prod at the same
off-peak time (and the schema migration run).

At the time it is deployed, we need to make a few changes directly in
the database:

(1) UPDATE django_content_type set app_label='zerver' where app_label='zephyr';
(2) UPDATE south_migrationhistory set app_name='zerver' where app_name='zephyr';

(imported from commit eb3fd719571740189514ef0b884738cb30df1320)
2013-08-06 07:39:36 -04:00