Commit Graph

93 Commits

Author SHA1 Message Date
Allen Rabinovich f69762e612 Modify message box layout and spacing.
* Modify the narrow icon in FontAwesome to make it better align to the pixel grid and display well on Windows+Chrome.
   * Move the message controls to the right
   * Hide the message info icon until the message is hovered / selected
   * Switch the star to a gray version
   * Increase the size of the gravatar
   * Adjust the spacing
   * Add the right-side message pointer
   * Fix private message background colors and mention colors
   * Modify star count test to account for new stars
   * Bug fixes for stream subscription messages and other miscellanea.

(imported from commit 3d3d9de7e03f3658c5c78b492051b2b7f795487d)
2013-05-22 21:55:15 -04:00
acrefoot 65c156decc Fix "WARNING: there is no transaction in progress"
(imported from commit e8a985b610990a4e937a527e85189e927c42667c)
2013-05-22 18:04:56 -04:00
Leo Franchi 8cc3ed9c79 Add a --remote-debug option to our frontend test runner
(imported from commit 58e8717293f3c58cb7c3c499c7e5abd62ec22199)
2013-05-22 09:49:49 -04:00
Leo Franchi 4f92ce0fc0 Fix unread count test by being slightly more robust
Still not perfect, but now we move the pointer down and scroll
to make sure that the newly read messages are truly marked as read

(imported from commit 2b9a14d1c8695eac0ed9fb03484068dd9b08b940)
2013-05-22 09:46:32 -04:00
Tim Abbott 6f42b90d23 casper: Increase wait_for_receive timeout again.
We're still failing frontend tests randomly due to this timeout being
too short.  Ultimately we should fix this by making the
wait_for_receive check smarter, but this will do for now.

(imported from commit ff4b18beb88b957c705fd98cd9064902c9985f62)
2013-05-21 13:46:08 -04:00
acrefoot 94c61f5507 [manual] Humbug testing databases now backed by postgres
Currently our test database is backed by sqlite; this commit moves
us to using postgres for our all database needs. This, in conjunction
with the patched django on github, allow us to have fewer hacks and
more true-to-life tests. It also sets the stage for testing the bulk_create
and schema search_path patches made to django.

Developers will need to run:
./tools/postgres-init-test-db
./tools/do-destroy-rebuild-test-database

this is assuming that they have already run:
./tools/postgres-init-db
./tools/do-destroy-rebuild-database

at some point on this pg_cluster. (The ordering is important; it will other-
wise complain about the south_migration table).

(imported from commit c56c6f27e13df7ae10b2e643e65d669dde61af3d)
2013-05-20 23:55:03 -04:00
Allen Rabinovich 93a2e23e96 Change the layout of the message boxes in the message pane and make other message-related adjustments.
Specifically:
   * Leave the avatar image as inline and round it.
   * Move timestamp to the left column.
   * Replace the "Info" link with a permanent info sign.
   * Move the pointer bar to the left.
   * Remove borders
   * Change selection background colors, and PM colors.
   * Introduce the "narrowing" icon into our FontAwesome set.
   * Modify the tests to account for the new "narrowing" icon and fixed a bug in star-finding.
   * Clean up CSS and add a more prominent color to private messages

(imported from commit 8a8d6de8acccc52c0d16f5d1ce31aabdc72c88c8)
2013-05-20 23:40:17 -04:00
Waseem Daher 1117278983 Clean up URL scheme a bit.
Nicer URLs:
	/login to login
	/register to register
	/signup to signup

(Step two is to remove, e.g. /accounts/home/)

Also make /login the default page when you're not logged in.

(Prior to this commit, it was annoyingly different on deployed
vs. not.)

(imported from commit 21adb7a94f03256098d15b2e608d793d3ddb5b23)
2013-05-20 23:29:55 -04:00
Tim Abbott 1fae5cfed4 casper: Increase timeout for receiving messages.
Empirically we were having test failures due to not waiting long enough here.

