Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support sprite version of armoire icon #15354

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion habitica-images
1 change: 0 additions & 1 deletion test/api/unit/libs/bug-report.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ describe('bug-report', () => {
USER_HOURGLASSES: 0,
USER_ID: userId,
USER_LEVEL: 1,
USER_OFFSET_MONTHS: 0,
USER_PAYMENT_PLATFORM: undefined,
USER_SUBSCRIPTION: undefined,
USER_TIMEZONE_OFFSET: 0,
Expand Down
515 changes: 52 additions & 463 deletions test/api/unit/libs/cron.test.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ describe('Purchasing a group plan for group', () => {
const mysteryItem = { title: 'item' };
const mysteryItems = [mysteryItem];
const consecutive = {
trinkets: 3,
trinkets: 4,
gemCapExtra: 20,
offset: 1,
count: 13,
Expand Down
542 changes: 152 additions & 390 deletions test/api/unit/libs/payments/payments.test.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions test/api/unit/libs/payments/stripe/oneTimePayments.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ describe('Stripe - One Time Payments', () => {
customerId,
paymentMethod: 'Gift',
gift,
autoRenews: false,
gemsBlock: undefined,
});
});
Expand Down
3 changes: 3 additions & 0 deletions test/api/unit/libs/payments/stripe/subscriptions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ describe('Stripe - Subscriptions', () => {
paymentMethod: 'Stripe',
sub: sinon.match({ ...sub }),
groupId: null,
autoRenews: true,
});
});

Expand All @@ -197,6 +198,7 @@ describe('Stripe - Subscriptions', () => {
paymentMethod: 'Stripe',
sub: sinon.match({ ...sub }),
groupId,
autoRenews: true,
});
});

Expand Down Expand Up @@ -231,6 +233,7 @@ describe('Stripe - Subscriptions', () => {
paymentMethod: 'Stripe',
sub: sinon.match({ ...sub }),
groupId,
autoRenews: true,
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('POST /user/buy-mystery-set/:key', () => {

expect(res.data).to.eql({
items: JSON.parse(JSON.stringify(user.items)), // otherwise dates can't be compared
purchasedPlanConsecutive: user.purchased.plan.consecutive,
purchasedPlanConsecutive: JSON.parse(JSON.stringify(user.purchased.plan.consecutive)),
});
expect(res.message).to.equal(t('hourglassPurchaseSet'));
});
Expand Down
51 changes: 8 additions & 43 deletions test/common/libs/cron.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,14 @@ describe('cron utility functions', () => {
});

describe('getPlanContext', () => {
const now = new Date(2022, 5, 1);

function baseUserData (count, offset, planId) {
return {
purchased: {
plan: {
consecutive: {
count,
offset,
gemCapExtra: 25,
gemCapExtra: 26,
trinkets: 19,
},
quantity: 1,
Expand All @@ -213,52 +211,19 @@ describe('cron utility functions', () => {
};
}

it('monthly plan, next date in 3 months', () => {
it('elapsedMonths is 0 if its the same month', () => {
const user = baseUserData(60, 0, 'group_plan_auto');
user.purchased.plan.perkMonthCount = 0;

const planContext = getPlanContext(user, now);

expect(planContext.nextHourglassDate)
.to.be.sameMoment('2022-08-10T02:00:00.144Z');
});

it('monthly plan, next date in 1 month', () => {
const user = baseUserData(62, 0, 'group_plan_auto');
user.purchased.plan.perkMonthCount = 2;

const planContext = getPlanContext(user, now);

expect(planContext.nextHourglassDate)
.to.be.sameMoment('2022-06-10T02:00:00.144Z');
const planContext = getPlanContext(user, new Date(2022, 4, 20));
expect(planContext.elapsedMonths).to.equal(0);
});

it('multi-month plan, no offset', () => {
const user = baseUserData(60, 0, 'basic_3mo');

const planContext = getPlanContext(user, now);

expect(planContext.nextHourglassDate)
.to.be.sameMoment('2022-06-10T02:00:00.144Z');
});

it('multi-month plan with offset', () => {
const user = baseUserData(60, 1, 'basic_3mo');

const planContext = getPlanContext(user, now);

expect(planContext.nextHourglassDate)
.to.be.sameMoment('2022-07-10T02:00:00.144Z');
});

it('multi-month plan with perk count', () => {
const user = baseUserData(60, 1, 'basic_3mo');
user.purchased.plan.perkMonthCount = 2;
it('elapsedMonths is 1 after one month', () => {
const user = baseUserData(60, 0, 'group_plan_auto');

const planContext = getPlanContext(user, now);
const planContext = getPlanContext(user, new Date(2022, 5, 11));

expect(planContext.nextHourglassDate)
.to.be.sameMoment('2022-07-10T02:00:00.144Z');
expect(planContext.elapsedMonths).to.equal(1);
});
});
});
5 changes: 5 additions & 0 deletions website/client/src/assets/css/sprites/spritesmith-main.css
Original file line number Diff line number Diff line change
Expand Up @@ -40127,6 +40127,11 @@
width: 28px;
height: 28px;
}
.notif_subscriber_reward {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/notif_subscriber_reward.png');
width: 28px;
height: 28px;
}
.npc_bailey {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/npc_bailey.png');
width: 60px;
Expand Down
Binary file added website/client/src/assets/images/confetti.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed website/client/src/assets/images/subscriber-food.png
Binary file not shown.
12 changes: 0 additions & 12 deletions website/client/src/assets/scss/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,3 @@ $gold-color: #FFA624;
$hourglass-color: #2995CD;

$purple-task: #925cf3;

.gray-200 {
color: $gray-200 !important;
}

.purple-300 {
color: $purple-300 !important;
}

.white {
color: $white !important;
}
88 changes: 88 additions & 0 deletions website/client/src/assets/scss/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,91 @@ h4 {
.opacity-75 {
opacity: 0.75;
}

.bg-gray-100 {
background-color: $gray-100 !important;
}

.bg-gray-300 {
background-color: $gray-300 !important;
}

.bg-gray-600 {
background-color: $gray-600 !important;
}

.bg-gray-700 {
background-color: $gray-700 !important;
}

.bg-green-10 {
background-color: $green-10 !important;
}

.bg-green-100 {
background-color: $green-100 !important;
}

.bg-purple-100 {
background-color: $purple-100 !important;
}

.bg-purple-300 {
background-color: $purple-300 !important;
}

.bg-white {
background-color: $white !important;
}

.gray-10 {
color: $gray-10 !important;
}

.gray-50 {
color: $gray-50 !important;
}

.gray-200 {
color: $gray-200 !important;
}

.gray-300 {
color: $gray-300 !important;
}

.green-10 {
color: $green-10 !important;
}

.maroon-50 {
color: $maroon-50 !important;
}

.purple-200 {
color: $purple-200 !important;
}

.purple-300 {
color: $purple-300 !important;
}

.purple-600 {
color: $purple-600 !important;
}

.teal-1 {
color: $teal-1 !important;
}

.teal-10 {
color: $teal-10 !important;
}

.yellow-10 {
color: $yellow-10 !important;
}

.white {
color: $white !important;
}
32 changes: 32 additions & 0 deletions website/client/src/assets/svg/divider-stars.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 4 additions & 6 deletions website/client/src/assets/svg/habitica-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading