Commit graph

294 commits

Author SHA1 Message Date
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
Tyler Renelle
ada926de9a test(quests): change quest testing from vice1 => vice3 (ps, I'm doing
this to test drop types separately, preferable if we can us all 3 tests
- this & previous commits)
2014-01-31 15:06:57 -07:00
Tyler Renelle
e3e5399584 test(quests): change quest tests from gryphon => vice1 2014-01-31 15:06:56 -07:00
Dušan Juretić
117c26cfd3 Added tests for translations (env.t) 2014-01-25 21:01:43 -03:00
Tyler Renelle
e0646bb98d fix(spells): add some spells tests, don't send up body to spell paths 2014-01-22 00:16:52 -08:00
Tyler Renelle
990c3aa762 test(quests): make sure other members get drop 2014-01-21 15:59:53 -08:00
Tyler Renelle
f478d10c20 fix(quests): bug fix to multi-drop 2014-01-21 15:08:11 -08:00
Tyler Renelle
d9e5725ee1 feat(quests): allow quests to drop multiple items 2014-01-21 13:13:15 -08:00
Tyler Renelle
f71d6957e8 test(quests): test quest drops 2014-01-21 13:07:33 -08:00
Tyler Renelle
18e98abfa1 test(quests): ensure non-questers don't get hurty by boss on cron #2249 2014-01-21 12:45:18 -08:00
Tyler Renelle
07bca1f265 test(quests): start adding quests/bosses quests. Unfortunately it failes because it() is parallel, but Im trying to have each it() setup for the next. Gotta figure somethign out 2014-01-21 09:51:38 -08:00
Tyler Renelle
4efd0f5ed8 fix(bosses): don't reset progress.up when starting a new quest. We want
to be able to carry over damage from the same day a boss battle begins,
even if the dailies were completed before battle-start. Fixes #2168
2014-01-20 16:40:48 -08:00
Tyler Renelle
9cdf6b5e34 chore(todos): add tests for 3-day todo archiving #2478 2014-01-19 17:39:50 -08: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
Tyler Renelle
29b1320f4a chore(archived tests) Moving unused tests, casper stuff, and
api.mocha.coffee into archive directory. we could depend on git history,
but I want to keep them publicly visible to developers for now since
they may contain valuable test worth porting to our new
setup.
2014-01-16 16:32:53 -07:00
Andrew Bloomgarden
f94ea084d7 Update README to account for API tests in JS. 2014-01-15 21:34:36 -08:00
Andrew Bloomgarden
c9e3b37ff8 Rewrite API tests in normal JS. 2014-01-15 21:34:36 -08:00
Andrew Bloomgarden
689dddee7f Actually wait for Selenium to start. 2014-01-15 21:34:20 -08: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
Matteo Pagliazzi
263a752abf add mocha tests to travis, remove makefile 2014-01-15 20:11:29 +01: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
Tyler Renelle
a326072858 start adding quests tests 2014-01-05 15:08:10 -07:00
Tyler Renelle
e474278ab3 groups: upon group-creation, creator is automatically assigned as leader
and only member. Remove sending up leader & members from the client,
should all be handled on the server
2014-01-05 15:08:10 -07: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
Tyler Renelle
9a6f0c0339 challenges: don't remove To-Dos that are part of a challenge when
clearing completed
2014-01-03 14:18:53 -07:00
Tyler Renelle
c9e083b602 challenges: add "official habitrpg challenge" option 2014-01-03 13:36:13 -07:00
Tyler Renelle
abd300199a challenges: allow members to override challenge.tasks.notes, and sycning
challenge won't update those notes.
2014-01-03 13:10:56 -07:00
Tyler Renelle
6d8e4ed8a2 tests: api.mocha.coffee cleanup WIP 2014-01-03 10:26:46 -07:00
Tyler Renelle
2c1eb955ac fix #1954 . Start updating API tests, beginning with challenges. Use
test to fix "challenge updates not updating users' tasks"
2014-01-03 00:01:24 -07:00
Dušan Juretić
ae080fd474 Tests for inventoryCtrl 2014-01-02 22:49:31 -03:00
Dušan Juretić
803a45b47f Test server port changed to 3001 2014-01-01 14:01:51 -03:00
Dušan Juretić
431622ce14 E2e tests: launch Selenium and node server and kill them after finishing the tests, using a test database 2014-01-01 14:01:51 -03:00
Dušan Juretić
69c4977511 Fix again e2e test 2014-01-01 14:01:51 -03:00
Dušan Juretić
c572a195aa Take screenshot of failed e2e tests 2014-01-01 14:01:51 -03:00
Dušan Juretić
87e7b2ead6 Fix build by giving more time to Protractor 2014-01-01 14:01:51 -03:00
Dušan Juretić
a6443bceb8 Fix build 2014-01-01 14:01:51 -03:00
Dušan Juretić
91b0f3fb96 E2e testing: added tests for failed login and register new user 2014-01-01 14:01:51 -03:00
Dušan Juretić
462bc416de Starting e2e testing 2014-01-01 14:01:23 -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
Tyler Renelle
449ea620af mongoose WIP: use mongoose in API routes, instead of Racer. Add mongoose middleware to perform proper Derby <-> API transformations. some safe-guarding of PUT /user paths, send error messages if they're using the old way. remove task deletion & addition from PUT /user 2013-08-24 18:52:29 -04:00
Tyler Renelle
319c2667d7 some sloppy mocha tests for corrupt task handling 2013-08-15 00:28:27 -04:00
Tyler Renelle
0d83ac09fc api; on batch-update, override res.send & res.json to call the series
callback instead, and simply skip error paths. we need to send down the
error eventually
2013-08-14 21:50:17 -04:00
Tyler Renelle
66bdd3616e API utility sendResult function, new POST /api/v1/register route to register new uname/pass users (i'm thinking about nixing facebook altogether in the future) 2013-08-14 19:35:14 -04:00
Tyler Renelle
2252bebf9b set mocha timeout to 4s 2013-08-14 09:42:25 -04:00
Tyler Renelle
d17bd6fe90 api: export all of api to functions, called by route. This way we can have our /batch-update route access the api functions 2013-08-11 00:47:40 -04:00
Tyler Renelle
e667b3a2b0 start adding v2 api tests (nothing here yet) 2013-08-08 14:04:07 -04:00
Tyler Renelle
8e922bb151 API: add facebook auth route 2013-07-12 17:15:11 -04:00
Tyler Renelle
704a056c47 Merge remote-tracking branch 'switz/api-authentication' into develop
Conflicts:
	src/server/api.coffee
	test/api.mocha.coffee
2013-07-12 16:36:12 -04:00
Tyler Renelle
f0c50e1cfe fix api + tests 2013-05-25 19:42:59 +01:00
Tyler Renelle
955c2841ea tests: get rid of user.mocha.coffee, now it's in habitrpg-shared 2013-05-25 18:29:42 +01:00
Tyler Renelle
62c9e45e2e habitrpg-shared: use newUser from shared helpers instead of in character.coffee 2013-05-24 11:34:17 +01:00
Tyler Renelle
32cf11b533 use lodash in tests for consistency 2013-05-23 17:34:27 +01:00
Daniel Saewitz
3680900577 API Auth working + 1 test 2013-04-21 11:53:36 -04:00
Tyler Renelle
88d2eee519 start adding tests for user.put 2013-04-12 16:38:07 -04:00
Rob Scanlon
4958690bcb update a test to check for undefined value when making new habit 2013-04-04 18:09:06 -04:00
yangit
6369e8e9c0 using eval tests 2013-04-02 22:08:16 +08:00
yangit
032564334c using eval tests2 2013-04-02 22:05:36 +08:00
yangit
8a6fede4fe using eval tests2 2013-04-02 21:47:37 +08:00
yangit
c9112feaf7 using eval tests 2013-04-02 21:30:53 +08:00
yangit
2570e5e134 stats tests ok
tests splitted into files
add.items tests fail
2013-04-01 22:43:26 +08:00
Tyler Renelle
381bd6e9ec Merge pull request #707 from switz/api-4
@lefnire => Array API
2013-03-22 13:59:49 -07:00
Tyler Renelle
2a89ba62c8 Merge pull request #706 from switz/api-3
Mark todos and dailies as completed via api
2013-03-22 13:59:39 -07:00
Daniel Saewitz
355dde07f4 Array to /user/tasks 2013-03-22 16:52:33 -04:00
Daniel Saewitz
b56bc6b1d9 Mark todos and dailies as completed via api 2013-03-22 16:01:40 -04:00
Tyler Renelle
c876fe5b65 move test2 to test/test2 2013-03-22 13:40:38 -06:00
Daniel Saewitz
81b14cfac6 Add alternate scoreTask 2013-03-20 16:52:32 -04:00
Tyler Renelle
e51cf0089e typo test/api.mocha.coffee 2013-03-12 17:52:44 -07:00
Daniel Saewitz
188e4ff271 Remove one id from array of typeIds instead of rewriting whole array 2013-03-09 09:14:07 -05:00
Rob Scanlon
2111cca09a Delete task for the API tests 2013-03-09 02:08:50 -05:00
Daniel Saewitz
7cb291c4de Rename user.stats.tnl to user.stats.toNextLevel 2013-03-06 20:39:48 -05:00
Daniel Saewitz
5141aeda78 Fix broken tnl test 2013-03-06 19:59:19 -05:00
Daniel Saewitz
5a1343a3b7 Set maxHealth to 50 2013-03-06 09:11:14 -05:00
Daniel Saewitz
ef7d705059 Add to next level to user stats on API 2013-03-06 08:45:51 -05:00
Tyler Renelle
34f5f2dc54 custom dayStart 2013-03-03 01:21:10 -05:00
Daniel Saewitz
4377ff918a Prepend /user to the /task/:id routes 2013-03-01 15:11:35 -05:00
Daniel Saewitz
33b529731c Remove extra query 2013-03-01 06:03:05 -05:00
Daniel Saewitz
4e6c741594 Shouldn't update type in task PUT 2013-03-01 05:48:49 -05:00
Daniel Saewitz
c080ddc683 Separate out logic for tasks plus specs 2013-03-01 05:16:55 -05:00
Tyler Renelle
26de70c17c temporary set session so we can save new user in tests 2013-02-28 20:42:52 -05:00
Tyler Renelle
3017f5a592 small test tweaks 2013-02-28 18:24:14 -05:00
Tyler Renelle
9c6e061e8d return all objects on user API call 2013-02-27 17:10:20 -05:00
Tyler Renelle
4b2b0281ee add nconf to test 2013-02-27 17:06:47 -05:00
Daniel Saewitz
8ba137d3ce Remove config and scoring 2013-02-27 16:58:57 -05:00
Daniel Saewitz
822f779812 Merge and fix tests 2013-02-26 19:17:11 -05:00
Daniel Saewitz
c38f215db5 Add type parameter to /user/tasks 2013-02-26 16:44:26 -05:00
Daniel Saewitz
bc5abba179 Add task/:id PUT 2013-02-26 15:21:17 -05:00
Tyler Renelle
0a3fc9f715 instructions on running node-webkit-agent for debugging memory leaks 2013-02-26 12:42:53 -05:00
Daniel Saewitz
07648cd60b all tests passing - woo 2013-02-26 03:48:10 -05:00
Daniel Saewitz
52c5444453 Remove second store 2013-02-26 02:56:47 -05:00
Daniel Saewitz
17a5040b3b Server runs inline with tests 2013-02-26 02:55:33 -05:00
Daniel Saewitz
f9f57a6b91 Cleanup and more checks 2013-02-26 02:36:51 -05:00
Daniel Saewitz
e4f4227072 Cleanup 2013-02-25 14:32:46 -05:00
Daniel Saewitz
7ce7677816 Cleanup 2013-02-25 02:44:57 -05:00
Daniel Saewitz
1be9fb97fe Use headers instead of auth 2013-02-25 02:43:50 -05:00
Daniel Saewitz
bfd30cd4b7 wip 2013-02-25 00:24:11 -05:00
Daniel Saewitz
faa94b3692 Almost perfect 2013-02-24 23:00:22 -05:00
Tobias Leugger
f154a3ba66 Fixing all casper tests except registration and rest 2013-02-23 19:06:48 +01:00
Daniel Saewitz
bddd0bd148 wip 2013-02-23 04:45:00 -05:00
Daniel Saewitz
177c7e4f17 Working again 2013-02-23 03:20:16 -05:00
Daniel Saewitz
4358455ef2 update 2013-02-22 22:24:21 -05:00
Daniel Saewitz
e557bf89a7 Status test 2013-02-22 13:56:24 -05:00
Daniel Saewitz
9f044d2cf4 tests 2013-02-22 13:54:35 -05:00
Daniel Saewitz
b8d43fabcc wip 2013-02-21 20:38:12 -05:00
Daniel Saewitz
08d57e32ff wip 2013-02-21 20:17:23 -05:00
Daniel Saewitz
ddff29ccf0 wip 2013-02-21 14:18:53 -05:00
Daniel Saewitz
905e728c70 Merge branch 'develop' of github.com:lefnire/habitrpg into api 2013-02-20 20:05:06 -05:00
Daniel Saewitz
f75e3662b9 wi[ 2013-02-20 20:04:09 -05:00
Tobias Leugger
68282f4cd3 Fixing the dailies and todos casper test (now even with working cron tests) 2013-02-21 00:56:27 +01:00
Daniel Saewitz
897cd3f2bb wip 2013-02-20 13:35:21 -05:00
Tobias Leugger
48656ed8fa Fixing the dailies casper tests (almost). Found out that the main problem why most tests aren't working: the derby app seems to need some time after a click/action before the model is updated. This means sometime the user object was completely empty. I've introduced a short wait before retrieving the model that fixes this problem. 2013-02-17 17:55:30 +01:00
Tyler Renelle
ce9e676d1e add 100x refresh test script for memory leak 2013-02-13 15:42:50 -05:00
Tyler Renelle
8dd0b4eeb2 todos.casper.coffee 2013-01-30 12:11:15 -05:00
Tyler Renelle
278cd04fd1 rewards tests 2013-01-28 18:22:19 -05:00
Tyler Renelle
26462be457 more todos/dailies test cleanup 2013-01-28 18:10:59 -05:00
Tyler Renelle
d5f36a291c todos tests (stub) 2013-01-28 17:43:50 -05:00
Tyler Renelle
4a7b5183f8 dailies tests 2013-01-28 17:42:48 -05:00
Tyler Renelle
24979d35df habits tests 2013-01-28 17:37:36 -05:00
Tyler Renelle
c3810cf7ea registration tests 2013-01-28 17:31:10 -05:00
Tyler Renelle
1009a87954 Merge pull request #226 from toebu/completed-todos-fix
Getting rid of the completedList and completedIds
2013-01-28 12:09:12 -08:00