Commit Graph

2949 Commits

Author SHA1 Message Date
Blade Barringer
5ef4b7b395 Add tests for isMemberOf 2015-04-16 07:32:56 -05:00
Blade Barringer
83858da25e Change button to be more specific 2015-04-14 08:11:39 -05:00
Blade Barringer
b027e2c407 Corrected port and db to use 2015-04-13 17:22:24 -05:00
Kevin Gisi
b503a0fd64 Repaired task reordering issue
* Created `conditionalOrderBy` filter with a similar signature to `orderBy`,
  using a single conditional argument that when false, causes the filter to
  return the array unchanged

* Updated task view to use `conditionalOrderBy`

* Added karma specs for `conditionalOrderBy` filter
2015-04-13 08:51:08 -04:00
Blade Barringer
f7d30dbc86 Remove only block on karma test 2015-04-11 00:01:39 -05:00
Blade Barringer
5f8477ff10 Merge pull request #5005 from crookedneighbor/hall_of_heroes_quick_click
Made uuid in hall of heroes populate the input box
2015-04-10 23:56:34 -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
730ac4b3df correct chat api tests; prevent sending a blank message via the api 2015-04-10 18:27:58 -05:00
Blade Barringer
24ef3aa012 Made uuid in hall of heroes populate the input box 2015-04-09 21:57:06 -05:00
Kevin Gisi
205e26883e Provisional commit of revised test manager and protractor version, pending a Travis run 2015-04-04 21:35:16 -04:00
Kevin Gisi
35866568da Repair broken e2e test by changes in copy and IDs
* Switch the "Play" button to check for "Play HabitRPG"

* Change "#register-tab" selector to use "#registrationForm"

* Increase delay when only running protractor specs, to ensure the server has
  time to spin up
2015-04-03 21:14:22 -04: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
5c7c986a1f Merge branch 'todo-tests-start' into blade_todo_and_chat_tests 2015-03-27 08:42:47 -04:00
Blade Barringer
80778cbd7c Added additional deletion test 2015-03-27 08:38:05 -04:00
Blade Barringer
4707ba793e Added some basic tests for todo creating, updating and deleting 2015-03-27 08:38:05 -04:00
Blade Barringer
a9232156ef Checks to see if user id and username match chat 2015-03-27 08:33:15 -04:00
Blade Barringer
c5de07d33e Removed deeply eql check for number comparison 2015-03-27 08:33:15 -04:00
Blade Barringer
3c741f431a Deleted extraneous line breaks 2015-03-27 08:33:14 -04:00
Blade Barringer
9be08ad143 Added additional tests for chat functions in api 2015-03-27 08:33:14 -04:00
Kevin Gisi
b894ae8af0 Remove comments about broken user registering in API tests 2015-03-26 17:57:58 -04:00
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