Commit Graph

128 Commits

Author SHA1 Message Date
Steve Howell 1b1f80f3d7 Show "Home" less often as a search suggestion.
We now only suggest "Home" if you have an empty search box (suggestion #1),
or if you are typing "Home".  Before we'd show it as a way to get back
from various narrows.  This is trac #1596.

(imported from commit 9228bf45e9aaf9912d83efdf70338abb4b7e054f)
2013-08-05 15:56:12 -04:00
Steve Howell b291037f5d (tests) Remove jQuery stubs in search_suggestion.js.
(imported from commit a9b9bb86ed6aee96443cbfef5171f93dc9a0fa51)
2013-08-02 17:28:03 -04:00
Steve Howell 3726b86a94 (tests) Rename search.js -> search_suggestion.js
This follows up on extracting code to js/search_suggestion.js, and all
the search tests apply to the new module.

(imported from commit dec6c8614c25b4f82da57edeaddc7cfef28260a5)
2013-08-02 17:28:03 -04:00
Steve Howell b33858dd70 Created search_suggestion.js.
Moved 400+ lines out of search.js into search_suggestion.js.  This
leaves search.js primarily responsible for lots of little DOM
interactions, whereas search_suggestion is more about data.

(imported from commit 53d08b29367c0172e483064f213538d45098279e)
2013-08-02 17:28:03 -04:00
Steve Howell c6aeeafe1d Added test coverage for search suggestion descriptions.
(imported from commit 1693ad7343106deab0c8f2838088d27b407e39eb)
2013-08-02 17:28:03 -04:00
Steve Howell 95102dc1bd Refactor search_suggestions.js.
1. Change code comment in search.get_suggestion.

2. Remove side effects from search.get_suggestions.

The function get_suggestions() was updating a module-scoped variable
called search_object, but now it returns a dictionary to its caller.

3. Greatly reduce the scope of the search_object var in search.js.

I also clarified the comment around it a bit. We could squeeze
the scope of search_object even further by using a function wrapper, but
this is a big enough win for now.

(imported from commit 4b633dd30ab45d24b85ea1d10df27df5aaa0c959)
2013-08-02 17:28:03 -04:00
Steve Howell 2442edee9e Add the "static" directory to NODE_PATH for unit tests.
I added our "static" directory to NODE_PATH for our JS unit tests.
This eliminates most of the verbosity in our require statements, but
it still requires us to explicitly call out "js" or "third"
subdirectories, which should make it a bit easier for folks reading
the tests to distinguish modules from js, third, or node itself.

(imported from commit b77a5283135d388d46f4b7e511acc59986f1a8ba)
2013-08-01 17:58:25 -04:00
Steve Howell d82ccb6243 rename tests
(imported from commit cd98a86a5e07765f753ac1904e45ccd1213d6d67)
2013-07-30 09:05:49 -04:00
Steve Howell 998a22eabb Created test_search.js. (unit tests for search.js)
(imported from commit 8127c04ccc68a9ac106e5684a7ea9a621cb1831f)
2013-07-30 08:55:44 -04:00
Scott Feeney 9e2e857a88 Fix narrow test calling .then() in a callback
As Kevin points out, un_narrow() itself calls casper.then() so should be
called outside of a callback, not inside one.

(imported from commit c5f02a14c750045697558aeafb070227e3a9d24c)
2013-07-29 14:51:40 -04:00
Scott Feeney c2ce181203 Fix race conditions in 02-narrow.js tests
(imported from commit 6a4b22992c35cdebc86194282d6a348ee9c4b810)
2013-07-29 14:51:40 -04:00
Steve Howell a004a15ff5 [important] Fix paths related to recent zephyr/static changes.
This fixes the previous commit to master.

(imported from commit 43637dcf0832a4e91de9fd98ebb777c77a3eee19)
2013-07-29 14:02:20 -04:00
Steve Howell 46c4a6a9b3 Add unit test coverage to unread.js.
This covers most of the module's functionality, with special
emphasis on lines that use underscore.js (_.each and _.filter).

(imported from commit 074181a0273286a258504be634bdd1cead2eecd5)
2013-07-29 13:47:57 -04:00
Tim Abbott 3bba0cc927 Move zephyr/static to just static.
It's not really a part of the server (aka the rest of zephyr/).

(imported from commit 27f6b6b064938ad927075a68d873e4b68710d279)
2013-07-29 12:11:26 -04:00
Steve Howell a9da6e28e7 Made minor changes to test_message_tour.js
I added a comment at the top, and I made it run the test
more automatically.

(imported from commit db6e382d766d0cc35eed28d589608645253f23e8)
2013-07-29 10:28:14 -04:00
Steve Howell f258ce2127 Created test_message_tour.js.
I haven't hooked this into test-all yet, but I did modify
message_tour.js to accomodate the test.

(imported from commit e58f595f4fe1160f539c18ec09dbe22eebf1f104)
2013-07-26 14:52:32 -04:00
Scott Feeney d11a997dc3 Show space between multiple recipients (#1606)
Also adds a CasperJS test to verify multiple huddle recipients are
displayed properly.

(imported from commit 07f5f5ed30e360ac3f524d89e512bb1f20acaaa7)
2013-07-26 14:44:07 -04:00
Tim Abbott cdeaceea47 Fix URLs for wiki following mediawiki transition.
(imported from commit 140b4f7044f6e68c16d743c0e91dcf5a2557311e)
2013-07-25 17:27:45 -04:00
Tim Abbott 77b0ddef78 [manual] Rename shakespeare users to zulip.com domain.
We need to update our Nagios configuration when this is deployed.

(imported from commit 28cc3ecfe30c41562742733d6952c8e69b87d67e)
2013-07-25 17:19:17 -04:00
Tim Abbott a9b3b20ea6 Use stream Verona rather than Venice for unread count tests.
It's the only one all of test users are guaranteed to be subscribed
to.

(imported from commit 371315f4988cb5b0d6a8ef287575607a91d22d30)
2013-07-25 17:16:53 -04:00
Tim Abbott f765f40911 We don't need to sync the API keys in the test data.
(imported from commit 7eb4aef657e94e02e3fc596b216de81dc71115ec)
2013-07-25 17:16:53 -04:00
Jeff Arnold 5190a9692a Hide text for the > icon so that copy paste captures it
Addresses Trac #1296

(imported from commit 650672b971f18b4e1bfb185987768b55504ee1e8)
2013-07-22 16:33:27 -04:00
Jessica McKellar dac5a46fa4 Rename user-visible uses of "subject" to "topic".
(imported from commit 19e08a13624686da8703fcb8b5eefe2e29edf64b)
2013-07-17 12:04:45 -04:00
Scott Feeney 82e33881b5 Add failing test for #1511 (focus when composing)
Next step is to make the test pass.

(imported from commit a9401366c63166f39b8b73d6228c845af10c931a)
2013-07-16 17:57:54 -04:00
Kevin Mehall 8df4857524 Revert to old mark as unread on view behavior.
Effectively reverts 185e865 and b67e52d.

(imported from commit e9b95f1fd9e2ab7926f15910044e9e9879ea085f)
2013-07-11 14:01:26 -04:00
Steve Howell 97994ea7a9 Shorten private operator (private-message -> private).
(imported from commit f938bd56de05cc8fc0da18348d4dec8a18c96bb9)
2013-07-10 16:58:17 -04:00
Steve Howell 249252f700 Put spaces after "function" in JS code (cosmetic).
(imported from commit 7579547bfed70b3e53122109d0d6f30ea01f5ac3)
2013-07-05 16:32:32 -04:00
Kevin Mehall 22c1a66da8 Don't mark messages as read by visibility.
Trac #1428

(imported from commit b67e52d7434220e397ca20ffa49915de6633519c)
2013-07-03 17:10:15 -04:00
Kevin Mehall 0983840e7b Fix 06-unread regex, as it no longer seems to match the count.
(imported from commit 9815772454d11c5216a162a0e0919a990670e54e)
2013-06-14 14:52:38 -04:00
Kevin Mehall ae6afac3ca Fix race condition in 07-stars.js test.
(imported from commit ad309b2d30f02c93be47319086cd330684042e80)
2013-06-14 14:52:38 -04:00
Kevin Mehall 3f2bdae1e1 Casper tests: avoid races in 03-compose
(imported from commit 42f47073b96e72831e6cf560b6b50f9862d5b4cd)
2013-06-14 14:52:35 -04:00
Kevin Mehall 878094aad3 Add casper tests for the settings page. Trac #1118.
(imported from commit f611d3cb6c1651e96c782bca5f6bbbdc69613516)
2013-06-14 14:50:45 -04:00
Kevin Mehall 7363851561 Add casper tests to check that the subject/stream/recipient fields are populated when replying
(imported from commit 7a0337467c6e7a1ed3118e07d2b4ad904719e093)
2013-06-14 14:50:38 -04:00
Tim Abbott 34904c51a3 Sync the local user's API key into test database.
(imported from commit 999334fea0d922ced506b454163e640a35a30509)
2013-06-12 16:21:10 -04:00
acrefoot da361b9208 jbarnold composebox UI experiment
1) When you send a message, restore the focus to the composebox, targeted at the same recipient
2) If the composebox is completely empty and you press up or down, have that close the composebox and take the appropriate action
3) If you started the compose via a reply option (r, enter, click), don't refocus the composebox if the cursor has changed.

(imported from commit 84545e49d06959eb62e7fd2b22e1387383df6d1d)
2013-06-07 17:39:31 -04:00
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