(imported from commit f9269f00c0ba2f740dca786773b5bedf9fba0cde)
2013-05-20 23:29:53 -04:00
acrefoot 47c8062e2f Compose box doesn't reply, and remove new stream/PM buttons
This removes the large "New stream message" and "New private message"
from the left sidebar. It also makes the default action when clicking
inside the composebox the same as the "New stream message" button used to
do (instead of replying to the stream-subject pair at the current cursor).

(imported from commit 316f03a35b781aca4c42555f74b99c4332ff42de)
2013-05-17 01:02:33 -04:00
Waseem Daher 9384870ffa Always-open composebox.
Really, the "correct" way to do this is to undo "scrolltheworld", and
then just have a compose div that always lives underneath the message
list div. (This will also allow us to deal much more reasonably with
the whole "Is the composebox in focus" thing.)

In the interest of prototyping something more rapidly, though, we
adopt the somewhat more hackish approach, with the understanding that
much of it will probably be simplified later.

(imported from commit e2754be155c522b6dac28e7b84c62bd2030217c8)
2013-05-09 10:35:46 -04:00
Zev Benjamin 8702d37028 Do narrow-related side-bar manipulation in event handlers
This commit also fixes a bug where "starred messages" wouldn't get
bolded when you narrowed to starred messages.  However, it also
introduces a regression where subjects aren't highlighted correctly
on load to a narrow which will be fixed shortly.

(imported from commit 411575d92762e41d04c1baf126c0ab1dfb4225a5)
2013-05-07 11:47:13 -04:00
Allen Rabinovich e28cef697f Switched the star icon to FontAwesome and made it bigger and green.
* renamed the 'icon-star' style to 'icon-vector-star' to keep backwards compatibility for icon-* classes
  * changed relevant styles in zephyr.css; added FontAwesome assets
  * changed relevant CSS classes in base.html, left-sidebar.html, ui.js, message.handlebars
  * added new fonts.css to start consolidating all font-based assets
  * added fonts.css to PIPELINE_CSS in settings.py under 'portico' and 'app'
  * modified the stars test suite to reflect new star icon class name.

(imported from commit 3116fcfd4b5fb4edecd457da554fea616bb7081b)
2013-04-21 17:31:50 -07:00
Tim Abbott 7ce6154464 Set UserProfile to be the AUTH_USER_MODEL.
(imported from commit 92bf66b3e6a8ed06054bd491bcc96ef422a1fbe1)
2013-04-04 15:45:44 -04:00
Tim Abbott 51911d304d generate-fixtures: Run after schema changes even without --force.
(imported from commit 1daff2ee6746c4036c3cc71746ad59e18b5a331e)
2013-04-02 16:27:13 -04:00
Keegan McAllister 33ac53b849 tests: Reinstate star tests
(imported from commit f61762b0296922ee72e1304718044d5df78abd12)
2013-04-01 11:03:17 -04:00
Keegan McAllister c1a0309bb4 tests: Test more ways of narrowing / un-narrowing
(imported from commit 470b9fb5fc7e418944fee577d510d4ee0a78cd68)
2013-04-01 11:03:16 -04:00
Keegan McAllister 50ef0a6edb tests: Move page console.log support into common.js
(imported from commit e875e67ad44ef10d9d84671a14a4d1755c0154df)
2013-04-01 11:03:16 -04:00
Keegan McAllister 0263bace8a tests: Factor out message checks in 02-narrow.js
In anticipation of testing several UIs for narrowing.

(imported from commit 9403be5550de4f4503933aa03dc45335a7f3fc63)
2013-04-01 11:03:16 -04:00
Keegan McAllister bd85af4d02 tests: Move narrowing tests into their own file
(imported from commit 673fb5f862d08de1dfff1abb8db5efb76039e1ba)
2013-04-01 11:03:16 -04:00
Keegan McAllister 5015c77b33 tests: Clean up code for sending multiple messages
(imported from commit 194490a764d05408e9849bd3a80552c7173f5112)
2013-04-01 11:03:16 -04:00
Keegan McAllister 7e348783e6 tests: Update comment about common.keypress
(imported from commit c58d850ba4fa291e62ffdf56d8e647688940a3ed)
2013-04-01 11:03:16 -04:00
Keegan McAllister 83f1071259 tests: Move more helper functions to common.js
(imported from commit 2a4e2acda367f087acee69f46b6542e3762f5000)
2013-04-01 11:03:16 -04:00
Keegan McAllister b2dea39fad tests: Remove initial dummy message workaround
I can't reproduce the problem this works around anymore.  If it comes back,
let's debug and figure out what's happening.

