Commit Graph

36 Commits

Author SHA1 Message Date
Blade Barringer f7d30dbc86 Remove only block on karma test 2015-04-11 00:01:39 -05:00
Blade Barringer 8642366f15 scroll to top and load hero; add tests for new behavior. 2015-04-10 23:51:34 -05:00
Blade Barringer 24ef3aa012 Made uuid in hall of heroes populate the input box 2015-04-09 21:57:06 -05:00
John Montgomery c2e2122efd Forgot to change part of the new tag test. 2015-03-30 22:37:26 -04:00
John Montgomery c22acb81a8 Updates new tag code and test spec for new tags. 2015-03-30 22:07:02 -04:00
Kevin Gisi 7bed1efb21 Revised Grunt translations task to use build:test
* Added build:test task to generate translation JS for tests.

* Removed test/spec/translations.js from the repository, added to .gitignore.

* Updated test/run_tests.sh to run build:test, and accept an optional argument
  to run a particular test suite.
2015-03-24 21:39:03 -04:00
Kevin Gisi 1e59336d09 Repair remaining Karma specs - all passing.
* Stubbed out User module to repair rootCtrlSpec

* Loaded RootCtrl in inventoryCtrlSpec, as it was missing shared functions.
  Updated mock user to include a mounts hash.
2015-03-24 21:39:03 -04:00
Kevin Gisi 2194caec15 Repaired groupServicesSpec, uncommented specs.
As it turns out, the page reload behavior was not caused by $resource, but
exists somewhere within the User module. Stubbed out the User module as as done
in notificationServicesSpec
2015-03-24 21:39:03 -04:00
Kevin Gisi 09b6401794 Add translations to Karma specs
* Added a task to Gruntfile to use website/src/i18n.js to generate a small JS file to be loaded in Karma env which sets window.env.translations to the i18n.translations['en'].

* Added new Grunt task to build:dev

* Updated Karma specs to reenable testing where possible, updating comments where not.
2015-03-24 21:39:03 -04:00
Sean Zellmer 4bc4e836e4 Make karma tests pass.
This pends a lot of tests that are failing due to translations not being loaded in the environment, as well as some issues with the page reload in groupServicesSpec.

We removed the module declarations for habitrpg in each spec since that
has been moved to specHelper.
2015-03-07 15:48:23 -06:00
Nick Tomlin 64493375ad Fix broken group and member service specs
Both were trying to declare an angular mock module that did not exist.
The group service spec urls were also asserting a trailing `?` that
doesn't seem to be party of the actual request.
2015-03-05 12:43:07 -06:00
Nick Tomlin e7f65f219a WIP - Fix karma config file order to successfully boostrap app
There were a few issues here:

1. Relying on globs meant that modules were loaded out of order. So
'habitrpgc' was undefined when we were trying to add services etc to it.
The short term solution is to list them in the same way we list them in manifest
json. The long term would be switching everything to browserify so as to
avoid ordering/listing nightmare by having a single bundle.
2. We were missing exeternal deps (like 'hello') so the tests were
breaking before they even started. Some of them still are
3. We were including services that don't seem to exist anymore  (e.g. `habitrpgstatic`). We still are in certain places
2015-03-05 12:12:32 -06:00
Matteo Pagliazzi 8ec69b4f83 improve(i18n): move translations to their own module, use i18n from habitrpg-shared, @djuretic i have remove the tests because the code is now handled in habitrpg-shared, we may add them back there 2014-05-06 20:04:09 +02:00
Dušan Juretić 117c26cfd3 Added tests for translations (env.t) 2014-01-25 21:01:43 -03:00
Dušan Juretić efdd85fe2e Using newUser helper in tests 2014-01-18 20:42:28 -03:00
Dušan Juretić bca13b5557 First root controller test 2014-01-18 20:42:28 -03:00
Andrew Bloomgarden dc368bb652 Remove references to $rootScope.Shared & .Content in non-view code.
Instead, have them request services that return them so tests don’t need to prepare special state.
2014-01-15 21:33:58 -08:00
Andrew Bloomgarden 77801e458e Change static module name to habitrpgStatic.
The way the tests are written now, the habitrpg module definition in static.js
was clobbering the one in app.js. In other words, most of the tests weren't
testing what they thought they were testing.
2014-01-15 21:33:57 -08:00
Dušan Juretić 74495bb690 Fix tag creation test 2014-01-13 23:20:33 -03:00
Dušan Juretić f7f9bb1131 Fix memberServices test 2014-01-13 23:09:11 -03:00
Dušan Juretić aa0a515e5e Tests for filtersCtrl 2014-01-04 22:40:57 -03:00
Dušan Juretić 4777a693ba Test refactoring: user.user -> user 2014-01-04 17:35:45 -03:00
Dušan Juretić a74e99a78f Minor style changes to inventoryCtrlSpec.js 2014-01-04 17:32:30 -03:00
Dušan Juretić a4c7775d51 Tests for choosing a pet and buying an egg 2014-01-04 17:28:13 -03:00
Dušan Juretić 24815af9c1 Added inventoryCtrl tests for hatching and selling 2014-01-04 00:02:51 -03:00
Dušan Juretić d58568c9d8 Fix AuthCtrl tests with proper asserts 2014-01-03 23:28:43 -03:00
Dušan Juretić ae080fd474 Tests for inventoryCtrl 2014-01-02 22:49:31 -03:00
Dušan Juretić 6ab10f9f3d Fix unit tests 2013-12-23 22:38:15 -03:00
Dušan Juretić 9f32d3e7b8 Fix userServicesSpecs by adding notificationServices 2013-12-15 16:49:53 -03:00
Dušan Juretić 34ea6038f1 add single test for notificationServices 2013-11-15 22:42:30 -03:00
Dušan Juretić 2f5025e322 add tests for groupServices 2013-11-15 22:42:30 -03:00
Dušan Juretić f4ac5dfe8c fix unit tests 2013-10-31 22:35:35 -03:00
Dušan Juretić bb4350fb52 add tests for memberServices 2013-10-19 23:33:27 -03:00
Dušan Juretić 6830a9281d add tests for userServices, changed alert to $window.alert in userServices 2013-10-13 19:01:46 -03:00
Dušan Juretić 89b4d2ece0 authCtrl tests now working, replaced window for $window 2013-10-12 22:46:13 -03:00
Tyler Renelle c54c383c5a [#1534] add some more starter test code, still no tests 2013-09-13 21:19:02 -04:00