Commit Graph

17287 Commits

Author SHA1 Message Date
Sabe Jones b58032d5fb chore(i18n): update locales 2018-06-07 22:27:49 +00:00
SabreCat db4123610f fix(migration): connect string 2018-06-07 11:34:50 +00:00
SabreCat e4c1d96b59 Merge branch 'release' into develop 2018-06-05 20:20:56 +00:00
Sabe Jones fe1f0bf087 4.45.0 v4.45.0 2018-06-05 19:17:44 +00:00
Sabe Jones ccd0bec28c chore(i18n): update locales 2018-06-05 19:16:56 +00:00
SabreCat eebf38b5ae chore(sprites): compile 2018-06-05 19:11:40 +00:00
SabreCat 30cd738635 feat(content): Armoire and BGs 2018-06 2018-06-05 19:10:54 +00:00
Matteo Pagliazzi 920b07ff12 Merge branch 'release' into develop 2018-06-04 14:19:24 +02:00
Matteo Pagliazzi a7db15d768 fixes #10423 (#10426) 2018-06-04 14:18:23 +02:00
Matteo Pagliazzi 93768e70c5 fixes #10423 (#10425) 2018-06-04 14:16:30 +02:00
aszlig 3e29b958e3 tests/cron: Fix tests that involve mocked time (#10418)
* Revert commenting out some cron subscription tests

This reverts commit 47c488967c.

We're going to properly fix these tests, so let's start by reverting the
commit that temporarily disabled these tests in the first place.

Signed-off-by: aszlig <aszlig@nix.build>

* tests/cron: Fix restoring clock on test failure

Ah, the joys of global state... >:-(

Whenever some test failed which has mocked the time using
useFakeTimers(), other test that are run after that test would fail (or
even time out) as well, which is a bit confusing to debug.

Some of the tests even had a cleanup routine in afterEach() but most of
them didn't, so I rearranged them in a way so that we have a clock
variable for *all* of the subtests, which initially is null and then a
cleanup handler (also for *all* of the subtest) calls clock.restore() if
the value isn't null.

In order to avoid calling clock.restore() twice, I have removed all the
clock.restore() calls at the end of the tests setting the clock to a
specific value.

Signed-off-by: aszlig <aszlig@nix.build>

* tests/cron: Fix test for 3-month gift subscription

So this is the actual culprit of the test failures that emerge during
the first two days of a month:

The test group "for a 3-month gift subscription (non-recurring)" creates
a User object available for every test case, which has a subscription
for 3 months beginning at the current time/date.

During each test case the fake timer is set to the second day of the
month to be tested. For the first and second month it's unproblematic
because the subscription is still active, no matter whether the
dateTerminated is set to the first day or the last day of a month.

However, the third month is problematic here, because whenever the
subscription lasts until the first day of the third month it has already
ended after the second day and thus the test fails because the actual
implementation of cron sets plan.consecutive.count to zero (which is
what it's supposed to do).

In order to fix this, I've set dateTerminated for the User object to the
15th of the current month so the subscription lasts long enough to not
trigger the test failure (and also make time zones irrelevant, because
right now there is no TZ offset which is more than half of a month,
especially not while running the test suite).

Signed-off-by: aszlig <aszlig@nix.build>
2018-06-02 13:05:41 +02:00
Sabe Jones ce1bcdeee0 Merge branch 'release' into develop 2018-06-01 19:41:40 +00:00
Sabe Jones 971145a72a 4.44.3 v4.44.3 2018-06-01 19:41:11 +00:00
Sabe Jones 36595e0138 chore(i18n): update locales 2018-06-01 19:40:42 +00:00
SabreCat a1de566c34 fix(gems): use Promise array when gifting 2018-06-01 19:07:17 +00:00
SabreCat 2b8415fad0 chore(news): Bailey announcements
Also removes Cuddle Buddies Bundle from featured items
2018-06-01 18:55:43 +00:00
Matteo Pagliazzi 2afbc23f6f Merge branch 'release' into develop 2018-06-01 15:58:32 +02:00
Matteo Pagliazzi a35c1954af Remove parallel calls to save (#10416)
* remove parallel saves from the code

* fix more unit tests

* do not save users when sending message in buyGift (saved later)

* fix test

* reinstall

* fix tests

* fix tests
2018-06-01 15:56:01 +02:00
Alys 47c488967c temporarily comment-out cron subscription tests that fail in the first days of a month 2018-06-01 20:50:00 +10:00
Matteo Pagliazzi ee4a05d7ec update packages 2018-06-01 11:53:56 +02:00
Sergey 308cd49e9c IE 11 task wrapping issue (#9754) (#10409)
- Added Flex property to force right behaviour
2018-06-01 10:12:47 +02:00
Andrew Gaffney 48e51a03d4 Added correct CSS classes to help menu dropdown items. (#10412) 2018-06-01 10:05:16 +02:00
James Robinson 96f7a192d7 fix landing page contribute and social media buttons misalignment in IE (#10408) 2018-06-01 10:01:35 +02:00
Sabe Jones 1e786412ba 4.44.2 v4.44.2 2018-06-01 01:32:28 +00:00
SabreCat 1739b83609 chore(news): Bailey 2018-06-01 01:31:35 +00:00
Sabe Jones 3606b58a1d 4.44.1 v4.44.1 2018-05-31 20:04:47 +00:00
Sabe Jones 202db599ae chore(i18n): update locales 2018-05-31 20:03:06 +00:00
Sabe Jones 3aca0343e8 Merge branch 'release' into develop 2018-05-29 22:54:31 +00:00
Sabe Jones 97b99c0550 fix(tests): correct for new content, fix lint 2018-05-29 22:54:00 +00:00
Sabe Jones 0e63f68ed6 Merge branch 'release' into develop 2018-05-29 22:24:41 +00:00
Sabe Jones fa142e929f 4.44.0 v4.44.0 2018-05-29 22:17:33 +00:00
Sabe Jones c4867f1e8e chore(i18n): update locales 2018-05-29 22:16:30 +00:00
SabreCat 5f58fe66de chore(sprites): compile + add news 2018-05-29 22:11:02 +00:00
SabreCat a0e2d6a05e feat(customize): earrings and headbands 2018-05-29 21:02:42 +00:00
Matteo Pagliazzi b67522e92b fix(contact form): add it back, fixes #10401 2018-05-29 19:28:28 +02:00
Matteo Pagliazzi 0e3496395c fix(challenges): fix display issues, fixes #10397 2018-05-29 19:25:43 +02:00
Matteo Pagliazzi 6e7b9f1f93 fix(due date): update value correctly, fixes #10405 2018-05-28 13:54:13 +02:00
Matteo Pagliazzi e6cf7564b8 fix(i18n): pass path to wrongItemPath string, fixes #10403 2018-05-28 13:40:49 +02:00
Matteo Pagliazzi bf424573a4 Members: user .lean() to improve performances (#10399)
* perf(members): use lean where possible

* fix unit tests

* fix unit tests and update calls to old function

* simplify code and add tests
2018-05-28 13:38:59 +02:00
Brian Fenton ac90a40be5 Api quest restrictions - no purchase/start without fulfilling eligibility requirements (#10387)
* removing duplicate translation key

* fixing typos

* extracting quest prerequisite check. adding check for previous quest completion, if required

* fixing (undoing) static change, adding tests

* more typos

* correcting test failures

* honoring quest prerequisites in quest invite API call. updating format of il8n string replacement arg

* no longer using apiError, use translate method instead (msg key was not defined)

* adding @apiError to docblock as requested in issue

* removing checks on quest invite method. small window of opportunity/low risk
2018-05-27 16:41:56 +02:00
Matteo Pagliazzi 821f84dbe8 fix(facebook): include email 2018-05-25 18:54:50 +02:00
Matteo Pagliazzi 8fb67e7944 only store necessary data for social login (continuation of 10352) (#10395)
* feat(gdpr) only store necessary data for social login

* feat(gdpr) also store email for social users

* fix(social auth): store emails array instead of single email

* fix(emails): do not get name from old facebook info

* add migration to remove extra data from social profiles

* update migration description

* fix tests

* fix typo in migration file
2018-05-25 18:16:30 +02:00
Matteo Pagliazzi e81e458e9b Merge branch 'pengfluf-PM_opt-in-out' into develop 2018-05-25 12:44:53 +02:00
Matteo Pagliazzi aec23d32f3 Merge branch 'PM_opt-in-out' of https://github.com/pengfluf/habitica into pengfluf-PM_opt-in-out 2018-05-25 12:44:44 +02:00
aszlig 4f2d066d66 client: Fix display of class bonus for other users (#10376)
Whenever one is hovering an item from another user, the bonuses of these
items are shown for the own user. So for example if you're a mage and
view a Royal Magus Robe of another mage, the class bonus is 6.

However if you're a warrior, the class bonus displays as 0 because the
attributes grid is always using the stats for the own user even if
viewing equipment of a different user.

I've fixed this by moving the user object to the properties in
attributesGrid and passing the current user from every other Vue file
that's using attributesGrid.

Not sure whether this is the right approach, as I'm no expert in Vue.js
but some testing with the client now shows the correct values.

Signed-off-by: aszlig <aszlig@nix.build>
2018-05-25 12:38:02 +02:00
Matteo Pagliazzi eaf0c62e16 fix(errors): snackbars for 502 and notification not found errors should have timeout (#10394) 2018-05-25 12:30:43 +02:00
Matteo Pagliazzi fc62db147f fix(emails): make sure quest invitations are sent to users that signed up with google, fixes #10389 (#10393) 2018-05-25 12:13:02 +02:00
Keith Holliday 6c9ff3e8ed Ensure leader is set (#10390) 2018-05-25 12:04:07 +02:00
Matteo Pagliazzi 6ef45a7fd2 Fix 9248: challenge creator should not automatically join their own challenge (#10383)
* fix(challenges): creator should not join challenge automatically

* change behavior on the client side as well

* update tests and fix membercount

* update tests

* fix tests
2018-05-25 12:03:39 +02:00
Sabe Jones 557212b549 4.43.1 v4.43.1 2018-05-24 18:55:14 +00:00