(imported from commit 26096405a93a530e449c9f1f60d8110b1bb0e96b)
2013-04-01 11:03:16 -04:00
Keegan McAllister 8e6587e92f tests: Use common.js in 00-login.js
(imported from commit b4f3150ee9bbb2c37c3bd5cb0032d8d210d8e976)
2013-04-01 11:03:16 -04:00
Keegan McAllister b09c829fd6 tests: Move common initialization into casper.start
Otherwise it fails when common.js is used by the very first test.

(imported from commit 5299072a62c63202c641b2a11b40aafb9c89e13e)
2013-04-01 11:03:15 -04:00
Keegan McAllister 0c3e21e4b2 tests: Split subscriptions and settings page tests into their own files
Delete star tests for now and restore them later -- it's much easier
this way.

(imported from commit 0572aa64b39d73fddb40b57db554e1f0f14973af)
2013-04-01 11:03:15 -04:00
Keegan McAllister d6810efc90 tests: Fix URL test for new event system
(imported from commit 07671e9a8b678a725b5f49ed755f008107734251)
2013-04-01 11:03:15 -04:00
Leo Franchi 199610fe7f Add tests for unread count in sidebar
(imported from commit dc10016258bf61599ceae434623040a2a7dd5946)
2013-03-28 17:37:32 -04:00
Jessica McKellar 39602a4437 tests: add frontend tests for starring.
(imported from commit 6a35286cf4a1e3db9adbc14f8d6c0aa0a05b24db)
2013-03-28 16:59:59 -04:00
Keegan McAllister 45eb9bcf47 tests: Disable tutorial through the server side variable needs_tutorial
This fixes a nondeterministic test failure for me.

The first message sent in the test suite appears to get dropped.  I don't know
why this is, and I'm pretty sure it was an existing bug.  This message used to
be the one disabling the tutorial, which might explain why that didn't always
work.

Regardless, this commit at least makes the test suite usable, and we can work
on fixing that bug later.

(imported from commit 063e40871b9883e3a6dab93a4e0a51c5b2dae4b7)
2013-03-18 13:46:46 -04:00
Waseem Daher 9920dcd22a Properly disable the tutorial in the test suite.
I think my previous commit causes the tutorial to run more regularly
in the test suite, so we,  in turn, need to be more systematic
about disabling it.

(imported from commit c3805438b0564874a358526d3592b86d147547c0)
2013-03-12 11:05:46 -04:00
Zev Benjamin ebb095d0ce tests: Basic compose box tests
(imported from commit e1e7fc1f9efec464f1a86c1a8b39c1a6db207adb)
2013-03-07 14:30:08 -05:00
Tim Abbott 0c62dcc9f6 tests: Move casper.page.onError setup outside casper.start().
This has no functional impact, it's just for clarity.

(imported from commit 2ec1948929df120a3a410324412912ec062b8500)
2013-03-06 11:36:15 -05:00
Tim Abbott b861e19654 tests: Write screenshots for all casperjs failures to /tmp/.
(imported from commit 4e1a54b89fce76c6923157967ade3d525f5c7f30)
2013-03-06 11:36:15 -05:00
Tim Abbott 0fee4e8d9d tests: Set casperjs viewport size to a reasonable browser size.
Otherwise we're by default testing the phone size layout, which
probably isn't what we want the default test setup to be.

