* content: add gems blocks
* gemsBlocks: include ios and android identifiers
* wip: promo code
* split common constants into multiple files
* add second promo part
* geCurrentEvent, refactor promo
* fix lint
* fix exports, use world state api
* start adding world state tests
* remove console.log
* use gems block for purchases
* remove comments
* fix most unit tests
* restore comment
* fix lint
* prevent apple/google gift tests from breaking other tests when stub is not reset
* fix unit tests, clarify tests names
* iap: use gift object when gifting gems
* allow gift object with less data
* fix iap tests, remove findById stubs
* iap: require less data from the mobile apps
* apply discounts
* add missing worldState file
* fix lint
* add test event
* start removing 20 gems option for web
* start adding support for all gems packages on web
* fix unit tests for apple, stripe and google
* amazon: support all gems blocks
* paypal: support all gems blocks
* fix payments unit tests, add tests for getGemsBlock
* web: add gems plans with discounts, update stripe
* fix amazon and paypal clients, payments success modals
* amazon pay: disabled state
* update icons, start abstracting payments buttons
* begin redesign
* redesign gems modal
* fix buttons
* fix hover color for gems modal close icon
* add key to world state current event
* extend test event length
* implement gems modals designs
* early test fall2020
* fix header banner position
* add missing files
* use iso 8601 for dates, minor ui fixes
* fix time zones
* events: fix ISO8601 format
* fix css indentation
* start abstracting banners
* refactor payments buttons
* test spooky, fix group plans box
* implement gems promo banners, refactor banners, fixes
* fix lint
* fix dates
* remove unused i18n strings
* fix stripe integration test
* fix world state integration tests
* the current active event
* add missing unit tests
* add storybook story for payments buttons component
* fix typo
* fix(stripe): correct label when gifting subscriptions
* Added the "Allow banned words" checkbox to create/update guild forms
Added the "Allow banned words" checkbox to guild create/update forms which are only visible to Admins
* Updated create/update group API to include bannedWordsAllowed property
Added logic to set bannedWordsAllowed depending on conditions
* Updated word banning logic to use bannedWordsAllowed guild value instead
Updated word banning logic to use bannedWordsAllowed guild value and deleted hardcoded guild file & import
* Updated banned words test
* Pull Request amends
Removed the setting of bannedWordsAllowed during group creation
Added v-once to elements
Updated existing test and added tests related to bannedWordsAllowed functionality
* Small amend
* Small amend
Removed leftover code that was left during testing
* Fix bug in challenge tags not converted to normal tags after challenge ended/deleted
* Added test cases to test bug fix
* Set tag.challenge from String to Boolean in tag model schema
* Update existing test with tag challenge set to boolean instead of string
* Added migration file for converting tag challenge field from string to bool
* Implement suggestions from ilnt
* Use mongoose instead of Mock in migration
* Change from update to bulkwrite
* update users individually
Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
* when filtering by owned challenges, challenges that a user owns but has not joined will be included
* add tests for filtering challenges by owned
* fix lint
* Add new API call to complete multiple task scorings in one call
* Improve API response
* Improve saving process
* Improve handling for multiple tasks scored at once
* Handle challenge task errors better
* Improve check for alias
* Improve check for task scorings
* Fix merge errors
* make nodemon ignore content_cache
* Fix completing group tasks
* fix test
* fix tests (again)
* typo
* WIP(a11y): task modal updates
* fix(tasks): borders in modal
* fix(tasks): circley locks
* fix(task-modal): placeholders
* WIP(task-modal): disabled states, hide empty options, +/- restyle
* fix(task-modal): box shadows instead of borders, habit control pointer
* fix(task-modal): button states?
* fix(modal): tighten up layout, new spacing utils
* fix(tasks): more stylin
* fix(tasks): habit hovers
* fix(css): checklist labels, a11y colors
* fix(css): one more missed hover issue
* fix(css): lock Challenges, label fixes
* fix(css): scope input/textarea changes
* fix(style): task tweakies
* fix(style): more button fixage
* WIP(component): start select list story
* working example of a templated selectList
* fix(style): more button corrections
* fix(lint): EOL
* fix(buttons): factor btn-secondary to better override Bootstrap
* fix(styles): standardize more buttons
* wip: difficulty select - style fixes
* selectDifficulty works! 🎉 - fix styles
* change the dropdown-item sizes only for the selectList ones
* selectTranslatedArray
* changed many label margins
* more correct dropdown style
* fix(modals): button corrections
* input-group styling + datetime picker without today button
* Style/margins for "repeat every" - extract selectTag.vue
* working tag-selection / update - cleanup
* fix stories
* fix svg color on create modal (purple)
* fix task modal bottom padding
* correct dropdown shadow
* update dropdown-toggle caret size / color
* fixed checklist style
* sync checked state
* selectTag padding
* fix spacing between positive/negative streak inputs
* toggle-checkbox + fix some spacings
* disable repeat-on when its a groupTask
* fix new checklist-item
* fix toggle-checkbox style - fix difficulty style
* fix checklist ui
* add tags label , when there arent any tags selected
* WORKING select-tag component 🎉
* fix taglist story
* show max 5 items in tag dropdown + "X more" label
* fix datetime clear button
* replace m-b-xs to mb-1 (bootstrap) - fix input-group-text style
* fix styles of advanced settings
* fix delete task styles
* always show grippy on hover of the item
* extract modal-text-input mixin + fix the borders/dropshadow
* fix(spacing): revert most to Bootstrap
* feat(checklists): make local copy of master checklist non-editable
also aggressively update checklists because they weren't syncing??
* fix(checklists): handle add/remove options better
* feat(teams): manager notes field
* fix select/dropdown styles
* input border + icon colors
* delete task underline color
* fix checklist "delete icon" vertical position
* selectTag fixes - normal open/close toggle working again - remove icon color
* fixing icons:
Trash can - Delete
Little X - Remove
Big X - Close
Block - Block
* fix taglist margins / icon sizes
* wip margin overview (in storybook)
* fix routerlink
* remove unused method
* new selectTag style + add markdown inside tagList + scrollable tag selection
* fix selectTag / selectList active border
* fix difficulty select (svg default color)
* fix input padding-left + fix reset habit streak fullwidth / padding + "repeat every" gray text (no border)
* feat(teams): improved approval request > approve > reward flow
* fix(tests): address failures
* fix(lint): oops only
* fix(tasks): short-circuit group related logic
* fix(tasks): more short circuiting
* fix(tasks): more lines, less lint
* fix(tasks): how do i keep missing these
* feat(teams): provide assigning user summary
* fix(teams): don't attempt to record assiging user if not supplied
* fix advanced-settings styling / margin
* fix merge + hide advanced streak settings when none enabled
* fix styles
* set Roboto font for advanced settings
* Add Challenge flag to the tag list
* add tag with enter, when no other tag is found
* fix styles + tag cancel button
* refactor footer / margin
* split repeat fields into option mt-3 groups
* button all the things
* fix(tasks): style updates
* no hover state for non-editable tasks on team board
* keep assign/claim footer on task after requesting approval
* disable more fields on user copy of team task, and remove hover states
for them
* fix(tasks): functional revisions
* "Claim Rewards" instead of "x" in task approved notif
* Remove default transition supplied by Bootstrap, apply individually to
some elements
* Delete individual tasks and related notifications when master task
deleted from team board
* Manager notes now save when supplied at task initial creation
* Can no longer dismiss rewards from approved task by hitting Dismiss
All
* fix(tasks): clean tasksOrder
also adjust related test expectation
* fix(tests): adjust integration expectations
* fix(test): ratzen fratzen only
* fix lint
* fix tests
* fix(teams): checklist, notes
* handleSharedCompletion: handle error, make sure it is run after the user task has been saved
* fix typo
* correctly handle errors in handleSharedCompletion when approving a task
* fix(teams): improve disabled states
* handleSharedCompletion: do not increase completions by 1 manually to adjust for last approval not saved yet
* revert changes to config.json.example
* fix(teams): more style fixage
* add unit tests for findMultipleByIdOrAlias
* exclude api v4 route from apidocs
* BREAKING(teams): return 202 instead of 401 for approval request
* fix(teams): better taskboard sync
also re-re-fix checklist borders
* scoreTasks: validate body
* fix tests, move string to api errors
* fix(tests): update expectations for breaking change
* start updating api docs, process tasks sequentially to avoid conflicts with user._tmp
* do not crash entire bulk operation in case of errors
* save task only if modified
* fix lint
* undo changes to error handling: either all tasks scoring are successfull or none
* remove stale code
* do not return user._tmp when bulk scoring, it would be the last version only
* make sure user._tmp.leveledUp is not lost when bulk scoring
* rewards tests
* mixed tests
* fix tests, allow scoring the same task multiple times
* finish integration tests
* fix api docs for the bulk score route
* refactor(task-modal): lockable label component
* wip loading spinner
* refactor(teams): move task scoring to mixin
* fix(teams): style corrections
* fix(btn): fix padding to have height of 32px
* implement loading spinner
* remove console.log warnings
* fix(tasks): spacing and wording corrections
* fix(teams): don't bork manager notes
* fix(teams): assignment fix and more approval flow revisions
* WIP(teams): use tag dropdown control for assignment
* finish merge - never throw an error when a group task requires approval (wip - needs tests)
* fix taskModal merge
* fix merge
* fix(task modal): add newline
* fix(column.vue): add newline at end of file
* mvp yesterdaily modal
* fix tests
* fix api docs for bulk scoring group tasks
* separate task scoring and _tmp handling
* handle _tmp when bulk scoring
* rya: close modal before calling cron API, prevents issues with modals
* rya: fix conflicts with other modals
* add sounds, support for group plans, analytics
* use asyncResource for group plans
* fix lint
* streak bonus: add comment about missing in rya
* move yesterdailyModal
* fix issues with level up modals and rya
* add comments for future use, fix level up modals not showing up at levels with a quest drop
* handle errors in rya modal
* bundle quest and crit notifications
Co-authored-by: Phillip Thelen <phillip@habitica.com>
Co-authored-by: Phillip Thelen <viirus@pherth.net>
Co-authored-by: Sabe Jones <sabrecat@gmail.com>
Co-authored-by: negue <eugen.bolz@gmail.com>
* hide upgrade button for public guilds
* prevent group plans for public guilds
* fix unit tests
* fix integration and unit tests that assumed group plans could be public guilds
* more unit tests fixes
* more resilient unit test
* more resilient unit test
* Excluding tavern from showing up in GET /groups API when 'guilds' or 'publicGuilds' type parameter is included.
* Fixed test errors.
* Resolved pull request #12438 issues.
Moved Tavern exclusion to Group model, removed Group controller back to the original and resolved test failures.
* Added logic for a repeating Chilling Frost skill. Added test case for redundant chilling frost skill cast. Added comments for the logic of repeating Stealth skill because of an error.
* Added logic for a repeating Stealth skill. Avoiding MP reduction still pending because of console error. Test cases pending.
* Completed the logic for a repeated Stealth skill. Added repeated frost skill cast check in common. Removed exclusive test. Test cases are pending.
* Added test case for Stealth skill recast. Fixed lint errors. Fixed a flaw in if statement which led to test case failure.
* Fixed lint errors in test case.
* Added a common JSON entry for skil recasts in three files. Other files remaining. Added Chilling Frost recast check in common code. Modified test cases.
* Added spellDisabled condition in client code.
* Reverted JSON messages for three languages. Added spellAlreadyCast attribute to JSON file in locales/en. Made changes for showing appropriate message in client code.
* Added an import for throwing BadRequest in common code. Modified test case accordingly.
* Update website/common/script/content/spells.js
Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
* Added target and req attributes in cast() method arguments.
* Changed common code test case because of increased function parameters. Moved chilling frost test casse to common tests instead of server tests.
* Changed the test case format in common tests.
* Added a missing done statement.
* Fixed a minor error which led to failing test case. Removed the exclusive test which led to lint error.
* Fixed lint errors.
* Added a class named 'disabled' for the frontend change.
* fix(skills): style cleanup
* fix(skills): unfix
Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
Co-authored-by: Sabe Jones <sabrecat@gmail.com>
* Updating daily daysOfMonth array when startDate is updated and adding integration tests to test this functionality
* Adding more test cases and adding semicolons to the end of lines
* Only updating the monthly repetition if the daily was already set to repeat on a day of the month
* fix(lint): whitespace
Co-authored-by: Laurel Thomson <laurel.beth.thomson@gmai.com>
Co-authored-by: Sabe Jones <sabrecat@gmail.com>
* WIP(a11y): task modal updates
* fix(tasks): borders in modal
* fix(tasks): circley locks
* fix(task-modal): placeholders
* WIP(task-modal): disabled states, hide empty options, +/- restyle
* fix(task-modal): box shadows instead of borders, habit control pointer
* fix(task-modal): button states?
* fix(modal): tighten up layout, new spacing utils
* fix(tasks): more stylin
* fix(tasks): habit hovers
* fix(css): checklist labels, a11y colors
* fix(css): one more missed hover issue
* fix(css): lock Challenges, label fixes
* fix(css): scope input/textarea changes
* fix(style): task tweakies
* fix(style): more button fixage
* WIP(component): start select list story
* working example of a templated selectList
* fix(style): more button corrections
* fix(lint): EOL
* fix(buttons): factor btn-secondary to better override Bootstrap
* fix(styles): standardize more buttons
* wip: difficulty select - style fixes
* selectDifficulty works! 🎉 - fix styles
* change the dropdown-item sizes only for the selectList ones
* selectTranslatedArray
* changed many label margins
* more correct dropdown style
* fix(modals): button corrections
* input-group styling + datetime picker without today button
* Style/margins for "repeat every" - extract selectTag.vue
* working tag-selection / update - cleanup
* fix stories
* fix svg color on create modal (purple)
* fix task modal bottom padding
* correct dropdown shadow
* update dropdown-toggle caret size / color
* fixed checklist style
* sync checked state
* selectTag padding
* fix spacing between positive/negative streak inputs
* toggle-checkbox + fix some spacings
* disable repeat-on when its a groupTask
* fix new checklist-item
* fix toggle-checkbox style - fix difficulty style
* fix checklist ui
* add tags label , when there arent any tags selected
* WORKING select-tag component 🎉
* fix taglist story
* show max 5 items in tag dropdown + "X more" label
* fix datetime clear button
* replace m-b-xs to mb-1 (bootstrap) - fix input-group-text style
* fix styles of advanced settings
* fix delete task styles
* always show grippy on hover of the item
* extract modal-text-input mixin + fix the borders/dropshadow
* fix(spacing): revert most to Bootstrap
* feat(checklists): make local copy of master checklist non-editable
also aggressively update checklists because they weren't syncing??
* fix(checklists): handle add/remove options better
* feat(teams): manager notes field
* fix select/dropdown styles
* input border + icon colors
* delete task underline color
* fix checklist "delete icon" vertical position
* selectTag fixes - normal open/close toggle working again - remove icon color
* fixing icons:
Trash can - Delete
Little X - Remove
Big X - Close
Block - Block
* fix taglist margins / icon sizes
* wip margin overview (in storybook)
* fix routerlink
* remove unused method
* new selectTag style + add markdown inside tagList + scrollable tag selection
* fix selectTag / selectList active border
* fix difficulty select (svg default color)
* fix input padding-left + fix reset habit streak fullwidth / padding + "repeat every" gray text (no border)
* feat(teams): improved approval request > approve > reward flow
* fix(tests): address failures
* fix(lint): oops only
* fix(tasks): short-circuit group related logic
* fix(tasks): more short circuiting
* fix(tasks): more lines, less lint
* fix(tasks): how do i keep missing these
* feat(teams): provide assigning user summary
* fix(teams): don't attempt to record assiging user if not supplied
* fix advanced-settings styling / margin
* fix merge + hide advanced streak settings when none enabled
* fix styles
* set Roboto font for advanced settings
* Add Challenge flag to the tag list
* add tag with enter, when no other tag is found
* fix styles + tag cancel button
* refactor footer / margin
* split repeat fields into option mt-3 groups
* button all the things
* fix(tasks): style updates
* no hover state for non-editable tasks on team board
* keep assign/claim footer on task after requesting approval
* disable more fields on user copy of team task, and remove hover states
for them
* fix(tasks): functional revisions
* "Claim Rewards" instead of "x" in task approved notif
* Remove default transition supplied by Bootstrap, apply individually to
some elements
* Delete individual tasks and related notifications when master task
deleted from team board
* Manager notes now save when supplied at task initial creation
* Can no longer dismiss rewards from approved task by hitting Dismiss
All
* fix(tasks): clean tasksOrder
also adjust related test expectation
* fix(tests): adjust integration expectations
* fix(test): ratzen fratzen only
* fix(teams): checklist, notes
* fix(teams): improve disabled states
* fix(teams): more style fixage
* BREAKING(teams): return 202 instead of 401 for approval request
* fix(teams): better taskboard sync
also re-re-fix checklist borders
* fix(tests): update expectations for breaking change
* refactor(task-modal): lockable label component
* refactor(teams): move task scoring to mixin
* fix(teams): style corrections
* fix(tasks): spacing and wording corrections
* fix(teams): don't bork manager notes
* fix(teams): assignment fix and more approval flow revisions
* WIP(teams): use tag dropdown control for assignment
* refactor(tasks): better spacing, generic multi select
* fix(tasks): various visual and behavior updates
* fix(tasks): incidental style tweaks
* fix(teams): standardize approval request response
* refactor(teams): correct test, use res.respond message param
* fix(storybook): renamed component
* fix(teams): age approval-required To Do's
Fixes#8730
* fix(teams): sync personal data as well as team on mixin sync
* fix(teams): hide unclaim button, not whole footer; fix switch focus
* fix(achievements): unrevert width fix
Co-authored-by: Sabe Jones <sabrecat@gmail.com>
* Issue 10209 - Remove read usages of zone
* Issue 10209 - Add coverage on daysSince and startOfDay cron utility functions
* Issue 10209 - Add unit test for daysUserHasMissed method
* Issue 10209 - Remove usages of deprecated `moment.js#zone` method.
* Issue 10209 - Add helper function to centralise logic
Also simplify timezoneOffsetToUtc function in site.vue
* Issue 10209 - Also add getUtcOffset as method on user
Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
* simplify ip address management by using the trust proxy express option
* add setupExpress file
* fix redirects middleware tests
* fix lint
* short circuit the ip blocking middleware
* basic implementation with ip based limiting
* improve logging
* upgrade apidoc
* apidoc: add introduction section
* fix lint
* fix tests
* fix lint
* add unit tests for rate limiter
* do not send retry-after header when points are available
* automatically fix lint
* fix more lint issues
* use userId as key for rate limit when available
* simplify ip address management by using the trust proxy express option
* add setupExpress file
* fix redirects middleware tests
* fix lint
* short circuit the ip blocking middleware
* basic implementation with ip based limiting
* improve logging
* upgrade apidoc
* apidoc: add introduction section
* fix lint
* fix tests
* fix lint
* add unit tests for rate limiter
* do not send retry-after header when points are available
* automatically fix lint
* fix more lint issues
* use userId as key for rate limit when available
* add run-rs to dependencies
* wip: add replica set to api unit github action
* wip: add replica set to api unit github action
* wip: fix gh actions mongodb replica set setting
* usa replica set for integration tests
* add correct mongodb version matrix for integration tests
* use different db connection on gh actions
* Revert "use different db connection on gh actions"
This reverts commit aa8db759d3.
* add example transaction
* add mongo script to package.json
* abstract mongodb utils, connect using hostname on windows
* npm scripts: mongo -> mongo:dev
* add setup script for run-rs on windows
* gh actions: run in test environment
* remove test files
* better error handling, use cross-spawn to avoid issues on windows
* fix lint
* Getting the latest code
* Temporary fix for Redundant Party Invite. Needs changes.
* Added logic to check if the user is an existing member of the party that the user is invited to.
* Added a test case for redundant party invite check.
* Changed the test case for redundant party invite to see if it runs successfully.
* Made changes to the test cases.
* Fixed lint errors.
* Removed the exclusive mocha test.
* Referred the issue in the name of the new test case.
* Modified test case to check its veracity.
* Checking if the update statement is working or not.
* Piggybacking the updating of user tag list.
When a new task is being added to a challenge, added code to update user tag list along with the existing code that already involves syncing / updating the user documents of challenge members.
* Update comment on number of simulatenaeous users to be updated concurrently in TaskQueue.
* Added comment to explain previous commit caaca469f8 (Update comment on number of simulateneous users to be updated concurrently in TaskQueue)
* Added unit tests for testing commit caaca469f8 (Update comment on number of simulateneous users to be updated concurrently in TaskQueue)
* Removed unused lines from newly added test cases
* Implemented lint suggestions
* Update code with changes requested in PR
* Fix bug where updated webhook options failed to save
This bug was caused by Mongoose not creating getters/setters for array
elements (https://mongoosejs.com/docs/faq.html#array-changes-not-saved).
So, although the webhook was being updated properly, Mongoose was not
actually committing it to the database. Telling Mongoose that the array
of webhooks has changed via `markModified` fixes the issue.
Additionally, the relevant API test case was only checking whether or
not the webhook returned from the PUT endpoint matched the expected
update. Since the endpoint was returning the updated webhook without
querying the database again, this test case would pass. It has been
updated to check both the returned webhook as well as the version of the
webhook that is saved to the database against the expected. In other
words:
`assert returned === saved === expected`
Fixes#12336
* Call markModified on webhook.options instead of user.webhooks
This tells Mongoose that only the modified webhook's options changed
instead of telling it that the entire user.webhooks array changed,
saving a costly DB update.
* fix(chat) - Don't insert user link in url-less link and properly log source-mapping failures
* fix(chat) - Add link to markdown spec and list of known issues
* fix(chat) - Log regular expression as String
* wip
* refactor world state
* allow resource to be reloaded when the server is updated
* fix#9242
* fix event listeners
* remove un-needed code
* add tests for asyncResourceFactory reloadOnAppVersionChange
* fix double cron notifications and party members showing up in the header after a party invitation is accepted
* remove console.log
* do not send vm info to loggly due to circular dependency + fix typo
* fix#12181
* do not load invites multiple times in members modal
* add hover to challenge member count
* groups: load members only on demand
* minor ui fixes
* choose class: fix vue duplicate key warning
* minor ui fixes
* challanges: load members on demand
* add loading spinner
* change loading mechanism
* fix loading gryphon issues
* reduce code duplication
* buyMysterySet records every item in Amplitude.
Record only the mysterySet
Fixes: #11705
* buyMysterySet records every item in Amplitude.
Extend unit test
Fixes: #11705