* WIP(guilds): AB test pester modal
* WIP(AB-test): guild pester cont'd
* fix(style): linting error
* fix(AB-test): markModified and notif enum
* fix(tests): update AB expectations
* fix(modal): remove extra includes
* feat(achievements): add Joined Guild cheevo
Also removes unused achievement sprites, and properly saves counter used in A/B testing
* fix(style): linting error from conflict
* add colors palette
* add secondary menu component and style it
* add box shadow to secondary menu
* misc css, fixes for secondary menu
* client: add equipment page with grouping, css: add some styles
* add typography
* more equipment
* stable: fix linting
* equipment: add styles (lots of general styles too)
* remove duplicate google fonts loading
* add dropdowns
* design: white search input background, remove gray from items
* start adding drawer and selected indicator
* wip equipment
* fix equipment
* equipment: correctly bind new properties on items.gear.equipped
* equipment: fix vue binding. version 2
* equipment: fix vue binding. version 3
* back to first fix for equip op, fix for sourcemaps, send http request when an item is equipped, load bootstrap-vue components where needed
* checkboxes and radio buttons
* correctly renders selected items in first postion during the first render
* add search
* general changes, constants part of app state, add popovers
* add toggle switch, rename css
* correct offset
* upgrade deps
* upgrade deps
* drawer and lot of other work
* update equipping mechanism
* finish equipment
* fix compilation and upgrade deps
* use v-show in place of v-if to fix ui issues
* v-show -> v-if
* fix linting in test/client
* fix es6 compilation in test/client
* fix babel compilation for tests
* fix groupsUtilities mixin tests
* client: buttons
* client: buttons: fix colors
* client: finish buttons and dropdowns
* upgrade bootstrap-vue, finish buttons and dropdowns
* fix tasks page layout
* misc fixes for buttons
* add textareas
* fix app menu
* add inputs
* fixes for toggleSwitch
* typography
* checkboxes and radio buttons
* add checkbox icon
* fix equip.js
* extract strings to newClient.json
* add Popover above 'Use Costume' / 'Auto Equip' slider - disable item select if costume-mode and 'useCostume' isn't active
* show "you have disabled your costume" error above the drawer items
* check errorMessage for null
* hide star if costume not enabled
* fix errorMessage (!errorMessage seems not to work for string)
* show minimize / expand icon - always centered by css
* drawer test
* drawer: fix centering on large screens
* fix show more button
* add margin when two dropdowns are next to each other
* adjust the page padding based on the drawer, misc fixes
* drawer fixes
* replace Shield with Shield-Hand Item where appropriate for consistency and clarity
* add space in quest completion modal heading between name of quest and "Completed!"
* clarify Rebirth text - restart your current character, not create a new one
* correct the instructions for editing a group (edit button not pencil icon)
* correct typo in questVice3Completion: breath > breathe
* fix type: Starststemic > Starsystemic
* Added isDue field and isDue set on create
* Added isDue update on update task
* Add isdue calc to score task
* Added isdue calc to cron
* Fixed lint issue
* Added isDue to no set and updated grammar
* Updating APIDOC for issue 8087
* Updating User API Doc (round 2)
cleaned up trailing sapces
* Updating User API Doc (round 2)
Changed mpHeal to mpheal
* Store all approved tasks in an array
* Created bulkScore using score callback
* Removed unnecessary code
* Added verification to run the code only for Approved Tasks
* Created scoreTasks on server and necessary code on client
* Revert "Created scoreTasks on server and necessary code on client"
This reverts commit b786c0e71a.
* Fixed gold/xp earn-lose-earnAgain problem
* Do not read already read notifications
* Removed unnecessary variable
* Display an error when invalid values are given
* Add character values tests for settingsCtrl
* Only check for invalid level values
* Remove unnecessary validation function
* Min level of 1 on user model
* (tests) Removed stubbing on restore
* Adding code to look over the most recent messages to look for spam from a user
* Adding in translatable error message
* Adding 2 tests for spam detection
* Fixing changes requested for pull request
* Adding unit tests for group and fixing requested changes
* Fixing message and tests
* Forgot to remove this import
* Fixing lint errors
* Cleaning up the code and tests to be more readable
* Fixing lint errors
* Fixed linting issues
* Syntax fixes
* Updated grammar
* Added abiltiy to add group managers
* Added ability to remove managers
* Added ability for managers to add group tasks
* Allower managers to assign tasks
* Allowed managers to unassign tasks
* Allow managers to delete group tasks
* Allowed managers to approve
* Added initial ui
* Added approval view for managers
* Allowed managers to edit
* Fixed lint issues
* Added spacing to buttons
* Removed leader from selection of group managers
* Code review updates
* Ensured approvals are only done once
* Added ability for parties to add managers
* Add notifications to all managers when approval is requests
* Removed tasks need approval notifications from all managers when task is approve
* Fixed linting issues
* Hid add managers UI from groups that are not subscribed
* Removed let from front end
* Fixed issues with post task url params
* Fixed string locales
* Removed extra limited strings
* Added cannotedit tasks function
* Added limit fields and notification check by taskId
* Localized string and other minor issues
* Added manager and leader indicator
* Added group notifications refresh on sync
* Added close button for group notifications
* Removed group approval notifications when manager is removed
* Moved leader/manager indicators to after hp
* Added manager fields to groups
* Spelling and syntax fixes
* Prevented ios and android subs from being upgrade to group plans
* Add admin email sender
* Updated admin email
* Updated get user email
* Fixed grammar issue
* Added block when user types a swear word listed in banned words
* Moved banned words check to server
* Removed unused code
* Moved banned words to separate file and fixed grammar.
* Updated chat test
* Changed error to BadRequest
* Fixed regex matching
* Updated test banned word
* Moved banned words and cached regex
* Updated banned word message
* Add ban filter only for tavern
* Added tavern id constant
* Added more tests for banned words
* Added warning to banned words
* Added alert
* Added new regex to capture markdown
* Fixed lint, spelling and importing
* Creating specific api to vend item reference for gifting items to a user through the hall of heroes. closes#8100
* removed 'When in doubt, ask Tyler' from the hall of heroes line
* Moving hall of heroes item path call from server side to client side
* updating let to var
* Addressing PR comments
* Issue 8432: Pre-test for initial fix
* Add failing test, seeking help/advice
* Fixes achievements injection. Now trying with Guide
* Fixes tests
* Remoed logging
* Mock ENV function
* Removes test focus
* Remove Beat Master unlock for Rebirth
* Special message when complete all check-in prizes
* Updated comment
* fix(test): unpend party cap test
* remove wrong subscriptions from gift modal
* edit the new issue template to emphasise that the Report a Bug guild should be used first (#8659)
* fix(translation): resolve merge conflict
* fix(news): merge conflict
* Added email invite limit (#8664)
* Added email invite limit
* change error message for sending too many invitations to instruct them to email us
* fix test error message to use variable in locales string
* add comment to warn about keeping INVITES_LIMIT low
If INVITES_LIMIT is allowed to be greater than MAX_EMAIL_INVITES_BY_USER
then the inviter can send more than MAX_EMAIL_INVITES_BY_USER invitations
at once.
* Fix for automatic allocation not persisting #8641 (#8661)
* Fixed text of check-in prize when it is a set of backgrounds (#8599)
* Fixed text of check-in prize when it is a set of backgrounds
* Use existing i18n string for BGs name
* Added user.preferences.language as second parameter
* fix Shiny Seeds info about achievement (not given to caster) (#8679)
Ref: https://habitica.slack.com/archives/C02RK7DKF/p1492032261365388
* Release mergeback v3.86.0 (#8685)
* 3.85.0
* New User Tasks for Mobile (#8682)
* feat(mobile): different default tasks
* fix(linting): missing space
* fix(user): correct client type logic
* test(integration): tasks by platform
* fix(test): remove only
* test(user): deeper checks on tasks
* refactor(test): whitespace for readability
* feat(subs): Jackalope Pets (#8684)
* chore(sprites): compile
* chore(i18n): update locales
* 3.86.0
* feat(mobile): different default tasks
* fix(linting): missing space
* fix(user): correct client type logic
* test(integration): tasks by platform
* fix(test): remove only
* test(user): deeper checks on tasks
* refactor(test): whitespace for readability
* Fixed text of check-in prize when it is a set of backgrounds
* Use existing i18n string for BGs name
* Added user.preferences.language as second parameter
If INVITES_LIMIT is allowed to be greater than MAX_EMAIL_INVITES_BY_USER
then the inviter can send more than MAX_EMAIL_INVITES_BY_USER invitations
at once.
* Added email invite limit
* change error message for sending too many invitations to instruct them to email us
* fix test error message to use variable in locales string
* add comment to warn about keeping INVITES_LIMIT low
If INVITES_LIMIT is allowed to be greater than MAX_EMAIL_INVITES_BY_USER
then the inviter can send more than MAX_EMAIL_INVITES_BY_USER invitations
at once.
* Release Mergeback (#8644)
* Remove email addresses from translatable strings (#8448)
* Fix User > Profile showing {getProgressDisplay()}
* Remove bad nextRewardAt check
* 1st iteration of issue #8385 - more pending
* #8385 config and jade fixes, tests pending
* #8385 fixing lint errors
* Fix faqs string and test
* Fix faq.jade and add workaround for faq.js
* Fixing accidental checking for faq.js
* fix emails in faq.js
* fetch emails once in auth.js
* Fixing community manager email in auth.js
(cherry picked from commit 842fbe42a8)
* chore(i18n): update locales
(cherry picked from commit b2225f05e5)
* Merge branch 'stripe-webhook' into develop
(cherry picked from commit 30f514e46f)
* add recent Grand Gala seasonal special equipment names (#8606)
This is to help translators add good glossary entries now for keeping the current wiki pages consistent with future additions to the website's seasonal shop.
(cherry picked from commit 4846bc5769)
* stripe webhook for unpaid subs: add 3 days of remaining time
(cherry picked from commit 1d7b733759)
* New default background (#8597)
* feat(bgs): new default background
* feat(bgs): backfill migration
* fix(migration): extraneous imports, bad paths
* fix(bgs): address comments
* fix(test): assert equality
(cherry picked from commit 03088f1d9f)
* chore(sprites): compile
(cherry picked from commit 831b122ce2)
* chore(i18n): update locales
(cherry picked from commit be1754ab07)
* chore(public-docs): Community Guidelines update
Also Bailey announcement
(cherry picked from commit 565d50dd99)
* chore(i18n): update locales
(cherry picked from commit d4198f8913)
* 3.83.0
(cherry picked from commit ea18489991)
* chore(news): Bailey
* rebuild shrinkwrap
(cherry picked from commit 96ce948e1a)
* stripe webhook: fix handling of automatic requests
(cherry picked from commit c4463f991b)
* 3.83.1
* v3.83.2 - April Fools 2017 (#8632)
* feat(event): April Fools 2017
* feat(event): NPCs and Bailey
* fix(event): tweak NPCs, add challenge link
* chore(sprites): compile
* 3.83.2
* v3.83.3 Fooling Fix (#8633)
* fix(fooling): add logic to party and member modals
* 3.83.3
* v3.83.4 Export fooling (#8634)
* fix(fooling): allow export
* 3.83.4
* v3.83.5 End Fooling (#8638)
* chore(event): no more foolin
* chore(sprites): compile
* 3.83.5
* fix(merge-conflict): prefer develop
for config.json.example
* fix(merge-conflict): fewer istanbul deps
* Replace golden rock mount body sprite
* feat(content): BGs and Armoire 2017-04
Also fixes a positioning issue on Spring Healer headgear.
* chore(sprites): compile
* chore(i18n): update locales
* 3.84.0
* Remove email addresses from translatable strings (#8448)
* Fix User > Profile showing {getProgressDisplay()}
* Remove bad nextRewardAt check
* 1st iteration of issue #8385 - more pending
* #8385 config and jade fixes, tests pending
* #8385 fixing lint errors
* Fix faqs string and test
* Fix faq.jade and add workaround for faq.js
* Fixing accidental checking for faq.js
* fix emails in faq.js
* fetch emails once in auth.js
* Fixing community manager email in auth.js
(cherry picked from commit 842fbe42a8)
* chore(i18n): update locales
(cherry picked from commit b2225f05e5)
* Merge branch 'stripe-webhook' into develop
(cherry picked from commit 30f514e46f)
* add recent Grand Gala seasonal special equipment names (#8606)
This is to help translators add good glossary entries now for keeping the current wiki pages consistent with future additions to the website's seasonal shop.
(cherry picked from commit 4846bc5769)
* stripe webhook for unpaid subs: add 3 days of remaining time
(cherry picked from commit 1d7b733759)
* New default background (#8597)
* feat(bgs): new default background
* feat(bgs): backfill migration
* fix(migration): extraneous imports, bad paths
* fix(bgs): address comments
* fix(test): assert equality
(cherry picked from commit 03088f1d9f)
* chore(sprites): compile
(cherry picked from commit 831b122ce2)
* chore(i18n): update locales
(cherry picked from commit be1754ab07)
* chore(public-docs): Community Guidelines update
Also Bailey announcement
(cherry picked from commit 565d50dd99)
* chore(i18n): update locales
(cherry picked from commit d4198f8913)
* 3.83.0
(cherry picked from commit ea18489991)
* chore(news): Bailey
* rebuild shrinkwrap
(cherry picked from commit 96ce948e1a)
* stripe webhook: fix handling of automatic requests
(cherry picked from commit c4463f991b)
* 3.83.1
* v3.83.2 - April Fools 2017 (#8632)
* feat(event): April Fools 2017
* feat(event): NPCs and Bailey
* fix(event): tweak NPCs, add challenge link
* chore(sprites): compile
* 3.83.2
* v3.83.3 Fooling Fix (#8633)
* fix(fooling): add logic to party and member modals
* 3.83.3
* v3.83.4 Export fooling (#8634)
* fix(fooling): allow export
* 3.83.4
* v3.83.5 End Fooling (#8638)
* chore(event): no more foolin
* chore(sprites): compile
* 3.83.5
* fix(merge-conflict): prefer develop
for config.json.example
* fix(merge-conflict): fewer istanbul deps
* Replace golden rock mount body sprite
* feat(content): BGs and Armoire 2017-04
Also fixes a positioning issue on Spring Healer headgear.
* chore(sprites): compile
* chore(i18n): update locales
* 3.84.0
Also changes the email addresses in config.json.example to the real addresses so that we can use local install screenshots to tell if the correct address variable has been used.
This is to help translators add good glossary entries now for keeping the current wiki pages consistent with future additions to the website's seasonal shop.
(cherry picked from commit 4846bc5769)
* Fix User > Profile showing {getProgressDisplay()}
* Remove bad nextRewardAt check
* 1st iteration of issue #8385 - more pending
* #8385 config and jade fixes, tests pending
* #8385 fixing lint errors
* Fix faqs string and test
* Fix faq.jade and add workaround for faq.js
* Fixing accidental checking for faq.js
* fix emails in faq.js
* fetch emails once in auth.js
* Fixing community manager email in auth.js
(cherry picked from commit 842fbe42a8)
This is to help translators add good glossary entries now for keeping the current wiki pages consistent with future additions to the website's seasonal shop.
* Fix User > Profile showing {getProgressDisplay()}
* Remove bad nextRewardAt check
* 1st iteration of issue #8385 - more pending
* #8385 config and jade fixes, tests pending
* #8385 fixing lint errors
* Fix faqs string and test
* Fix faq.jade and add workaround for faq.js
* Fixing accidental checking for faq.js
* fix emails in faq.js
* fetch emails once in auth.js
* Fixing community manager email in auth.js
* Merged in develop
* Show task notes modal on click
* Began adding tests
* Removed extra characters
* Fixed lingering popup
* Added markdown
* Fixed line endings
* Update API Doc #8087
Includes: GET /api/v3/user – POST /api/v3/user/buy/:key
* User API Doc update 1
Changed "GET user" description to a URL to the user model
* Update API DOC User 1
Cleaned up stray spaces
* Updated API Doc for User (part 1)
for GET user:
restored apiDescription from first PR
put link to model into "apiSuccessExample"
* Remove notifications from example responses
* Fixed trailing spaces
* Added a field in Party page with members count and maximum members in party
* Added information of invitations counter
* Limited party to 2 members on server (API)
* Fixed english text
* Consider current number of invitations in the party
* Moved PARTY_LIMIT_MEMBERS to common folder
* Access the PARTY_LIMIT_MEMBERS through groupsCtrl
* Some corrections
* Hide invite button when invite limit is reached
* Added missing trailing comma
* Do not test 'returns only first 30 invites' in a party anymore, but in a guild: party is limited to 30 members, so it would always fail
* Test: allow 30 members in a party
* Test: do not allow 30+ members in a party
* Improved 'allow 30 members in a party' test
* Test: 'allow 30+ members in a guild'
* Added missing trailing comma
* Code style corrections
* Fixed new line position
* Party limit check done inside Group.validateInvitations function
* Improved members count query
* Fixed tests
* Rewrite tests
* Removed import of BadRequest: value became unused
* Added 'await' to remaining 'Group.validateInvitations' functions
* Fixed tests that would always success
* Habits v2: adding counter to habits (cleaned up branch) - fixes#8113 (#8198)
* Clean version of PR 8175
The original PR for this was here:
https://github.com/HabitRPG/habitica/pull/8175
Unfortunately while fixing a conflict in tasks.json, I messed up the rebase and wound up pulling in too many commits and making a giant mess. Sorry. :P
* Fixing test failure
This test seems to occasionally start failing (another coder reported the same thing happening to them in the blacksmiths’ guild) because the order in which the tasks are created can sometimes not match the order in the array. So I have sorted the tasks array after creation by the task name to ensure a consistent ordering, and slightly reordered the expect statements to match.
* Debounce `$scope` updates when typing in chat. (#8485)
Fixes#6462, by saving a bunch of time per frame. See the issue for evidence of
the win.
* fix(nextRewardUnlocksIn): Check-in prize message was always plural --… (#8458)
* fix(nextRewardUnlocksIn): Check-in prize message was always plural -- moving to a non-sentence like structure to fix incorrect grammar.
* fix(countLeft): Check-in prize message was always plural -- moving to a non-sentence like structure to fix incorrect grammar.
* Added support for grouping tasks by challenge (#8469)
* Added support for grouping tasks by chllenge
* Fixed tests and updated default challenge model name
* Fixed broken member test
* Updated setting string
* Changed to shortName
* Began abstracting task grouping
* Added initial task directive code
* Added new directives to help with grouping of tasks
* Removed random console.log
* Leaving a group (#8517)
* Leaving a group or a guild no longer removes the user from the challenges of that group or guild.
* Updating api docs for leaving group to take into account the default path no longer leaving challenges when leaving a group.
* Updating api docs for leaving group to take into account the default path no longer leaving challenges when leaving a group.
* refactored according to blade's comments to not be a breaking change. The api now accepts a body parameter to specify wether the user
should remain in the groups challenges or leave them. The change also adds more tests around this behavior to confirm that it works
as expected.
* Tasks score notes (#8507)
* Added setting and modal for score notes
* Added persistent score notes
* Fixed linting issues and documented new field
* Added max length to task score notes
* Added check for score notes existence
* Combined tasks perferences
* Repeatables (#8444)
* Added initial should do weekly tests
* Added support back in for days of the week and every x day
* Added better week day mapper
* Added initial monthly
* Added every x months
* Added yearlies
* Fixed every nth weekdy of month
* Fixed tests to check every x week on weekday
* Began combining x month with nth weekday
* Added every x month combined with date and weekday
* Fixed lint issues
* Saved moment-recurr to package.json
* Added new repeat fields
* Added UI for repeatables
* Ensured only dalies are affected by summary
* Added local strings
* Updated npm shrinkwrap
* Shared day map constant
* Updated shrinkwrap
* Added ui back
* Updated copy of test cases
* Added new translation strings
* Updated shrinkwrap
* Fixed broken test
* Made should do tests static for better consitency
* Fixed issue with no repeat
* Fixed line endings
* Added frequency enum values
* Fixed spacing
* Upgrade lodash to v4 and lint more files (#8495)
* common: import lodash modules separately
* remove test/content from .eslintignore, fix with eslint --fix content/index
* lint test/content
* lint content/index except for lodash methods
* upgrade server/models
* upgrade server/middlewares and server/libs
* port server/controllers/top-level
* port server/controllers/api-v3
* port views and tests
* client old port lodash and _(, missing _.
* upgrade client-old
* port common/script (root level files only)
* port common/script/fns
* port common/libs
* port common/script/ops
* port common/script/content and common/script/libs/shops.js
* misc fixes
* misc fixes
* misc fixes
* more tests fixes
* fix payments test stubbing, down to 2 failing tests
* remove more instances of lodash wrapping
* fix bug where toObject does not clone object
* fix tests
* upgrade migration or add lodash 4 note
* update shrinkwrap
* fix linting
* upgrade eslint-config-habitrpg
* update shrinkwrap
* recompile shrinkwrap
* chore(i18n): update locales
* Fixed lint issues with model in task services (#8523)
* ApiDoc Group (#8522)
* ApiDoc Group
* Remove space
* Add tags to default tasks (#8419)
* Add ability to add tags to default tasks
* fix missing semicolon
* fix nesting callbacks error
* Add tags to default tasks
* fix default tags
* Start test
* Finish test
* Fix tests
* Move test
* Fix padded-bock
* Fix test
* Fix request
* fix requests
* fix test
* fix lint
* Refine test
* Fix test
* Fix Test
* Fix tests
* Please work :(
* Fix stupid mistake
* Fix lint
* Fixes
* fix function
* fix lint
* fix lint
* Client/inventory WIP (#8527)
* some stable work and faster less recompilation
* user with zero tasks can use the app
* wip work to show loading status of resources
* revert changes to sync
* Client: Guilds Discovery (#8529)
* wip: add guilds discovery page
* add public guilds page
* fix and add tests for the groups utilities mixin
* Properly format a subscription end date according to user preference (#8514)
* Client: Guild page and mix changes (#8533)
* update deps
* add guilds page
* improve karma conf, add tests for actions
* Client: semantic ui -> bootstrap 4 and less -> scss (#8535)
* client: semantic ui -> bootstrap 4 and less -> scss
* start porting components to boostrap
* port header, start porting menu
* port loading screen
* port most of the menu
* port secondary menus
* port guilds and stable
* disable tavern for now, port inbox
* typo
* put back old tavern code
* fix: remove semanticui from gulpfile
* client: add some margin to the avatar
* Group plans subs to all (#8394)
* Added subscriptions to all members when group subs
* Added unsub when group cancels
* Give user a subscription when they join a subbed group
* Removed subscription when user leaves or is removed from group
* Fixed linting issues:
* Added tests for users with a subscription being upgraded to group plan
* Added tests for checking if existing recurring user sub gets updated during group plan. Added better merging for plans
* Added test for existing gift subscriptions
* Added additional months to user when they have an existing recurring subscription and get upgraded to group sub
* Adds test for user who has cancelled with date termined in the future
* Added test to ensure date termined is reset
* Added tests for extra months carrying over
* Added test for gems bought field
* Add tests to for fields that should remain when upgrading
* Added test for all payment methods
* Added prevention for when a user joins a second group plan
* Fixed subscribing tests
* Separated group plan payment tests
* Added prevention of editing a user with a unlimited sub
* Add tests to ensure group keeps plan if they are in two and leave one
* Ensured users with two group plans do not get cancelled when on group plan is cancelled
* Ensured users without group sub are untouched when group cancels
* Fixed lint issues
* Added new emails
* Added fix for cron tests
* Add restore to stubbed methods
* Ensured cancelled group subscriptions are updated
* Changed group plan exist check to check for date terminated
* Updated you cannont delete active group message
* Removed description requirement
* Added upgrade group plan for Amazon payments
* Fixed lint issues
* Fixed broken tests
* Fixed user delete tests
* Fixed function calls
* Hid cancel button if user has group plan
* Hide difficulty from rewards
* Prevented add user functions to be called when group plan is cancelled
* Fixed merge issue
* Correctly displayed group price
* Added message when you are about to join canclled group plan
* Fixed linting issues
* Updated tests to have no redirect to homes
* Allowed leaving a group with a canceld subscription
* Fixed spelling issues
* Prevented user from changing leader with active sub
* Added payment details title to replace subscription title
* Ensured we do not count leader when displaying upcoming cost
* Prevented party tasks from being displayed twice
* Prevented cancelling and already cancelled sub
* Fixed styles of subscriptions
* Added more specific mystery item tests
* Fixed test to refer to leader
* Extended test range to account for short months
* Fixed merge conflicts
* Updated yarn file
* Added missing locales
* Trigger notification
* Removed yarn
* Fixed locales
* Fixed scope mispelling
* Fixed line endings
* Removed extra advanced options from rewards
* Prevent group leader from leaving an active group plan
* Fixed issue with extra months applied to cancelled group plan
* Ensured member count is calculated when updatedGroupPlan
* Updated amazon payment method constant name
* Added comment to cancel sub user method
* Fixed smantic issues
* Added unite test for user isSubscribed and hasNotCancelled
* Add tests for isSubscribed and hasNotCanceled
* Changed default days remaining to 2 days for group plans
* Fixed logic with adding canceled notice to group invite
* mongoose: upgrade to 4.8.6 and remove un-necessary _.clone calls now that toObject clones correctly
* config.json: do not enable APN by default
* Moved show counters to directive (#8537)
* Moved show counters to directive
- hide counters on challenge page
- hide counters on group page
* Changed let to var
* Tasks sort delete fix (#8526)
* Fixed task sorting
* Add sync when group task is deleted
* Added sync when user tasks reorder
* Abstracted show logic and removed task grouping from group page
* Fixed scope typo
* Localized the default challenge short name
* Removed default shortName
* Fixed test for challenge shortName
* client: router: always scroll to the top
* fix(sprites): adjust eggs (#8543)
* adjust apidocs comment to remove unnecessary id parameter with incorrect syntax
* Repeatables fixes (#8538)
* Prevented watch functions from being called when task._edit is removed
* Added start date support on the UI task summary
* Fixed setting of monthly and calculations
* Fixed linting issues
* Added check for existence
* Added existence check
* Ensured correct start date is used on update
* Hid repeat options from anything not a daily
* Added missing locales
* Moved repeatables out of advance options
* Minification fix hide features (#8544)
* Added minification fix
* Hid settings for features we will not release yet
* Hid repeatables UI
* Removed extra file
* Removed repeats every from weekly
* Added start date back
* Hid counter reset when advance is collpased
* Group migrations (#8528)
* Added create group migration
* Add migration for unlimited group subscription
* Add migration to update group members with group plans
* Added error catch
* Added comments
* Group plans copy changes (#8546)
* Added new message for when user has group plan
* Changed subscription wording to group plan
* Updated copy
* Jackalopes (#8547)
* feat(content): add Jackalope rare mount
* chore(news): Bailey for Group Plans
* fix(sprites): correct inconsistent file perms
* Group plans add mount (#8548)
* Added jakcalop mount to group plan members
* Changed pet assignment to mount
* Updated migration to not update canceled group plans (#8550)
* Send group plans subscription message to Slack (#8549)
* feat(Slack): send group plans sub message
* fix(Slack): grab more relevant user data
* 3.79.0
* chore(i18n): update locales
* chore(sprites): compile
* Added create group migration
* Add migration for unlimited group subscription
* Add migration to update group members with group plans
* Added error catch
* Added comments
* Added minification fix
* Hid settings for features we will not release yet
* Hid repeatables UI
* Removed extra file
* Removed repeats every from weekly
* Added start date back
* Hid counter reset when advance is collpased
* Prevented watch functions from being called when task._edit is removed
* Added start date support on the UI task summary
* Fixed setting of monthly and calculations
* Fixed linting issues
* Added check for existence
* Added existence check
* Ensured correct start date is used on update
* Hid repeat options from anything not a daily
* Added missing locales
* Moved repeatables out of advance options
* Fixed task sorting
* Add sync when group task is deleted
* Added sync when user tasks reorder
* Abstracted show logic and removed task grouping from group page
* Fixed scope typo
* Localized the default challenge short name
* Removed default shortName
* Fixed test for challenge shortName
* Added subscriptions to all members when group subs
* Added unsub when group cancels
* Give user a subscription when they join a subbed group
* Removed subscription when user leaves or is removed from group
* Fixed linting issues:
* Added tests for users with a subscription being upgraded to group plan
* Added tests for checking if existing recurring user sub gets updated during group plan. Added better merging for plans
* Added test for existing gift subscriptions
* Added additional months to user when they have an existing recurring subscription and get upgraded to group sub
* Adds test for user who has cancelled with date termined in the future
* Added test to ensure date termined is reset
* Added tests for extra months carrying over
* Added test for gems bought field
* Add tests to for fields that should remain when upgrading
* Added test for all payment methods
* Added prevention for when a user joins a second group plan
* Fixed subscribing tests
* Separated group plan payment tests
* Added prevention of editing a user with a unlimited sub
* Add tests to ensure group keeps plan if they are in two and leave one
* Ensured users with two group plans do not get cancelled when on group plan is cancelled
* Ensured users without group sub are untouched when group cancels
* Fixed lint issues
* Added new emails
* Added fix for cron tests
* Add restore to stubbed methods
* Ensured cancelled group subscriptions are updated
* Changed group plan exist check to check for date terminated
* Updated you cannont delete active group message
* Removed description requirement
* Added upgrade group plan for Amazon payments
* Fixed lint issues
* Fixed broken tests
* Fixed user delete tests
* Fixed function calls
* Hid cancel button if user has group plan
* Hide difficulty from rewards
* Prevented add user functions to be called when group plan is cancelled
* Fixed merge issue
* Correctly displayed group price
* Added message when you are about to join canclled group plan
* Fixed linting issues
* Updated tests to have no redirect to homes
* Allowed leaving a group with a canceld subscription
* Fixed spelling issues
* Prevented user from changing leader with active sub
* Added payment details title to replace subscription title
* Ensured we do not count leader when displaying upcoming cost
* Prevented party tasks from being displayed twice
* Prevented cancelling and already cancelled sub
* Fixed styles of subscriptions
* Added more specific mystery item tests
* Fixed test to refer to leader
* Extended test range to account for short months
* Fixed merge conflicts
* Updated yarn file
* Added missing locales
* Trigger notification
* Removed yarn
* Fixed locales
* Fixed scope mispelling
* Fixed line endings
* Removed extra advanced options from rewards
* Prevent group leader from leaving an active group plan
* Fixed issue with extra months applied to cancelled group plan
* Ensured member count is calculated when updatedGroupPlan
* Updated amazon payment method constant name
* Added comment to cancel sub user method
* Fixed smantic issues
* Added unite test for user isSubscribed and hasNotCancelled
* Add tests for isSubscribed and hasNotCanceled
* Changed default days remaining to 2 days for group plans
* Fixed logic with adding canceled notice to group invite
* client: semantic ui -> bootstrap 4 and less -> scss
* start porting components to boostrap
* port header, start porting menu
* port loading screen
* port most of the menu
* port secondary menus
* port guilds and stable
* disable tavern for now, port inbox
* typo
* put back old tavern code
* some stable work and faster less recompilation
* user with zero tasks can use the app
* wip work to show loading status of resources
* revert changes to sync
* Added initial should do weekly tests
* Added support back in for days of the week and every x day
* Added better week day mapper
* Added initial monthly
* Added every x months
* Added yearlies
* Fixed every nth weekdy of month
* Fixed tests to check every x week on weekday
* Began combining x month with nth weekday
* Added every x month combined with date and weekday
* Fixed lint issues
* Saved moment-recurr to package.json
* Added new repeat fields
* Added UI for repeatables
* Ensured only dalies are affected by summary
* Added local strings
* Updated npm shrinkwrap
* Shared day map constant
* Updated shrinkwrap
* Added ui back
* Updated copy of test cases
* Added new translation strings
* Updated shrinkwrap
* Fixed broken test
* Made should do tests static for better consitency
* Fixed issue with no repeat
* Fixed line endings
* Added frequency enum values
* Fixed spacing
* Added setting and modal for score notes
* Added persistent score notes
* Fixed linting issues and documented new field
* Added max length to task score notes
* Added check for score notes existence
* Combined tasks perferences
* Leaving a group or a guild no longer removes the user from the challenges of that group or guild.
* Updating api docs for leaving group to take into account the default path no longer leaving challenges when leaving a group.
* Updating api docs for leaving group to take into account the default path no longer leaving challenges when leaving a group.
* refactored according to blade's comments to not be a breaking change. The api now accepts a body parameter to specify wether the user
should remain in the groups challenges or leave them. The change also adds more tests around this behavior to confirm that it works
as expected.
* Added support for grouping tasks by chllenge
* Fixed tests and updated default challenge model name
* Fixed broken member test
* Updated setting string
* Changed to shortName
* Began abstracting task grouping
* Added initial task directive code
* Added new directives to help with grouping of tasks
* Removed random console.log
* fix(nextRewardUnlocksIn): Check-in prize message was always plural -- moving to a non-sentence like structure to fix incorrect grammar.
* fix(countLeft): Check-in prize message was always plural -- moving to a non-sentence like structure to fix incorrect grammar.
* Clean version of PR 8175
The original PR for this was here:
https://github.com/HabitRPG/habitica/pull/8175
Unfortunately while fixing a conflict in tasks.json, I messed up the rebase and wound up pulling in too many commits and making a giant mess. Sorry. :P
* Fixing test failure
This test seems to occasionally start failing (another coder reported the same thing happening to them in the blacksmiths’ guild) because the order in which the tasks are created can sometimes not match the order in the array. So I have sorted the tasks array after creation by the task name to ensure a consistent ordering, and slightly reordered the expect statements to match.
* try to freeze content object
* deep freeze the content object, start to implement stable
* freeze at the /common level
* go back to freezing content only on the client
* use deep-frezze-strict to support phantomjs
* use own version of deepFreeze
* update comment about deepFreeze
- remove redundant link from footer's Company column (still exists in Community)
- change link to point directly to wiki page instead of to a wiki redirect for:
- static/features page ("3rd Party Tools" section)
- static/extensions redirection
* Moved Royal Purple to top of list, ordered other mounts from Spring to Winter
* Issue 8465, moved Royal Purple to top and arranged other pets/mounts from Spring-Winter
* Fixed whitespacing mistake from previous commit
* Magic Hatching Potions reordered by season
* Taking all equipped items into account when calculating attributes instead of just head, weapon, sheild, and armor. closes#8185
* Refactored the stat calculations a bit so that all stat calculations are handled in the same location in the same way to try and reduce duplicate logic.
This commit also adds a number of tests to test this new behavior.
* spelling fixes
* Support subscription payment through Google Play Store
* minor fixes to iap subscriptions
* Support subscription payment through Google Play Store
* minor fixes to iap subscriptions
* revert change to test
* add unit tests for google payments
* add integration tests for google payments
* change config formatting for play api
* fix typo in file name
* fix typo in example config
* Improve google payment tests
* fix linter errors
* Updating Tasks and Tags API Doc
* Update Tasks and Tag API Doc
added back * @apiUse ChallengeNotFound
* Update Tasks and Tag API Doc #8447
Corrected NotAuthorized errors to 401
* start migrating to bcrypt
* added method to convert the password to bcrypt when logging in, added method to compare password without knowing the hashing algorhytm, remove default
* travis: try to upgrade to container based infrastructure
* travis: add deps to build bcrypt.js
* travis: add deps to build bcrypt.js
* travis: add deps to build bcrypt.js
* travis: add deps to build bcrypt.js
* use bcryptjs until bcrypt can be installed on travis, see https://github.com/kelektiv/node.bcrypt.js/issues/476
* correct sha1 unit tests
* try different mongodb repo
* try without mognodb services
* try again with bcrypt
* disable request logging in travis
* migrate missing routes
* simplify code
* remove bcryptjs
* fix typo
* fix typo
* fix typo in comment
* add unit tests for new passwords utility emthods
* travis: back to old infrastructure, containers often have timeouts
* add integration test for passwordHashMethod
* update shrinkwrap
* clarify code and add comments
* add integration tests
* fix linting
* fix integration tests
* spells: searing brightness should not affect challenge tasks
* fixed other incorrect group vs challenge task exclusions
* fixed /tasks/clearCompletedTodos test
didn't account for the new group task
* fixed comment omission in tasks/clearCompletedTodos
* change name of Newbies Guild to Habitica Help: Ask a Question guild
* remove ": Ask a Question" from "Habitica Help: Ask a Question" in locations where we are linking to the guild or its wiki page
* Moved amazon tests to folder
* Abstracted amazon payment code and added initial test
* Abstracted cancel and subscribe logic to amazon payment lib
* Added arg checks to checkout
* Added constants. Added more subscription test
* Added with arg checks to cancel
* Fixed linting issues
* Added integration tests for amazon subscribe cancel
* Added integration test for amazon checkout
* Added integration test for amazon subscribe
* Added coupon unit test
* Fixed lint
* Fixed minor test issue and changed header expectations
* Fixed line endings
* Moved critical hit calculation from _addPoints() to _calculateDelta(). Added user as an input argument to _calculateDelta() so for critical hit calculation
* Changed test to expect task value of 1.5 after critical hit
* Revert "Moved critical hit calculation from _addPoints() to _calculateDelta(). Added user as an input argument to _calculateDelta() so for critical hit calculation"
This reverts commit 51b8ab6498.
* Moved critical hit calculation to _changeTaskValue(). Use value stored in user._tmp.crit in _addPoints()
* Test is no longer affected by critical hits
* Removed unneeded comment
* Added WIP test of critical hits
* Want the crit function to return 2 to test critical hits
* Changed crit function to export as a function within an object so that it can be stubbed for testing. References to the crit() function were updated to call crit.crit() instead
* Added test for increased experience on critical hits
* Added notification for approval request in the group leaders language
* Added test for group task meta actions. Added sync when user claims
* Added tests for group task actions. Ensured assigned members are synce when added or removed
* Fixed approval required toggle
* Added support for users with comma in their name
* Fixed sync issue when user is approved and reloads the website
* Added advance options for group rewards
* Added back ticks to group claim message
* Fixed disappearing tasks that need approval
* Up chat limit to 400 for subbed groups
* Fixed line endings
* Updated activie subscription check
* Added group isSubscribed function
* Changed to isAfter
* Issue 8341 updating subscriber json and subscription settings page with gifting a subscription directions
* Issue-8341 updating the layout of the settings - subscription page
* Issue-8341 removing extra comma from gift subscription copy
* Issue-8341 removing extra spans in subscription jade file
This is being done to remove a redundant string that
contains an email address, in preparation for actioning
https://github.com/HabitRPG/habitica/issues/8385 ("Email addresses
should not probably be translatable")
* Added move route for group tasks
* Added group task reorder to front end
* Added syncing with group task order
* Fixed linting issues
* Added missing exec and abstracted move code
* Added unit test for moveTask
* Remove backdrop property from open modal call to allow click-outside to close, call cancelTaskEdit function on dismissal of edit modal via ESC or click-outside
* Remove commented out code, change catch function to normal (non-arrow)
* Modify task services test mock openModal function, to handle new use of subsequent promise resolution functionality
* Tidy old edit controls away
* Adding new method to user schema that pushes a new notification to the database with an update operation instead of a save. fixes#8264
* fixing test text
* changing the addUserNotificationUpdate method to a static method as requested.
* Renaming to push notification
* fixing comment documentation based on pr comments.
* Changed the update statement to do a multi update and added a validation step. Added tests for both these cases.
* Updating pushNotification method to allow a query to be passed instead of an array of userIds to make it more flexible.
* Removing createdAt field from tests as it's no longer used.
* Removing only from test suite
* fix: throws an error when the server receives a post chat request with a message containing only whitespace.
* Adding a test confirming behavior around messages that only contain newlines.
* Removing accidental only that was left on a test
* avoid setting profile name to not found
* only set profile name when empty
* profile.name is required
* set profile name before validation
* fix and add tests
* Added read me and Inbox Page
* Fixed inbox linting
* Added converstaion route
* Added temp data and style
* Added social page and nav
* Fixed Inbox routes
* Added basic layout for Tavern Page
* Improved docker, bower
* npm install missing mocha
* Fix for 'npm install -g npm@4' not resulting in a functional npm
* Improve speed of 'docker start' by withholding directories not used by image environment
* Reverting changes to bower.json
* adding quest owner specific rewards. closes#2715
* Updating model to prevent this from being a breaking change.
* Removing duplicate translatable string and readding accidentally deleted portion
* capitalizing according to pr.
* fixing according to comments on pr
* removing final mistakes
* fixing whitespace
* re-adding the onlyOwner field that got deleted when the index.js file was moved and fixed console errors.
* moving cleaning of empty obejct for quest owner updates into quest owner updates method
* Fixing so tests pass by updating variable name and removing unnecessary parameter definition.
* adding a new test and refactoring client side code to use controller method.
- decapitaliseed "A" in "Create A Group"
- converted non-ascii apostrophes to single-quote for consistency with other strings
- removed a double space within a string
- removed Windows line endings on every line
- converted all leading four spaces to two spaces (normally wouldn't do that but since every line was already touched by the line ending change, why not)
2016-12-28 05:07:21 +00:00
2032 changed files with 109866 additions and 70915 deletions
[//]: # (Before logging this issue, look through common problems at https://github.com/HabitRPG/habitrpg/issues If you find your issue there, read at least the first post to see if there is a workaround for you)
[//]: # (Before logging this issue, please post to the Report a Bug guild from the Habitica website's Help menu. Most bugs can be handled quickly there. If a GitHub issue is needed, you will be advised of that by a moderator or staff member -- a player with a dark blue or purple name. It is recommended that you don't create a new issue unless advised to.)
[//]: # (Github is primarily used for reporting bugs. If you have a feature request, use "Help > Request a Feature" so that the feature request can be vetted by the larger Habitica community)
[//]: # (Bugs in the mobile apps can also be reported there.)
[//]: # (To report a bug in one of the mobile apps, please report it in the correct repository. Android: https://github.com/HabitRPG/habitrpg-android, iOS: https://github.com/HabitRPG/habitrpg-ios)
[//]: # (If you have a feature request, use "Help > Request a Feature", not GitHub or the Report a Bug guild.)
[//]: # (For more guidelines see https://github.com/HabitRPG/habitrpg/issues/2760)
[//]: # (Fill out relevant information - UUID is found in Settings -> API)
General Info
### General Info
* UUID:
* Browser:
* OS:
### Description
[//]: # (Describe bug in detail here. Include pictures if helpful.)
[//]: # (Describe bug in detail here. Include screenshots if helpful.)
#### Console Errors
[//]: # (Include any JavaScript console errors here.)
[Habitica](https://habitica.com) is an open source habit building program which treats your life like a Role Playing Game. Level up as you succeed, lose HP as you fail, earn money to buy weapons and armor.
We need more programmers! Your assistance will be greatly appreciated.
For an introduction to the technologies used and how the software is organized, refer to [Contributing to Habitica](http://habitica.wikia.com/wiki/Contributing_to_Habitica#Coders_.28Web_.26_Mobile.29) - "Coders (Web & Mobile)" section.
For an introduction to the technologies used and how the software is organized, refer to [Guidance for Blacksmiths](http://habitica.wikia.com/wiki/Guidance_for_Blacksmiths).
To set up a local install of Habitica for development and testing, see [Setting up Habitica Locally](http://habitica.wikia.com/wiki/Setting_up_Habitica_Locally), which contains instructions for Windows, *nix / Mac OS, and Vagrant.
To set up a local install of Habitica for development and testing on various platforms, see [Setting up Habitica Locally](http://habitica.wikia.com/wiki/Setting_up_Habitica_Locally).
Then read [Guidance for Blacksmiths](http://habitica.wikia.com/wiki/Guidance_for_Blacksmiths) for additional instructions and useful tips.
For information about writing and running tests, see [Using Your Local Install to Modify Habitica's Website and API](http://habitica.wikia.com/wiki/Using_Your_Local_Install_to_Modify_Habitica%27s_Website_and_API).
That's great! This README will serve as a quick primer for style conventions and practices for these tests.
## What is this?
These are integration tests for the Habitica API. They are performed by making HTTP requests to the API's endpoints and asserting on the data that is returned.
If the javascript looks weird to you, that's because it's written in [ES2015](http://www.ecma-international.org/ecma-262/6.0/) and transpiled by [Babel](https://babeljs.io/docs/learn-es2015/).
## How to run the tests
First, install gulp.
```bash
$ npm install -g gulp
```
To run the api tests, make sure the mongo db is up and running and then type this on the command line:
```bash
$ gulp test:api-v2
```
It may take a little while to get going, since it requires the web server to start up before the tests can run.
You can also run a watch command for the api tests. This will allow the tests to re-run automatically when you make changes in the `/test/api/v2/`.
```bash
$ gulp test:api-v2:watch
```
One caveat. If you have a severe syntax error in your files, the tests may fail to run, but they won't alert you that they are not running. If you ever find your test hanging for a while, run this to get the stackstrace. Once you've fixed the problem, you can resume running the watch comand.
```bash
$ gulp test:api:safe
```
If you'd like to run the tests individually and inspect the output from the server, in one pane you can run:
```bash
$ gulp test:nodemon
```
And run your tests in another pane:
```bash
$ mocha path/to/file.js
# Mark a test with the `.only` attribute
$ mocha
```
## Structure
Each top level route has it's own directory. So, all the routes that begin with `/groups/` live in `/test/api/groups/`.
Each test should:
* encompase a single route
* begin with the REST parameter for the route
* display the full name of the route, swapping out `/` for `_`
* end with test.js
So, for the `POST` route `/groups/:id/leave`, it would be
```bash
POST-groups_id_leave.test.js
```
## Promises
To mitigate [callback hell](http://callbackhell.com/) :imp:, we've written a helper method to generate a user object that can make http requests that [return promises](https://babeljs.io/docs/learn-es2015/#promises). This makes it very easy to chain together commands. All you need to do to make a subsequent request is return another promise and then call `.then((result) => {})` on the surrounding block, like so:
```js
it('does something',()=>{
letuser;
returngenerateUser().then((_user)=>{// We return the initial promise so this test can be run asyncronously
user=_user;
returnuser.post('/groups',{
type:'party',
});
}).then((party)=>{// the result of the promise above is the argument of the function
returnuser.put(`/groups/${party._id}`,{
name:'My party',
});
}).then((result)=>{
returnuser.get('/groups/party');
}).then((party)=>{
expect(party.name).to.eql('My party');
});
});
```
If the test is simple, you can use the [chai-as-promised](http://chaijs.com/plugins/chai-as-promised) `return expect(somePromise).to.eventually` syntax to make your assertion.
```js
it('makes the party creator the leader automatically',()=>{
1.`npm test` is equivalent to `gulp test:api-v3` which will run, in order, `gulp lint`, `gulp test:api-v3:unit` and `gulp test:api-v3:integration`. If one of these fails, the whole `npm test` command blocks and fails. Each of these commands can also be run as a standalone command.
2. To run the server and the integrations tests in two different terminals (to better inspect the output in the server) run `npm start` in one and `npm test:api-v3:integration:separate-server` in the other
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.