Commit Graph

55 Commits

Author SHA1 Message Date
Blade Barringer 81b7eeeb71 Common reorg (#8025)
* Re-organize common folder

* fix: Correct paths in tests

* fix: move new content to proper folder

* chore: Move audio folder to assets

* Move sprites to sprites assets directory

* Move css sprites to assets directory

* Split out readmes for common code and sprites

* Move images to assets directory

* Move destinatin of shared browserified file

* remove unused file

* move compiled js to client-old

* Fix karma tests

* fix: Correct paths for sprites
2016-09-16 17:18:07 +02:00
Matteo Pagliazzi 616574d438 fix challenge unit test 2016-09-14 16:51:09 +02:00
Kaitlin Hipkin c126aa532c cron does not count days with all-grey dailies as perfect (#7983) 2016-09-12 21:30:35 -05:00
Blade Barringer d31dc6d9a9 fix: Update notifications lib to make it testable
closes #7770
closes #7782
2016-09-12 16:59:52 -05:00
Alyssa Batula 923b6c495e Collection quest progress reports "found no [item names]" fixes #7816 (#7883)
* Updated collection quest tests for no found items.

Single-item quests state [user] found no [items]. instead of [user] found nothing. If a
quest has two items, the chat message is [user] found no [item1] and no [item2].

* Collection quest messages changed from [user] found nothing to [user] found no [item]

* Tests for no collection quest items found changed to [user] found 0 [item1], 0 [item2]

* Changed chat messages for no found collection quest items to [user] found 0 [item1], 0 [item2]

* Sort items alphabetically in multi-item quests so that it always returns the same string

* Formatting updates to conform to test specifications (for collection quest progress reports with no items found

* Simplified handling of items not found: any items not found are added to the list of found items with quantity 0 for reporting in the group chat. This also causes all items to appear, in the list, even if only one type is found in a multi-item quest.

* Test the group chat message when no items are found in multi-item quests. Test succes no longer depends on the order items are listed.
2016-09-10 23:03:28 -05:00
Connor McArthur 598f0a7a1b chore: Add cron semi-safe mode tests
fixes #7464
closes #7733
2016-09-08 21:46:02 -05:00
Keith Holliday 836cee2531 Groups assign tasks (#7887)
* Added initial code for creating and reading group tasks

* Separated group task routes. Separated shared task functions

* Added taskOrder to group

* Minor style fixes

* Fixed lint issues

* Added unit tests for task manager

* Updated task helper functions

* Fixed history test

* Fixed group task query

* Removed extra var

* Updated with new file structure

* Updated noset values

* Removed unecessary undefineds, fixed comments, Added apiignore

* Separated group task routes. Separated shared task functions

* Added unit tests for task manager

* Added initial groups assign route and tests

* Added sync assigned task to user

* Added unassign route and unlink method

* Added remove and unlink group task

* Updated linking and unlinking. Add test for updating task info

* Added delete group task and tests

* Added sync on task update and tests

* Added multiple users assignment

* Updated unassign for multiple users

* Added test for delete task with multiple assigend users

* Added update task for multiple assigned users

* Fixed issue with get tasks

* Abstracted syncable attributes and add tests

* Fixed merge conflicts

* Fixed style issues, limited group query fields, and added await

* Fixed group fields needed. Removed api v2 code

* Fixed style issues

* Moved group field under group sub document. Updated tests. Fixed other broken tests

* Renamed linkedTaskId and fixed broken alias tests

* Added debug middleware to new routes

* Fixed debug middleware import

* Added additional user id check for original group tasks

* Updated challenge task check to look for challenge id

* Added checklist sync fix
2016-09-03 10:54:55 +02:00
Blade Barringer 173b3f3f84 fix: Account for system messages in flag slack alert 2016-09-02 15:23:56 -05:00
Blade Barringer 45e4c6867e chore(test): increase test coverage around logger lib 2016-09-02 11:10:47 -05:00
Blade Barringer 6480602ee6 fix(test): Correct logger test 2016-09-02 11:10:47 -05:00
Blade Barringer 41851afe5f fix: noop if no slack flagging url is passed in 2016-09-02 11:10:46 -05:00
Blade Barringer 2180cb3d98 feat(api): Send flag notifications to slack 2016-09-02 11:10:46 -05:00
Blade Barringer 7702f9dccc Challenge checklist fix (#7963)
* fix(challenges): don't wipe user xlists

* Add test for challenge checklists not syncing to user
2016-09-01 12:34:02 -05:00
Sabe Jones e65f27fb69 fix(subscriptions): gift termination date (#7948) 2016-08-31 17:16:40 -05:00
Blade Barringer fd70efcb60 Merge pull request #7900 from crookedneighbor/analytics_fix
Analytics fix
2016-08-15 22:39:03 -05:00
Jaka Kranjc 408d988341 api: expose user's inbox.optOut for api/v3/members/:memberId #7798 (#7893)
* api: expose user's inbox.optOut for `api/v3/members/:memberId` #7798

* test: fixed chai exist vs exists typos

* _getMembersForItem: fixed typo in api docs
2016-08-15 22:21:14 -05:00
Blade Barringer bd8b1b0ece chore(tests): Rewrite analytics tests to remove dependency on nock 2016-08-15 22:20:39 -05:00
Blade Barringer 977bafd2d1 fix(api): Set platform and agent to Unknown if headers are not passed in 2016-08-15 08:07:59 -05:00
Phillip Thelen 679378331d add client and OS info to amplitude events
closes #7865
2016-08-11 08:58:13 -05:00
Husman 725c3b36f3 feat: allowing modification of challenge tasks after challenge creation. fixes #7320
closes #7877
2016-08-11 08:48:39 -05:00
Matteo Pagliazzi d7ccf2bbe1 API: return computed stats for members routes (#7870)
* api: return computed stats for members responses

* add integration tests for computed stats

* add unit tests for computed stats

* clarify test name

* add missing query parameter to test case

* reset test database before running API tests for the Hall
2016-08-04 19:56:00 +02:00
Matteo Pagliazzi fb939e0300 Migrate from GCM to FCM notifications (#7860)
* Fixed logging. Fixed lint issues. Temporarly removed GCM code

* Removed extra packages. Removed lingering gcm code

* Update message structure to send a data notification instead of a regular notification

* Removed excess code

* switch from fcm-push to node-gcm
2016-08-02 23:12:39 +02:00
Matteo Pagliazzi 60f34dafb0 Deprecate API v2 (was Revert "Revert "Deprecate API v2"") (#7802)
* Revert "Revert "Deprecate API v2""

* fix path in shops controller
2016-08-01 22:36:10 +02:00
Travis 6804125068 voluntarily leaving a party removes the user from the quest the party is involved in (#7845)
* voluntarily leaving a party removes the user from the quest the party is involved in. part of #7653

* addressing pr comments, removing lodash dependency and unecessary comment

* using the existing update object instead of group.save to avoid duplicate behavior

* finalizing tests
2016-07-30 06:53:29 -05:00
Matteo Pagliazzi 590adb3438 Revert "Deprecate API v2" (#7801) 2016-07-17 18:15:25 +02:00
Matteo Pagliazzi 45c31a2bcf Deprecate API v2 (#7761)
* deprecate api-v2

* remove v2 test helpers

* remove unused string
2016-07-16 19:56:18 +02:00
Husman 6543ff89e1 refactor(api): Remove prod check in payments library. Fill out tests
Wasn't able to mock out pushNotifications correctly and left two tests unfinished.

closes #7728
closes #7770
2016-07-12 12:43:17 -05:00
Blade Barringer c9f2389765 chore(test): Unpend cancel subscription test 2016-06-26 09:49:48 -05:00
Blade Barringer 37e638a64d fix(test): Pend send email test 2016-06-26 09:27:29 -05:00
Blade Barringer 81ac45f2a7 fix(api): Grant remaining perks when canceling an Amazon subscription
* Add tests for payments lib
* Add placeholder it blocks to be filled in

closes #7660
closes #4840
2016-06-26 08:08:49 -05:00
Blade Barringer d5a354b499 fix(api): Only award participating members the quest rewards (#7706) 2016-06-23 07:10:56 -05:00
Matteo Pagliazzi 08d7727881 Push notifications (#7682)
* Fix Social Push notifications

* Fix code formatting issues

* Fix commented issues

* Fix Syntax errors

* update push notify dependency

* specify push-notify version

* change how apn key is loaded

* feat(push-notifications): improve logging

* feat(push-notifications): disable v2 push notifications

* test(push-notifications): add unit tests and improve integration ones

* fix(push-notifications): throw when required params are missing

* fix(tests): correct descriptions and remove wrong comment

* fix(push-notifications): trim APN key

* fix(apn): log feedback only if it has data

* fix(apn): load cert and key differently

* fix(tests): correctly load apn during tests

* download creds from S3 and create AWS lib

* convert s3 buffer to a string

* fix(apn): remove console.log and do not use cert twice

* invert key and cert, disable failing test

* invert key and cert
2016-06-23 00:19:37 +02:00
Blade Barringer 94ddd82cae fix(lint): Correct group test file 2016-06-19 21:00:02 -05:00
Blade Barringer e920734648 feat(api): Stop alerting about new messages for large groups
closes #6706
closes #6762
2016-06-19 20:54:30 -05:00
Blade Barringer b7b61e6251 Shortname (#7655)
* feat: Add alias property to task model
2016-06-16 12:28:45 -05:00
Alys a03b1fc6cb prevents damage to quest participants with false or null values - partial fix for #7653 (#7665) 2016-06-16 09:36:58 +10:00
Shervin Sarain 8490b481f6 send email when admin unflags post (#7580)
* send email when admin unflags post

* Improved email acquisition code, minor changes to sent email

* Refactor getGoupUrl into its own method

* added unit test for getGroupUrl

* improved test and getGroupUrl
2016-06-07 22:22:33 -05:00
Matteo Pagliazzi f7be7205e7 Remove localstorage and add notifications (#7588)
* move remaining files frm /common/script/public to website/public

* remove localstorage

* add back noscript template and put all javascript in the footer

* fixes client side tests

* remove double quotes where possible

* simplify jade code and add tests for buildManifest

* loading page with logo and spinner

* better loading screen in landscape mode

* icon on top of text logo

* wip: user.notifications

* notifications: simpler and working code

* finish implementing notifications

* correct loading screen css and re-inline images

* add tests for user notifications

* split User model in multiple files

* remove old comment about missing .catch()

* correctly setup hooks and methods for User model. Cleanup localstorage

* include UserNotificationsService in static page js and split loading-screen css in its own file

* add cron notification and misc fixes

* remove console.log

* fix tests

* fix multiple notifications
2016-06-07 16:14:19 +02:00
Alys 0a10b2bd28 change user quest.progress.collect to quest.progress.collectedItems (#7612) 2016-06-05 20:47:45 -05:00
Blade Barringer 840a90bbdf refactor: Make quest methods private instance methods 2016-06-04 22:11:54 -05:00
Blade Barringer 25cc01e7cd fix: Supply random value as seed so quest collection is random 2016-06-04 22:11:52 -05:00
Blade Barringer 58cd634255 fix: Change quest collection to calculate items on the server only 2016-06-04 22:11:51 -05:00
Blade Barringer c04bac44e7 feat: Use party's quest key in cron 2016-06-04 22:11:50 -05:00
Sabe Jones 7f722269bd fix(subscription): correctly award 3mo bennies (#7596) 2016-06-03 22:40:04 -05:00
Sabe Jones 6084ea2017 Fix mystery set award to new subscribers (#7586)
* fix(mystery): flip da sign

* test(subscription): check mystery box
2016-06-01 15:34:57 -05:00
Matteo Pagliazzi e07ade5a4a cron: set lastCron at the beginning and misc fixes 2016-05-31 21:30:07 -05:00
Blade Barringer c0d9c54c44 test: Pend erronously failing test 2016-05-31 20:58:04 -05:00
Matteo Pagliazzi ee836c76a4 log req.method 2016-05-31 16:37:34 +02:00
Blade Barringer c08df9978f Merge pull request #7511 from HabitRPG/paglias/better-logging
Improve logging
2016-05-26 22:42:14 -05:00
Blade Barringer 74087d23c9 Merge branch 'HabitRPG-paglias/fix-double-cron' into develop 2016-05-26 22:40:32 -05:00