(imported from commit a76b2d51c18824b0a5f6342cce848aca87dda15a)
2013-03-06 11:36:15 -05:00
Zev Benjamin a84947eade tests: Don't regenerate the test database every time we run tests
This cuts about 6 seconds off of the test startup time on my laptop.
The other startup costs are about 1 second for the server to come up
and about half a second for casperjs to begin executing tests.

generate-fixtures now takes a '--force' option that can be use to
force a regeneration of the test database.

(imported from commit 1f473507502f0edf159b2638abb392d9357eb46f)
2013-03-05 17:26:50 -05:00
Tim Abbott eadb2ea6d3 Update casperjs to 1.0.2.
(imported from commit 9e34b51c4588dce6419ea86024b2e8c06346a685)
2013-03-05 15:10:32 -05:00
Tim Abbott 0891f3e4e5 tests: Actually wait until message is sent on send_message.
Previously, using e.g. the search box would be problematic because the
compose box closing event might fire, blurring the search box, in the
middle of whatever you were doing.

(imported from commit cc045f5a6a7b7fbf72848da14b6fcd3df39cab05)
2013-03-05 15:08:47 -05:00
Zev Benjamin 86f5030587 tests: Allow frontend "run" script to accept a list of test files to run
(imported from commit 1d29be561bf6a2501797d4875b9deb43eb560fb3)
2013-03-05 11:57:24 -05:00
Zev Benjamin e588323f5d tests: Move log int and log out functions into a common.js
(imported from commit d6c2f45af775dea9c99426aa46b08ed45eb76d17)
2013-03-05 11:05:12 -05:00
Zev Benjamin d5493ed580 tests: Split site.js out into 00-login.js and 01-site.js
(imported from commit cdd3b2c675b6ae33456377546424fcc5cad58cf5)
2013-03-05 10:32:55 -05:00
Waseem Daher 7d97a739df Don't let tutorial break test suite.
I don't actually have this problem, but Jessica et al tell me that the
tutorial bot's messages sometimes arrive too late for them and it
interferes with the test suite's ability to run correctly.

I add a delay which should hopefully reduce the occurrence
of this issue.

(imported from commit 0f41610ada7dd49d71f0deef034e014164357197)
2013-03-04 16:27:14 -05:00
Waseem Daher 6743d0e4fa Disable the tutorial as part of the test suite.
It's causing unexpected messages to appear.

(imported from commit e80a8cd43a771c4d06a7147e06b21246f47de316)
2013-02-28 13:23:13 -05:00
Keegan McAllister 9323203cfb frontend tests: Remove trailing commas to make JSLint happy
(imported from commit b62192e67a74f1f47e87f87245c910f42e0b3bec)
2013-02-20 16:02:30 -05:00
Waseem Daher 91a3e0402f Update test (again) to match new '>' delimiter.
It looks like there was a stray | in the tests.

(imported from commit 991c35988daa1d6dbf268f8334f28ab69e222eb4)
2013-02-15 12:14:59 -05:00
Jessica McKellar 1f24133292 Update tests to match new '>' delimiter.
(imported from commit e9a0c60ee89f7cd3cf0756baaf35221263c3d3be)
2013-02-15 11:01:06 -05:00
Keegan McAllister 59bfe38448 Fix wait condition in subscriptions frontend test
Waiting for text "Waseemio" to appear isn't reliable, because the "create
stream" modal already contains that text.  Instead, do a more specific check
for a .subscription_name element.

(imported from commit 54689aeb9d243c3fb62d1765b2b4fb93d3bb40db)
2013-02-06 13:49:37 -05:00
Jessica McKellar 474a91e25b tests: update frontend tests to reflect subscription page changes.
(imported from commit 1f34863b8cf1a2d951153fd4a66132418ea07a23)
2013-02-05 10:01:45 -05:00
Zev Benjamin 2e7d411ef8 Remove redundant success messages from subscriptions page
The fact that the user sees a change (the button changes or a row
appears) makes it obvious that the operation was a success.  The
success messages were only serving to make the page scroll
confusingly when you couldn't see the top.

(imported from commit 471b9304f71bb8533c98d208b855d4d75c04a886)
2013-01-24 17:59:03 -05:00