Commit Graph

278 Commits

Author SHA1 Message Date
Kevin Gisi
97323eaf23 Marked some tests as pending, after rebase 2015-03-26 17:57:58 -04:00
Kevin Gisi
17c7e199bd Fix some of the formatting changes - was accidentally testing against a newer version of coffeescript 2015-03-26 17:57:58 -04:00
Kevin Gisi
63fea58d08 Repair most Mocha API specs 2015-03-26 17:57:57 -04:00
Kevin Gisi
bcd3d9a0b7 Add Mocha specs for common back into the test suite 2015-03-26 17:57:57 -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
Kevin Gisi
f41933b7a1 Repair Broken Test Suite - Full Passing Tests
* Repair broken e2e test introduced in 8d03cfc (copywriting change was not
  reflected in the spec)

* Updated i18n.coffee code to be more cautious (it expected the 'en' locale
  would always be available, but provides appropriate error handling as-is).

* Extended timeout duration for protractor, as registration was slightly above
  30s.

* Added karma-mocha-reporter as a dev dependency to ensure test visibility.
2015-03-24 21:39:03 -04:00
Sean Zellmer
5ab2cb0908 Use PhantomJS and run karma in Travis-CI 2015-03-07 16:37:35 -06:00
Blade Barringer
6f8133d760 Corrected indentation of purchase test 2015-03-07 16:23:56 -06:00
blade
35f98993c4 Skipping groups test in api for now, revisit later 2015-03-07 16:09:56 -06: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
Nick Tomlin
dccf95a3c2 Fix nconf path in api test 2015-03-04 20:55:09 -06:00
Blade Barringer
c66966139b Fixed typo in comment 2015-03-04 20:55:09 -06:00
Blade Barringer
4de6ce0331 Wrote todo about what is wrong with the registerNewUser function 2015-03-04 20:55:08 -06:00
Blade Barringer
735aa59851 Updated request call to use correct form 2015-03-04 20:55:08 -06:00
Blade Barringer
e6e212d436 Added todo for area where test is failing to behave properly 2015-03-04 20:55:08 -06:00
Blade Barringer
c26aceb17a Used a numTasks variable and added comments 2015-03-04 20:55:08 -06:00
Blade Barringer
66ac773ce9 Added comment about expect 2015-03-04 20:55:08 -06:00
Blade Barringer
7200f3a1d2 Wrote a todo for test 2015-03-04 20:55:08 -06:00
Blade Barringer
e8be1524fc Removed the create a new user function call from groups, as it was now using the correct user to look up the leader 2015-03-04 20:52:05 -06:00
Blade Barringer
ab27dd405c Changed challenges completed count to calculate from total number of user tasks minus 2 (the two completed) 2015-03-04 20:52:05 -06:00
Blade Barringer
0716177d41 Corrected tests for archiving todos to reflect the correct number of default todos when creating account. 2015-03-04 20:52:05 -06:00
Blade Barringer
cac788e7db djusted paths 2015-02-03 21:43:10 -06:00
Blade Barringer
9b8f006064 Added sinon and corrected path 2015-02-03 21:30:43 -06:00
Blade Barringer
0f62845fb2 Moved tests into main test folder and corrected path to common files 2015-02-03 21:29:05 -06:00
Blade Barringer
08ab6eba71 Converted shared to common in api test 2015-01-25 15:54:19 -06:00
Blade Barringer
95951a4706 Updated moment calls to use number, period to fix the deprecation error 2014-12-19 19:41:22 -06:00
benmanley
50b1cba0a6 refactor(tasks) improve UI consistency
* Round corners for UI elements / “8-bit” outlines for RPG elements.
* Tag bar – Make it clearer that “Tags” is a heading, not an option
* Task filters – restyle in line with tag bar + nav menu
2014-11-27 10:32:57 +00:00
Matteo Pagliazzi
704a8658f3 require moment where necessary 2014-10-03 19:38:18 +02:00
Tyler Renelle
6253404677 tests(api.mocha): move bac to coffeescript from javascript 2014-09-07 17:06:24 -06:00
Joby Walker
8d1b17320a Update to wrap async calls with async.parallel 2014-08-06 21:10:54 -07:00
Joby Walker
7e059fe496 Fetch each member to get correct data
_group.members is an array of IDs not the user objects.  Fetch each one
to test.
2014-08-02 14:20:42 -07:00
Joby Walker
937920c5a5 Pets are set to 5 not true. 2014-08-02 14:19:30 -07:00
Joby Walker
a8c64a4524 Use explicit get for 'quest'
Quest is currently set to null when quests end. Mongoose wraps the value
in an object so the test will fail.
2014-08-02 14:18:39 -07:00
Tyler Renelle
a8b2b32557 refactor(groups): cleanup leave-group code 2014-07-11 14:43:11 -06:00
Tyler Renelle
9f1035c317 feat(dilatory): scene damage + boss def/str. bug fixes, tests 2014-06-25 14:12:30 -06:00
Greg Laabs
1bcc31683b Update spell cast test to ensure user has mana 2014-05-26 13:15:55 -07: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
Tyler Renelle
b0eb12bb5f feat(subscriptions): allow one month after sub start-date before it's terminated. Fixes #3180 2014-05-06 09:18:44 -06:00
James Hsiao
6010540dc5 Updated tests to account for new todos 2014-04-22 12:18:54 -04:00
Dušan Juretić
9995c255e3 Fix failing unit test 2014-03-08 23:37:37 -03:00
Denis
28729cf71b fix(tests): correctly return the exit code 2014-02-26 16:57:49 +02:00
Tyler Renelle
b95056606a Merge pull request #2869 from denis-sokolov/travis
chore(travis): remove travis config until the issues are resolved
2014-02-21 18:05:03 -08:00
Denis
7d17752fa8 fix(travis): disable selenium tests on Travis 2014-02-18 20:44:28 +02:00
Denis
13f8e55dce fix(tests): set a proper environment for tests 2014-02-18 20:44:06 +02:00
Tyler Renelle
78fcdd20c9 chore(tests): tests to go along with #1883 challenges fix 2014-02-14 20:37:16 -07:00