Commit Graph

61 Commits

Author SHA1 Message Date
Blade Barringer 8569f7b749 Merge branch 'joyclark-autocomplete-click-behavior' into develop 2015-05-08 08:45:06 -05:00
Blade Barringer efa193b262 Refactor test 2015-05-08 08:44:50 -05:00
Joy Clark 4450a5d7c3 Fixes #5094 Now show list based on whether or not a search query is defined. The autocomplete function from the directive is encapsulated so that it can be called and then the query can be set to null. 2015-05-03 18:14:28 +02:00
Negue c3b09d8cce test 2nd argument for openModal 2015-05-01 13:55:33 +02:00
Blade Barringer fbc1a9ae86 Add two unit tests for copyToDo PR 2015-04-30 08:53:14 -05:00
Blade Barringer 0d18738ceb Correct phrasing of test 2015-04-29 08:47:47 -05:00
Blade Barringer 78249122f7 Ignore casing when searching for user name in autocomplete 2015-04-29 08:21:13 -05:00
Blade Barringer 41763d3b78 Add missing semi-colons 2015-04-29 08:05:08 -05:00
Blade Barringer 3a12b5644c Remove out of date comments 2015-04-29 07:57:54 -05:00
Blade Barringer 6e35c45d5f Merge branch 'develop' of github.com:HabitRPG/habitrpg into joyclark-autocomplete_unit_tests 2015-04-29 07:50:33 -05:00
Joy Clark df1c349ea7 Fixing #5706 filtering system messages results in errors. 2015-04-27 23:01:15 +02:00
Joy Clark df91592438 fixing unit tests 2015-04-27 22:55:22 +02:00
Joy Clark 61c9d35215 Merge branch 'chat_match_users' into autocomplete_unit_tests 2015-04-27 22:50:30 +02:00
Joy Clark f181787e8b added some unit tests to test the autocomplete controller 2015-04-26 21:38:46 +02:00
Joy Clark f214428411 Improved filter function as described in #5085 and added unit tests. 2015-04-26 17:50:53 +02:00
Blade Barringer 2f4fc8fb88 Put isMemberOfGroup in its own describe block 2015-04-25 17:32:46 -05:00
Blade Barringer ce4535594c refactor joyclark's test 2015-04-25 17:31:40 -05:00
Joy Clark 913afc8f39 #5085 restructured unit tests for AutocompleteCtrl 2015-04-25 23:22:39 +02:00
Joy Clark 3458815f28 #5085 added some unit tests. 2015-04-25 23:08:28 +02:00
Kevin Gisi 65e42345f2 Ensure correct join/leave button for parties 2015-04-24 11:54:00 -04:00
Alys 7c36e49243 Merge pull request #5022 from gisikw/dated-tasks-correct-impl
Dated tasks correct impl
2015-04-22 16:56:03 +10:00
Blade Barringer 1d95784dde refactor isMemberOfGroup and tests 2015-04-16 07:58:35 -05:00
Blade Barringer 4853c0814d Corrected function 2015-04-16 07:39:55 -05:00
Blade Barringer 5ef4b7b395 Add tests for isMemberOf 2015-04-16 07:32:56 -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 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