Merge branch 'develop' into negue/stable_img_states

This commit is contained in:
Matteo Pagliazzi
2018-10-30 16:35:30 +01:00
373 changed files with 10350 additions and 10423 deletions
-6
View File
@@ -89,12 +89,6 @@
"USERNAME": "admin",
"PASSWORD": "password"
},
"PUSHER": {
"ENABLED": "false",
"APP_ID": "appId",
"KEY": "key",
"SECRET": "secret"
},
"SLACK": {
"FLAGGING_URL": "https://hooks.slack.com/services/id/id/id",
"FLAGGING_FOOTER_LINK": "https://habitrpg.github.io/flag-o-rama/",
@@ -0,0 +1,93 @@
/* eslint-disable no-console */
const MIGRATION_NAME = '20181023_veteran_pet_ladder';
import { model as User } from '../../website/server/models/user';
function processUsers (lastId) {
let query = {
migration: {$ne: MIGRATION_NAME},
'flags.verifiedUsername': true,
};
let fields = {
'items.pets': 1,
};
if (lastId) {
query._id = {
$gt: lastId,
};
}
return User.find(query)
.limit(250)
.sort({_id: 1})
.select(fields)
.then(updateUsers)
.catch((err) => {
console.log(err);
return exiting(1, `ERROR! ${err}`);
});
}
let progressCount = 1000;
let count = 0;
function updateUsers (users) {
if (!users || users.length === 0) {
console.warn('All appropriate users found and modified.');
displayData();
return;
}
let userPromises = users.map(updateUser);
let lastUser = users[users.length - 1];
return Promise.all(userPromises)
.then(() => {
processUsers(lastUser._id);
});
}
function updateUser (user) {
count++;
let set = {migration: MIGRATION_NAME};
if (user.items.pets['Bear-Veteran']) {
set['items.pets.Fox-Veteran'] = 5;
} else if (user.items.pets['Lion-Veteran']) {
set['items.pets.Bear-Veteran'] = 5;
} else if (user.items.pets['Tiger-Veteran']) {
set['items.pets.Lion-Veteran'] = 5;
} else if (user.items.pets['Wolf-Veteran']) {
set['items.pets.Tiger-Veteran'] = 5;
} else {
set['items.pets.Wolf-Veteran'] = 5;
}
if (count % progressCount === 0) console.warn(`${count} ${user._id}`);
return user.update({_id: user._id}, {$set: set}).exec();
}
function displayData () {
console.warn(`\n${count} users processed\n`);
return exiting(0);
}
function exiting (code, msg) {
code = code || 0; // 0 = success
if (code && !msg) {
msg = 'ERROR!';
}
if (msg) {
if (code) {
console.error(msg);
} else {
console.log(msg);
}
}
process.exit(code);
}
module.exports = processUsers;
+1 -1
View File
@@ -8,7 +8,7 @@ const authorUuid = '7f14ed62-5408-4e1b-be83-ada62d504931'; // ... own data is do
/*
* Award this month's mystery items to subscribers
*/
const MYSTERY_ITEMS = ['armor_mystery_201809', 'head_mystery_201809'];
const MYSTERY_ITEMS = ['armor_mystery_201810', 'head_mystery_201810'];
const CONNECTION_STRING = nconf.get('MIGRATION_CONNECT_STRING');
let dbUsers = monk(CONNECTION_STRING).get('users', { castIds: false });
+859 -1102
View File
File diff suppressed because it is too large Load Diff
+6 -7
View File
@@ -1,7 +1,7 @@
{
"name": "habitica",
"description": "A habit tracker app which treats your goals like a Role Playing Game.",
"version": "4.65.3",
"version": "4.67.1",
"main": "./website/server/index.js",
"dependencies": {
"@slack/client": "^3.8.1",
@@ -35,7 +35,7 @@
"coupon-code": "^0.4.5",
"cross-env": "^5.1.5",
"css-loader": "^0.28.11",
"csv-stringify": "^3.0.0",
"csv-stringify": "^4.3.1",
"cwait": "^1.1.1",
"domain-middleware": "~0.1.0",
"express": "^4.16.3",
@@ -59,13 +59,13 @@
"js2xmlparser": "^3.0.0",
"lodash": "^4.17.10",
"merge-stream": "^1.0.0",
"method-override": "^2.3.5",
"method-override": "^3.0.0",
"moment": "^2.22.1",
"moment-recur": "^1.0.7",
"mongoose": "^5.1.3",
"mongoose": "^5.3.4",
"morgan": "^1.7.0",
"nconf": "^0.10.0",
"node-gcm": "^0.14.4",
"node-gcm": "^1.0.2",
"node-sass": "^4.9.0",
"nodemailer": "^4.6.4",
"ora": "^2.1.0",
@@ -79,7 +79,6 @@
"postcss-easy-import": "^3.0.0",
"ps-tree": "^1.0.0",
"pug": "^2.0.3",
"pusher": "^1.3.0",
"rimraf": "^2.4.3",
"sass-loader": "^7.0.0",
"shelljs": "^0.8.2",
@@ -184,7 +183,7 @@
"puppeteer": "^1.4.0",
"require-again": "^2.0.0",
"selenium-server": "^3.12.0",
"sinon": "^4.5.0",
"sinon": "^6.3.5",
"sinon-chai": "^3.0.0",
"sinon-stub-promise": "^4.0.0",
"webpack-bundle-analyzer": "^2.12.0",
+8 -1
View File
@@ -5,10 +5,17 @@ describe('Base model plugin', () => {
let schema;
beforeEach(() => {
schema = new mongoose.Schema();
schema = new mongoose.Schema({}, {
typeKey: '$type',
});
sandbox.stub(schema, 'add');
});
it('throws if "typeKey" is not set to $type', () => {
const schemaWithoutTypeKey = new mongoose.Schema();
expect(() => schemaWithoutTypeKey.plugin(baseModel)).to.throw;
});
it('adds a _id field to the schema', () => {
schema.plugin(baseModel);
@@ -48,7 +48,6 @@ describe('Amazon Payments - Cancel Subscription', () => {
function expectBillingAggreementDetailSpy () {
getBillingAgreementDetailsSpy = sinon.stub(amzLib, 'getBillingAgreementDetails')
.returnsPromise()
.resolves({
BillingAgreementDetails: {
BillingAgreementStatus: {State: 'Open'},
@@ -80,14 +79,14 @@ describe('Amazon Payments - Cancel Subscription', () => {
headers = {};
getBillingAgreementDetailsSpy = sinon.stub(amzLib, 'getBillingAgreementDetails');
getBillingAgreementDetailsSpy.returnsPromise().resolves({
getBillingAgreementDetailsSpy.resolves({
BillingAgreementDetails: {
BillingAgreementStatus: {State: 'Closed'},
},
});
paymentCancelSubscriptionSpy = sinon.stub(payments, 'cancelSubscription');
paymentCancelSubscriptionSpy.returnsPromise().resolves({});
paymentCancelSubscriptionSpy.resolves({});
});
afterEach(function () {
@@ -118,7 +117,7 @@ describe('Amazon Payments - Cancel Subscription', () => {
it('should close a user subscription if amazon not closed', async () => {
amzLib.getBillingAgreementDetails.restore();
expectBillingAggreementDetailSpy();
let closeBillingAgreementSpy = sinon.stub(amzLib, 'closeBillingAgreement').returnsPromise().resolves({});
let closeBillingAgreementSpy = sinon.stub(amzLib, 'closeBillingAgreement').resolves({});
billingAgreementId = user.purchased.plan.customerId;
await amzLib.cancelSubscription({user, headers});
@@ -164,7 +163,7 @@ describe('Amazon Payments - Cancel Subscription', () => {
it('should close a group subscription if amazon not closed', async () => {
amzLib.getBillingAgreementDetails.restore();
expectBillingAggreementDetailSpy();
let closeBillingAgreementSpy = sinon.stub(amzLib, 'closeBillingAgreement').returnsPromise().resolves({});
let closeBillingAgreementSpy = sinon.stub(amzLib, 'closeBillingAgreement').resolves({});
billingAgreementId = group.purchased.plan.customerId;
await amzLib.cancelSubscription({user, groupId: group._id, headers});
@@ -68,22 +68,22 @@ describe('Amazon Payments - Checkout', () => {
orderReferenceId = 'orderReferenceId';
setOrderReferenceDetailsSpy = sinon.stub(amzLib, 'setOrderReferenceDetails');
setOrderReferenceDetailsSpy.returnsPromise().resolves({});
setOrderReferenceDetailsSpy.resolves({});
confirmOrderReferenceSpy = sinon.stub(amzLib, 'confirmOrderReference');
confirmOrderReferenceSpy.returnsPromise().resolves({});
confirmOrderReferenceSpy.resolves({});
authorizeSpy = sinon.stub(amzLib, 'authorize');
authorizeSpy.returnsPromise().resolves({});
authorizeSpy.resolves({});
closeOrderReferenceSpy = sinon.stub(amzLib, 'closeOrderReference');
closeOrderReferenceSpy.returnsPromise().resolves({});
closeOrderReferenceSpy.resolves({});
paymentBuyGemsStub = sinon.stub(payments, 'buyGems');
paymentBuyGemsStub.returnsPromise().resolves({});
paymentBuyGemsStub.resolves({});
paymentCreateSubscritionStub = sinon.stub(payments, 'createSubscription');
paymentCreateSubscritionStub.returnsPromise().resolves({});
paymentCreateSubscritionStub.resolves({});
sinon.stub(common, 'uuid').returns('uuid-generated');
});
@@ -111,7 +111,7 @@ describe('Amazon Payments - Checkout', () => {
}
it('should purchase gems', async () => {
sinon.stub(user, 'canGetGems').returnsPromise().resolves(true);
sinon.stub(user, 'canGetGems').resolves(true);
await amzLib.checkout({user, orderReferenceId, headers});
expectBuyGemsStub(amzLib.constants.PAYMENT_METHOD);
@@ -140,7 +140,7 @@ describe('Amazon Payments - Checkout', () => {
});
it('should error if user cannot get gems gems', async () => {
sinon.stub(user, 'canGetGems').returnsPromise().resolves(false);
sinon.stub(user, 'canGetGems').resolves(false);
await expect(amzLib.checkout({user, orderReferenceId, headers})).to.eventually.be.rejected.and.to.eql({
httpCode: 401,
message: i18n.t('groupPolicyCannotGetGems'),
@@ -46,16 +46,16 @@ describe('Amazon Payments - Subscribe', () => {
headers = {};
amazonSetBillingAgreementDetailsSpy = sinon.stub(amzLib, 'setBillingAgreementDetails');
amazonSetBillingAgreementDetailsSpy.returnsPromise().resolves({});
amazonSetBillingAgreementDetailsSpy.resolves({});
amazonConfirmBillingAgreementSpy = sinon.stub(amzLib, 'confirmBillingAgreement');
amazonConfirmBillingAgreementSpy.returnsPromise().resolves({});
amazonConfirmBillingAgreementSpy.resolves({});
amazonAuthorizeOnBillingAgreementSpy = sinon.stub(amzLib, 'authorizeOnBillingAgreement');
amazonAuthorizeOnBillingAgreementSpy.returnsPromise().resolves({});
amazonAuthorizeOnBillingAgreementSpy.resolves({});
createSubSpy = sinon.stub(payments, 'createSubscription');
createSubSpy.returnsPromise().resolves({});
createSubSpy.resolves({});
sinon.stub(common, 'uuid').returns('uuid-generated');
});
@@ -37,7 +37,7 @@ describe('#upgradeGroupPlan', () => {
await group.save();
spy = sinon.stub(amzLib, 'authorizeOnBillingAgreement');
spy.returnsPromise().resolves([]);
spy.resolves([]);
uuidString = 'uuid-v4';
sinon.stub(uuid, 'v4').returns(uuidString);
+12 -12
View File
@@ -24,16 +24,16 @@ describe('Apple Payments', () => {
headers = {};
iapSetupStub = sinon.stub(iapModule, 'setup')
.returnsPromise().resolves();
.resolves();
iapValidateStub = sinon.stub(iapModule, 'validate')
.returnsPromise().resolves({});
.resolves({});
iapIsValidatedStub = sinon.stub(iapModule, 'isValidated')
.returns(true);
iapGetPurchaseDataStub = sinon.stub(iapModule, 'getPurchaseData')
.returns([{productId: 'com.habitrpg.ios.Habitica.21gems',
transactionId: token,
}]);
paymentBuyGemsStub = sinon.stub(payments, 'buyGems').returnsPromise().resolves({});
paymentBuyGemsStub = sinon.stub(payments, 'buyGems').resolves({});
});
afterEach(() => {
@@ -70,7 +70,7 @@ describe('Apple Payments', () => {
});
it('errors if the user cannot purchase gems', async () => {
sinon.stub(user, 'canGetGems').returnsPromise().resolves(false);
sinon.stub(user, 'canGetGems').resolves(false);
await expect(applePayments.verifyGemPurchase(user, receipt, headers))
.to.eventually.be.rejected.and.to.eql({
httpCode: 401,
@@ -82,7 +82,7 @@ describe('Apple Payments', () => {
});
it('errors if amount does not exist', async () => {
sinon.stub(user, 'canGetGems').returnsPromise().resolves(true);
sinon.stub(user, 'canGetGems').resolves(true);
iapGetPurchaseDataStub.restore();
iapGetPurchaseDataStub = sinon.stub(iapModule, 'getPurchaseData')
.returns([{productId: 'badProduct',
@@ -130,7 +130,7 @@ describe('Apple Payments', () => {
transactionId: token,
}]);
sinon.stub(user, 'canGetGems').returnsPromise().resolves(true);
sinon.stub(user, 'canGetGems').resolves(true);
await applePayments.verifyGemPurchase(user, receipt, headers);
expect(iapSetupStub).to.be.calledOnce;
@@ -167,9 +167,9 @@ describe('Apple Payments', () => {
nextPaymentProcessing = moment.utc().add({days: 2});
iapSetupStub = sinon.stub(iapModule, 'setup')
.returnsPromise().resolves();
.resolves();
iapValidateStub = sinon.stub(iapModule, 'validate')
.returnsPromise().resolves({});
.resolves({});
iapIsValidatedStub = sinon.stub(iapModule, 'isValidated')
.returns(true);
iapGetPurchaseDataStub = sinon.stub(iapModule, 'getPurchaseData')
@@ -186,7 +186,7 @@ describe('Apple Payments', () => {
productId: sku,
transactionId: token,
}]);
paymentsCreateSubscritionStub = sinon.stub(payments, 'createSubscription').returnsPromise().resolves({});
paymentsCreateSubscritionStub = sinon.stub(payments, 'createSubscription').resolves({});
});
afterEach(() => {
@@ -297,9 +297,9 @@ describe('Apple Payments', () => {
expirationDate = moment.utc();
iapSetupStub = sinon.stub(iapModule, 'setup')
.returnsPromise().resolves();
.resolves();
iapValidateStub = sinon.stub(iapModule, 'validate')
.returnsPromise().resolves({
.resolves({
expirationDate,
});
iapGetPurchaseDataStub = sinon.stub(iapModule, 'getPurchaseData')
@@ -314,7 +314,7 @@ describe('Apple Payments', () => {
user.purchased.plan.planId = subKey;
user.purchased.plan.additionalData = receipt;
paymentCancelSubscriptionSpy = sinon.stub(payments, 'cancelSubscription').returnsPromise().resolves({});
paymentCancelSubscriptionSpy = sinon.stub(payments, 'cancelSubscription').resolves({});
});
afterEach(function () {
+11 -11
View File
@@ -24,12 +24,12 @@ describe('Google Payments', () => {
headers = {};
iapSetupStub = sinon.stub(iapModule, 'setup')
.returnsPromise().resolves();
.resolves();
iapValidateStub = sinon.stub(iapModule, 'validate')
.returnsPromise().resolves({});
.resolves({});
iapIsValidatedStub = sinon.stub(iapModule, 'isValidated')
.returns(true);
paymentBuyGemsStub = sinon.stub(payments, 'buyGems').returnsPromise().resolves({});
paymentBuyGemsStub = sinon.stub(payments, 'buyGems').resolves({});
});
afterEach(() => {
@@ -64,7 +64,7 @@ describe('Google Payments', () => {
});
it('should throw an error if user cannot purchase gems', async () => {
sinon.stub(user, 'canGetGems').returnsPromise().resolves(false);
sinon.stub(user, 'canGetGems').resolves(false);
await expect(googlePayments.verifyGemPurchase(user, receipt, signature, headers))
.to.eventually.be.rejected.and.to.eql({
@@ -77,7 +77,7 @@ describe('Google Payments', () => {
});
it('purchases gems', async () => {
sinon.stub(user, 'canGetGems').returnsPromise().resolves(true);
sinon.stub(user, 'canGetGems').resolves(true);
await googlePayments.verifyGemPurchase(user, receipt, signature, headers);
expect(iapSetupStub).to.be.calledOnce;
@@ -116,12 +116,12 @@ describe('Google Payments', () => {
nextPaymentProcessing = moment.utc().add({days: 2});
iapSetupStub = sinon.stub(iapModule, 'setup')
.returnsPromise().resolves();
.resolves();
iapValidateStub = sinon.stub(iapModule, 'validate')
.returnsPromise().resolves({});
.resolves({});
iapIsValidatedStub = sinon.stub(iapModule, 'isValidated')
.returns(true);
paymentsCreateSubscritionStub = sinon.stub(payments, 'createSubscription').returnsPromise().resolves({});
paymentsCreateSubscritionStub = sinon.stub(payments, 'createSubscription').resolves({});
});
afterEach(() => {
@@ -193,9 +193,9 @@ describe('Google Payments', () => {
expirationDate = moment.utc();
iapSetupStub = sinon.stub(iapModule, 'setup')
.returnsPromise().resolves();
.resolves();
iapValidateStub = sinon.stub(iapModule, 'validate')
.returnsPromise().resolves({
.resolves({
expirationDate,
});
iapGetPurchaseDataStub = sinon.stub(iapModule, 'getPurchaseData')
@@ -210,7 +210,7 @@ describe('Google Payments', () => {
user.purchased.plan.planId = subKey;
user.purchased.plan.additionalData = {data: receipt, signature};
paymentCancelSubscriptionSpy = sinon.stub(payments, 'cancelSubscription').returnsPromise().resolves({});
paymentCancelSubscriptionSpy = sinon.stub(payments, 'cancelSubscription').resolves({});
});
afterEach(function () {
@@ -69,11 +69,11 @@ describe('Purchasing a group plan for group', () => {
};
let subscriptionId = 'subId';
sinon.stub(stripe.customers, 'del').returnsPromise().resolves({});
sinon.stub(stripe.customers, 'del').resolves({});
let currentPeriodEndTimeStamp = moment().add(3, 'months').unix();
sinon.stub(stripe.customers, 'retrieve')
.returnsPromise().resolves({
.resolves({
subscriptions: {
data: [{id: subscriptionId, current_period_end: currentPeriodEndTimeStamp}], // eslint-disable-line camelcase
},
@@ -216,7 +216,6 @@ describe('Purchasing a group plan for group', () => {
it('sends one email to subscribed member of group, stating subscription is cancelled (Amazon)', async () => {
sinon.stub(amzLib, 'getBillingAgreementDetails')
.returnsPromise()
.resolves({
BillingAgreementDetails: {
BillingAgreementStatus: {State: 'Closed'},
@@ -251,9 +250,9 @@ describe('Purchasing a group plan for group', () => {
});
it('sends one email to subscribed member of group, stating subscription is cancelled (PayPal)', async () => {
sinon.stub(paypalPayments, 'paypalBillingAgreementCancel').returnsPromise().resolves({});
sinon.stub(paypalPayments, 'paypalBillingAgreementCancel').resolves({});
sinon.stub(paypalPayments, 'paypalBillingAgreementGet')
.returnsPromise().resolves({
.resolves({
agreement_details: { // eslint-disable-line camelcase
next_billing_date: moment().add(3, 'months').toDate(), // eslint-disable-line camelcase
cycles_completed: 1, // eslint-disable-line camelcase
@@ -449,7 +448,6 @@ describe('Purchasing a group plan for group', () => {
it('adds months to members with existing recurring subscription (Amazon)', async () => {
sinon.stub(amzLib, 'getBillingAgreementDetails')
.returnsPromise()
.resolves({
BillingAgreementDetails: {
BillingAgreementStatus: {State: 'Closed'},
@@ -478,9 +476,9 @@ describe('Purchasing a group plan for group', () => {
});
it('adds months to members with existing recurring subscription (Paypal)', async () => {
sinon.stub(paypalPayments, 'paypalBillingAgreementCancel').returnsPromise().resolves({});
sinon.stub(paypalPayments, 'paypalBillingAgreementCancel').resolves({});
sinon.stub(paypalPayments, 'paypalBillingAgreementGet')
.returnsPromise().resolves({
.resolves({
agreement_details: { // eslint-disable-line camelcase
next_billing_date: moment().add(3, 'months').toDate(), // eslint-disable-line camelcase
cycles_completed: 1, // eslint-disable-line camelcase
@@ -446,6 +446,19 @@ describe('payments/index', () => {
fakeClock.restore();
});
it('does not add a notification for mystery items if none was awarded', async () => {
const noMysteryItemTimeframe = 1462183920000; // May 2nd 2016
let fakeClock = sinon.useFakeTimers(noMysteryItemTimeframe);
data = { paymentMethod: 'PaymentMethod', user, sub: { key: 'basic_3mo' } };
await api.createSubscription(data);
expect(user.purchased.plan.mysteryItems).to.have.a.lengthOf(0);
expect(user.notifications.find(n => n.type === 'NEW_MYSTERY_ITEMS')).to.be.undefined;
fakeClock.restore();
});
it('does not award mystery item when user already owns the item', async () => {
let mayMysteryItemTimeframe = 1464725113000; // May 31st 2016
let fakeClock = sinon.useFakeTimers(mayMysteryItemTimeframe);
@@ -13,9 +13,9 @@ describe('checkout success', () => {
customerId = 'customerId-test';
paymentId = 'paymentId-test';
paypalPaymentExecuteStub = sinon.stub(paypalPayments, 'paypalPaymentExecute').returnsPromise().resolves({});
paymentBuyGemsStub = sinon.stub(payments, 'buyGems').returnsPromise().resolves({});
paymentsCreateSubscritionStub = sinon.stub(payments, 'createSubscription').returnsPromise().resolves({});
paypalPaymentExecuteStub = sinon.stub(paypalPayments, 'paypalPaymentExecute').resolves({});
paymentBuyGemsStub = sinon.stub(payments, 'buyGems').resolves({});
paymentsCreateSubscritionStub = sinon.stub(payments, 'createSubscription').resolves({});
});
afterEach(() => {
@@ -42,7 +42,7 @@ describe('checkout', () => {
beforeEach(() => {
approvalHerf = 'approval_href';
paypalPaymentCreateStub = sinon.stub(paypalPayments, 'paypalPaymentCreate')
.returnsPromise().resolves({
.resolves({
links: [{ rel: 'approval_url', href: approvalHerf }],
});
});
@@ -80,7 +80,7 @@ describe('checkout', () => {
it('should error if the user cannot get gems', async () => {
let user = new User();
sinon.stub(user, 'canGetGems').returnsPromise().resolves(false);
sinon.stub(user, 'canGetGems').resolves(false);
await expect(paypalPayments.checkout({user})).to.eventually.be.rejected.and.to.eql({
httpCode: 401,
@@ -34,8 +34,8 @@ describe('ipn', () => {
group.purchased.plan.lastBillingDate = new Date();
await group.save();
ipnVerifyAsyncStub = sinon.stub(paypalPayments, 'ipnVerifyAsync').returnsPromise().resolves({});
paymentCancelSubscriptionSpy = sinon.stub(payments, 'cancelSubscription').returnsPromise().resolves({});
ipnVerifyAsyncStub = sinon.stub(paypalPayments, 'ipnVerifyAsync').resolves({});
paymentCancelSubscriptionSpy = sinon.stub(payments, 'cancelSubscription').resolves({});
});
afterEach(function () {
@@ -38,15 +38,15 @@ describe('subscribeCancel', () => {
nextBillingDate = new Date();
paypalBillingAgreementCancelStub = sinon.stub(paypalPayments, 'paypalBillingAgreementCancel').returnsPromise().resolves({});
paypalBillingAgreementCancelStub = sinon.stub(paypalPayments, 'paypalBillingAgreementCancel').resolves({});
paypalBillingAgreementGetStub = sinon.stub(paypalPayments, 'paypalBillingAgreementGet')
.returnsPromise().resolves({
.resolves({
agreement_details: {
next_billing_date: nextBillingDate,
cycles_completed: 1,
},
});
paymentCancelSubscriptionSpy = sinon.stub(payments, 'cancelSubscription').returnsPromise().resolves({});
paymentCancelSubscriptionSpy = sinon.stub(payments, 'cancelSubscription').resolves({});
});
afterEach(function () {
@@ -28,10 +28,10 @@ describe('subscribeSuccess', () => {
customerId = 'test-customerId';
paypalBillingAgreementExecuteStub = sinon.stub(paypalPayments, 'paypalBillingAgreementExecute')
.returnsPromise({}).resolves({
.resolves({
id: customerId,
});
paymentsCreateSubscritionStub = sinon.stub(payments, 'createSubscription').returnsPromise().resolves({});
paymentsCreateSubscritionStub = sinon.stub(payments, 'createSubscription').resolves({});
});
afterEach(() => {
@@ -18,7 +18,7 @@ describe('subscribe', () => {
sub = Object.assign({}, common.content.subscriptionBlocks[subKey]);
paypalBillingAgreementCreateStub = sinon.stub(paypalPayments, 'paypalBillingAgreementCreate')
.returnsPromise().resolves({
.resolves({
links: [{ rel: 'approval_url', href: approvalHerf }],
});
});
@@ -82,12 +82,12 @@ describe('cancel subscription', () => {
beforeEach(() => {
subscriptionId = 'subId';
stripeDeleteCustomerStub = sinon.stub(stripe.customers, 'del').returnsPromise().resolves({});
paymentsCancelSubStub = sinon.stub(payments, 'cancelSubscription').returnsPromise().resolves({});
stripeDeleteCustomerStub = sinon.stub(stripe.customers, 'del').resolves({});
paymentsCancelSubStub = sinon.stub(payments, 'cancelSubscription').resolves({});
currentPeriodEndTimeStamp = (new Date()).getTime();
stripeRetrieveStub = sinon.stub(stripe.customers, 'retrieve')
.returnsPromise().resolves({
.resolves({
subscriptions: {
data: [{id: subscriptionId, current_period_end: currentPeriodEndTimeStamp}], // eslint-disable-line camelcase
},
@@ -54,7 +54,7 @@ describe('checkout with subscription', () => {
token = 'test-token';
spy = sinon.stub(stripe.subscriptions, 'update');
spy.returnsPromise().resolves;
spy.resolves;
stripeCreateCustomerSpy = sinon.stub(stripe.customers, 'create');
let stripCustomerResponse = {
@@ -63,10 +63,10 @@ describe('checkout with subscription', () => {
data: [{id: subscriptionId}],
},
};
stripeCreateCustomerSpy.returnsPromise().resolves(stripCustomerResponse);
stripeCreateCustomerSpy.resolves(stripCustomerResponse);
stripePaymentsCreateSubSpy = sinon.stub(payments, 'createSubscription');
stripePaymentsCreateSubSpy.returnsPromise().resolves({});
stripePaymentsCreateSubSpy.resolves({});
data.groupId = group._id;
data.sub.quantity = 3;
@@ -26,9 +26,9 @@ describe('checkout', () => {
let stripCustomerResponse = {
id: customerIdResponse,
};
stripeChargeStub = sinon.stub(stripe.charges, 'create').returnsPromise().resolves(stripCustomerResponse);
paymentBuyGemsStub = sinon.stub(payments, 'buyGems').returnsPromise().resolves({});
paymentCreateSubscritionStub = sinon.stub(payments, 'createSubscription').returnsPromise().resolves({});
stripeChargeStub = sinon.stub(stripe.charges, 'create').resolves(stripCustomerResponse);
paymentBuyGemsStub = sinon.stub(payments, 'buyGems').resolves({});
paymentCreateSubscritionStub = sinon.stub(payments, 'createSubscription').resolves({});
});
afterEach(() => {
@@ -82,7 +82,7 @@ describe('checkout', () => {
it('should error if user cannot get gems', async () => {
gift = undefined;
sinon.stub(user, 'canGetGems').returnsPromise().resolves(false);
sinon.stub(user, 'canGetGems').resolves(false);
await expect(stripePayments.checkout({
token,
@@ -101,7 +101,7 @@ describe('checkout', () => {
it('should purchase gems', async () => {
gift = undefined;
sinon.stub(user, 'canGetGems').returnsPromise().resolves(true);
sinon.stub(user, 'canGetGems').resolves(true);
await stripePayments.checkout({
token,
@@ -98,11 +98,11 @@ describe('edit subscription', () => {
beforeEach(() => {
subscriptionId = 'subId';
stripeListSubscriptionStub = sinon.stub(stripe.customers, 'listSubscriptions')
.returnsPromise().resolves({
.resolves({
data: [{id: subscriptionId}],
});
stripeUpdateSubscriptionStub = sinon.stub(stripe.customers, 'updateSubscription').returnsPromise().resolves({});
stripeUpdateSubscriptionStub = sinon.stub(stripe.customers, 'updateSubscription').resolves({});
});
afterEach(() => {
@@ -22,7 +22,7 @@ describe('Stripe - Webhooks', () => {
const eventRetrieved = {type: eventType};
beforeEach(() => {
sinon.stub(stripe.events, 'retrieve').returnsPromise().resolves(eventRetrieved);
sinon.stub(stripe.events, 'retrieve').resolves(eventRetrieved);
sinon.stub(logger, 'error');
});
@@ -52,8 +52,8 @@ describe('Stripe - Webhooks', () => {
const eventType = 'customer.subscription.deleted';
beforeEach(() => {
sinon.stub(stripe.customers, 'del').returnsPromise().resolves({});
sinon.stub(payments, 'cancelSubscription').returnsPromise().resolves({});
sinon.stub(stripe.customers, 'del').resolves({});
sinon.stub(payments, 'cancelSubscription').resolves({});
});
afterEach(() => {
@@ -62,7 +62,7 @@ describe('Stripe - Webhooks', () => {
});
it('does not do anything if event.request is null (subscription cancelled manually)', async () => {
sinon.stub(stripe.events, 'retrieve').returnsPromise().resolves({
sinon.stub(stripe.events, 'retrieve').resolves({
id: 123,
type: eventType,
request: 123,
@@ -79,7 +79,7 @@ describe('Stripe - Webhooks', () => {
describe('user subscription', () => {
it('throws an error if the user is not found', async () => {
const customerId = 456;
sinon.stub(stripe.events, 'retrieve').returnsPromise().resolves({
sinon.stub(stripe.events, 'retrieve').resolves({
id: 123,
type: eventType,
data: {
@@ -113,7 +113,7 @@ describe('Stripe - Webhooks', () => {
subscriber.purchased.plan.paymentMethod = 'Stripe';
await subscriber.save();
sinon.stub(stripe.events, 'retrieve').returnsPromise().resolves({
sinon.stub(stripe.events, 'retrieve').resolves({
id: 123,
type: eventType,
data: {
@@ -146,7 +146,7 @@ describe('Stripe - Webhooks', () => {
describe('group plan subscription', () => {
it('throws an error if the group is not found', async () => {
const customerId = 456;
sinon.stub(stripe.events, 'retrieve').returnsPromise().resolves({
sinon.stub(stripe.events, 'retrieve').resolves({
id: 123,
type: eventType,
data: {
@@ -185,7 +185,7 @@ describe('Stripe - Webhooks', () => {
subscriber.purchased.plan.paymentMethod = 'Stripe';
await subscriber.save();
sinon.stub(stripe.events, 'retrieve').returnsPromise().resolves({
sinon.stub(stripe.events, 'retrieve').resolves({
id: 123,
type: eventType,
data: {
@@ -227,7 +227,7 @@ describe('Stripe - Webhooks', () => {
subscriber.purchased.plan.paymentMethod = 'Stripe';
await subscriber.save();
sinon.stub(stripe.events, 'retrieve').returnsPromise().resolves({
sinon.stub(stripe.events, 'retrieve').resolves({
id: 123,
type: eventType,
data: {
@@ -38,7 +38,7 @@ describe('Stripe - Upgrade Group Plan', () => {
await group.save();
spy = sinon.stub(stripe.subscriptions, 'update');
spy.returnsPromise().resolves([]);
spy.resolves([]);
data.groupId = group._id;
data.sub.quantity = 3;
stripePayments.setStripeApi(stripe);
+32 -6
View File
@@ -477,7 +477,7 @@ describe('Group Model', () => {
party.quest.active = false;
await party.startQuest(questLeader);
Group.prototype.sendChat.reset();
Group.prototype.sendChat.resetHistory();
await party.save();
await Group.processQuestProgress(participatingMember, progress);
@@ -496,7 +496,7 @@ describe('Group Model', () => {
party.quest.active = false;
await party.startQuest(questLeader);
Group.prototype.sendChat.reset();
Group.prototype.sendChat.resetHistory();
await party.save();
await Group.processQuestProgress(participatingMember, progress);
@@ -1932,28 +1932,54 @@ describe('Group Model', () => {
context('hasNotCancelled', () => {
it('returns false if group does not have customer id', () => {
expect(party.hasNotCancelled()).to.be.undefined;
expect(party.hasNotCancelled()).to.be.false;
});
it('returns true if party does not have plan.dateTerminated', () => {
it('returns true if group does not have plan.dateTerminated', () => {
party.purchased.plan.customerId = 'test-id';
expect(party.hasNotCancelled()).to.be.true;
});
it('returns false if party if plan.dateTerminated is after today', () => {
it('returns false if group if plan.dateTerminated is after today', () => {
party.purchased.plan.customerId = 'test-id';
party.purchased.plan.dateTerminated = moment().add(1, 'days').toDate();
expect(party.hasNotCancelled()).to.be.false;
});
it('returns false if party if plan.dateTerminated is before today', () => {
it('returns false if group if plan.dateTerminated is before today', () => {
party.purchased.plan.customerId = 'test-id';
party.purchased.plan.dateTerminated = moment().subtract(1, 'days').toDate();
expect(party.hasNotCancelled()).to.be.false;
});
});
context('hasCancelled', () => {
it('returns false if group does not have customer id', () => {
expect(party.hasCancelled()).to.be.false;
});
it('returns false if group does not have plan.dateTerminated', () => {
party.purchased.plan.customerId = 'test-id';
expect(party.hasCancelled()).to.be.false;
});
it('returns true if group if plan.dateTerminated is after today', () => {
party.purchased.plan.customerId = 'test-id';
party.purchased.plan.dateTerminated = moment().add(1, 'days').toDate();
expect(party.hasCancelled()).to.be.true;
});
it('returns false if group if plan.dateTerminated is before today', () => {
party.purchased.plan.customerId = 'test-id';
party.purchased.plan.dateTerminated = moment().subtract(1, 'days').toDate();
expect(party.hasCancelled()).to.be.false;
});
});
});
});
+33 -2
View File
@@ -315,9 +315,8 @@ describe('User Model', () => {
user = new User();
});
it('returns false if user does not have customer id', () => {
expect(user.hasNotCancelled()).to.be.undefined;
expect(user.hasNotCancelled()).to.be.false;
});
it('returns true if user does not have plan.dateTerminated', () => {
@@ -341,6 +340,38 @@ describe('User Model', () => {
});
});
context('hasCancelled', () => {
let user;
beforeEach(() => {
user = new User();
});
it('returns false if user does not have customer id', () => {
expect(user.hasCancelled()).to.be.false;
});
it('returns false if user does not have plan.dateTerminated', () => {
user.purchased.plan.customerId = 'test-id';
expect(user.hasCancelled()).to.be.false;
});
it('returns true if user if plan.dateTerminated is after today', () => {
user.purchased.plan.customerId = 'test-id';
user.purchased.plan.dateTerminated = moment().add(1, 'days').toDate();
expect(user.hasCancelled()).to.be.true;
});
it('returns false if user if plan.dateTerminated is before today', () => {
user.purchased.plan.customerId = 'test-id';
user.purchased.plan.dateTerminated = moment().subtract(1, 'days').toDate();
expect(user.hasCancelled()).to.be.false;
});
});
context('pre-save hook', () => {
it('does not try to award achievements when achievements or items not selected in query', async () => {
let user = new User();
@@ -203,7 +203,7 @@ describe('GET /groups', () => {
let page2 = await expect(user.get('/groups?type=publicGuilds&paginate=true&page=2'))
.to.eventually.have.a.lengthOf(1 + 4); // 1 created now, 4 by other tests
expect(page2[4].name).to.equal('guild with less members');
});
}).timeout(10000);
});
it('returns all the user\'s guilds when guilds passed in as query', async () => {
@@ -79,7 +79,7 @@ describe('GET /groups/:groupId/invites', () => {
expect(member).to.have.all.keys(['_id', 'id', 'profile']);
expect(member.profile).to.have.all.keys(['name']);
});
});
}).timeout(10000);
it('supports using req.query.lastId to get more invites', async function () {
this.timeout(30000); // @TODO: times out after 8 seconds
@@ -417,7 +417,7 @@ describe('Post /groups/:groupId/invite', () => {
expect(await inviter.post(`/groups/${group._id}/invite`, {
uuids: generatedInvites.map(invite => invite._id),
})).to.be.an('array');
});
}).timeout(10000);
// @TODO: Add this after we are able to mock the group plan route
xit('returns an error when a non-leader invites to a group plan', async () => {
@@ -564,7 +564,7 @@ describe('Post /groups/:groupId/invite', () => {
expect(await inviter.post(`/groups/${party._id}/invite`, {
uuids: generatedInvites.map(invite => invite._id),
})).to.be.an('array');
});
}).timeout(10000);
it('does not allow 30+ members in a party', async () => {
let invitesToGenerate = [];
@@ -582,6 +582,6 @@ describe('Post /groups/:groupId/invite', () => {
error: 'BadRequest',
message: t('partyExceedsMembersLimit', {maxMembersParty: PARTY_LIMIT_MEMBERS}),
});
});
}).timeout(10000);
});
});
@@ -56,5 +56,5 @@ describe('GET /hall/patrons', () => {
expect(morePatrons.length).to.equal(2);
expect(morePatrons[0].backer.tier).to.equal(2);
expect(morePatrons[1].backer.tier).to.equal(1);
});
}).timeout(10000);
});
@@ -23,7 +23,7 @@ describe('payments : amazon #subscribeCancel', () => {
describe('success', () => {
beforeEach(() => {
amazonSubscribeCancelStub = sinon.stub(amzLib, 'cancelSubscription').returnsPromise().resolves({});
amazonSubscribeCancelStub = sinon.stub(amzLib, 'cancelSubscription').resolves({});
});
afterEach(() => {
@@ -21,7 +21,7 @@ describe('payments - amazon - #checkout', () => {
describe('success', () => {
beforeEach(async () => {
amazonCheckoutStub = sinon.stub(amzLib, 'checkout').returnsPromise().resolves({});
amazonCheckoutStub = sinon.stub(amzLib, 'checkout').resolves({});
});
afterEach(() => {
@@ -27,7 +27,7 @@ describe('payments - amazon - #subscribe', () => {
let coupon;
beforeEach(() => {
subscribeWithAmazonStub = sinon.stub(amzLib, 'subscribe').returnsPromise().resolves({});
subscribeWithAmazonStub = sinon.stub(amzLib, 'subscribe').resolves({});
});
afterEach(() => {
@@ -13,7 +13,7 @@ describe('payments : apple #cancelSubscribe', () => {
let cancelStub;
beforeEach(async () => {
cancelStub = sinon.stub(applePayments, 'cancelSubscribe').returnsPromise().resolves({});
cancelStub = sinon.stub(applePayments, 'cancelSubscribe').resolves({});
});
afterEach(() => {
@@ -13,7 +13,7 @@ describe('payments : apple #verify', () => {
let verifyStub;
beforeEach(async () => {
verifyStub = sinon.stub(applePayments, 'verifyGemPurchase').returnsPromise().resolves({});
verifyStub = sinon.stub(applePayments, 'verifyGemPurchase').resolves({});
});
afterEach(() => {
@@ -21,7 +21,7 @@ describe('payments : apple #subscribe', () => {
let subscribeStub;
beforeEach(async () => {
subscribeStub = sinon.stub(applePayments, 'subscribe').returnsPromise().resolves({});
subscribeStub = sinon.stub(applePayments, 'subscribe').resolves({});
});
afterEach(() => {
@@ -13,7 +13,7 @@ describe('payments : google #cancelSubscribe', () => {
let cancelStub;
beforeEach(async () => {
cancelStub = sinon.stub(googlePayments, 'cancelSubscribe').returnsPromise().resolves({});
cancelStub = sinon.stub(googlePayments, 'cancelSubscribe').resolves({});
});
afterEach(() => {
@@ -21,7 +21,7 @@ describe('payments : google #subscribe', () => {
let subscribeStub;
beforeEach(async () => {
subscribeStub = sinon.stub(googlePayments, 'subscribe').returnsPromise().resolves({});
subscribeStub = sinon.stub(googlePayments, 'subscribe').resolves({});
});
afterEach(() => {
@@ -13,7 +13,7 @@ describe('payments : google #verify', () => {
let verifyStub;
beforeEach(async () => {
verifyStub = sinon.stub(googlePayments, 'verifyGemPurchase').returnsPromise().resolves({});
verifyStub = sinon.stub(googlePayments, 'verifyGemPurchase').resolves({});
});
afterEach(() => {
@@ -15,7 +15,7 @@ describe('payments : paypal #checkout', () => {
let checkoutStub;
beforeEach(async () => {
checkoutStub = sinon.stub(paypalPayments, 'checkout').returnsPromise().resolves('/');
checkoutStub = sinon.stub(paypalPayments, 'checkout').resolves('/');
});
afterEach(() => {
@@ -34,7 +34,7 @@ describe('payments : paypal #checkoutSuccess', () => {
let checkoutSuccessStub;
beforeEach(async () => {
checkoutSuccessStub = sinon.stub(paypalPayments, 'checkoutSuccess').returnsPromise().resolves({});
checkoutSuccessStub = sinon.stub(paypalPayments, 'checkoutSuccess').resolves({});
});
afterEach(() => {
@@ -25,7 +25,7 @@ describe('payments : paypal #subscribe', () => {
let subscribeStub;
beforeEach(async () => {
subscribeStub = sinon.stub(paypalPayments, 'subscribe').returnsPromise().resolves('/');
subscribeStub = sinon.stub(paypalPayments, 'subscribe').resolves('/');
});
afterEach(() => {
@@ -25,7 +25,7 @@ describe('payments : paypal #subscribeCancel', () => {
let subscribeCancelStub;
beforeEach(async () => {
subscribeCancelStub = sinon.stub(paypalPayments, 'subscribeCancel').returnsPromise().resolves('/');
subscribeCancelStub = sinon.stub(paypalPayments, 'subscribeCancel').resolves('/');
});
afterEach(() => {
@@ -24,7 +24,7 @@ describe('payments : paypal #subscribeSuccess', () => {
let subscribeSuccessStub;
beforeEach(async () => {
subscribeSuccessStub = sinon.stub(paypalPayments, 'subscribeSuccess').returnsPromise().resolves({});
subscribeSuccessStub = sinon.stub(paypalPayments, 'subscribeSuccess').resolves({});
});
afterEach(() => {
@@ -20,7 +20,7 @@ describe('payments - paypal - #ipn', () => {
let ipnStub;
beforeEach(async () => {
ipnStub = sinon.stub(paypalPayments, 'ipn').returnsPromise().resolves({});
ipnStub = sinon.stub(paypalPayments, 'ipn').resolves({});
});
afterEach(() => {
@@ -23,7 +23,7 @@ describe('payments - stripe - #subscribeCancel', () => {
describe('success', () => {
beforeEach(async () => {
stripeCancelSubscriptionStub = sinon.stub(stripePayments, 'cancelSubscription').returnsPromise().resolves({});
stripeCancelSubscriptionStub = sinon.stub(stripePayments, 'cancelSubscription').resolves({});
});
afterEach(() => {
@@ -24,7 +24,7 @@ describe('payments - stripe - #checkout', () => {
let stripeCheckoutSubscriptionStub;
beforeEach(async () => {
stripeCheckoutSubscriptionStub = sinon.stub(stripePayments, 'checkout').returnsPromise().resolves({});
stripeCheckoutSubscriptionStub = sinon.stub(stripePayments, 'checkout').resolves({});
});
afterEach(() => {
@@ -25,7 +25,7 @@ describe('payments - stripe - #subscribeEdit', () => {
let stripeEditSubscriptionStub;
beforeEach(async () => {
stripeEditSubscriptionStub = sinon.stub(stripePayments, 'editSubscription').returnsPromise().resolves({});
stripeEditSubscriptionStub = sinon.stub(stripePayments, 'editSubscription').resolves({});
});
afterEach(() => {
@@ -39,14 +39,16 @@ describe('POST /user/push-devices', () => {
});
});
it('returns an error if user already has the push device', async () => {
it('fails silently if user already has the push device', async () => {
await user.post('/user/push-devices', {type, regId});
await expect(user.post('/user/push-devices', {type, regId}))
.to.eventually.be.rejected.and.eql({
code: 401,
error: 'NotAuthorized',
message: t('pushDeviceAlreadyAdded'),
});
const response = await user.post('/user/push-devices', {type, regId});
await user.sync();
expect(response.message).to.equal(t('pushDeviceAdded'));
expect(response.data[0].type).to.equal(type);
expect(response.data[0].regId).to.equal(regId);
expect(user.pushDevices[0].type).to.equal(type);
expect(user.pushDevices[0].regId).to.equal(regId);
});
it('adds a push device to the user', async () => {
@@ -276,7 +276,7 @@ describe('POST /user/auth/local/register', () => {
});
});
it('enrolls new users in an A/B test', async () => {
xit('enrolls new users in an A/B test', async () => {
let username = generateRandomUserName();
let email = `${username}@example.com`;
let password = 'password';
@@ -1,102 +0,0 @@
/* eslint-disable camelcase */
import {
generateUser,
requester,
translate as t,
} from '../../../../../helpers/api-integration/v3';
import { v4 as generateUUID } from 'uuid';
describe('POST /user/auth/pusher', () => {
let user;
let endpoint = '/user/auth/pusher';
beforeEach(async () => {
user = await generateUser();
});
it('requires authentication', async () => {
let api = requester();
await expect(api.post(endpoint)).to.eventually.be.rejected.and.eql({
code: 401,
error: 'NotAuthorized',
message: t('missingAuthHeaders'),
});
});
it('returns an error if req.body.socket_id is missing', async () => {
await expect(user.post(endpoint, {
channel_name: '123',
})).to.eventually.be.rejected.and.eql({
code: 400,
error: 'BadRequest',
message: t('invalidReqParams'),
});
});
it('returns an error if req.body.channel_name is missing', async () => {
await expect(user.post(endpoint, {
socket_id: '123',
})).to.eventually.be.rejected.and.eql({
code: 400,
error: 'BadRequest',
message: t('invalidReqParams'),
});
});
it('returns an error if req.body.channel_name is badly formatted', async () => {
await expect(user.post(endpoint, {
channel_name: '123',
socket_id: '123',
})).to.eventually.be.rejected.and.eql({
code: 400,
error: 'BadRequest',
message: 'Invalid Pusher channel type.',
});
});
it('returns an error if an invalid channel type is passed', async () => {
await expect(user.post(endpoint, {
channel_name: 'invalid-group-123',
socket_id: '123',
})).to.eventually.be.rejected.and.eql({
code: 400,
error: 'BadRequest',
message: 'Invalid Pusher channel type.',
});
});
it('returns an error if an invalid resource type is passed', async () => {
await expect(user.post(endpoint, {
channel_name: 'presence-user-123',
socket_id: '123',
})).to.eventually.be.rejected.and.eql({
code: 400,
error: 'BadRequest',
message: 'Invalid Pusher resource type.',
});
});
it('returns an error if an invalid resource id is passed', async () => {
await expect(user.post(endpoint, {
channel_name: 'presence-group-123',
socket_id: '123',
})).to.eventually.be.rejected.and.eql({
code: 400,
error: 'BadRequest',
message: 'Invalid Pusher resource id, must be a UUID.',
});
});
it('returns an error if the passed resource id doesn\'t match the user\'s party', async () => {
await expect(user.post(endpoint, {
channel_name: `presence-group-${generateUUID()}`,
socket_id: '123',
})).to.eventually.be.rejected.and.eql({
code: 404,
error: 'NotFound',
message: 'Resource id must be the user\'s party.',
});
});
});
@@ -80,7 +80,7 @@ describe('POST /user/auth/social', () => {
expect(response.newUser).to.be.false;
});
it('enrolls a new user in an A/B test', async () => {
xit('enrolls a new user in an A/B test', async () => {
await api.post(endpoint, {
authResponse: {access_token: randomAccessToken}, // eslint-disable-line camelcase
network,
@@ -136,7 +136,7 @@ describe('POST /user/auth/social', () => {
expect(response.newUser).to.be.false;
});
it('enrolls a new user in an A/B test', async () => {
xit('enrolls a new user in an A/B test', async () => {
await api.post(endpoint, {
authResponse: {access_token: randomAccessToken}, // eslint-disable-line camelcase
network,
+1 -1
View File
@@ -4,7 +4,7 @@ require('babel-polyfill');
// Automatically setup SinonJS' sandbox for each test
beforeEach(() => {
global.sandbox = sinon.sandbox.create();
global.sandbox = sinon.createSandbox();
});
afterEach(() => {
+21
View File
@@ -0,0 +1,21 @@
import armoireSet from '../../../website/common/script/content/gear/sets/armoire';
describe('armoireSet items', () => {
it('checks if canOwn has the same id', () => {
for (const type of Object.keys(armoireSet)) {
for (const itemKey of Object.keys(armoireSet[type])) {
const ownedKey = `${type}_armoire_${itemKey}`;
expect(armoireSet[type][itemKey].canOwn({
items: {
gear: {
owned: {
[ownedKey]: true,
},
},
},
}), `${ownedKey} canOwn is broken`).to.eq(true);
}
}
});
});
+1 -1
View File
@@ -13,7 +13,7 @@ global.expect = chai.expect;
global.sinon = require('sinon');
let sinonStubPromise = require('sinon-stub-promise');
sinonStubPromise(global.sinon);
global.sandbox = sinon.sandbox.create();
global.sandbox = sinon.createSandbox();
import setupNconf from '../../website/server/libs/setupNconf';
setupNconf('./config.json.example');
@@ -1,6 +1,6 @@
.achievement-costumeContest6x {
background-image: url('~assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: -1277px -296px;
background-position: -1013px -819px;
width: 144px;
height: 156px;
}
@@ -12,43 +12,43 @@
}
.promo_animal_tails {
background-image: url('~assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: -994px 0px;
background-position: -1013px -208px;
width: 141px;
height: 441px;
}
.promo_armoire_backgrounds_201810 {
background-image: url('~assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: 0px -937px;
background-position: -848px -1009px;
width: 423px;
height: 147px;
}
.promo_fall_avatar_customizations {
background-image: url('~assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: -394px -723px;
background-position: -1013px 0px;
width: 336px;
height: 207px;
}
.promo_fall_festival_2017 {
background-image: url('~assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: -481px -495px;
background-position: -481px -453px;
width: 414px;
height: 210px;
}
.promo_fall_festival_2018 {
background-image: url('~assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: 0px -723px;
background-position: -367px -723px;
width: 393px;
height: 213px;
}
.promo_forest_friends_bundle {
background-image: url('~assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: -1136px 0px;
background-position: 0px -1009px;
width: 423px;
height: 147px;
}
.promo_ghost_potions {
background-image: url('~assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: -424px -937px;
background-position: -424px -1009px;
width: 423px;
height: 147px;
}
@@ -58,39 +58,51 @@
width: 375px;
height: 361px;
}
.promo_mystery_201809 {
.promo_mystery_201810 {
background-image: url('~assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: -1136px -148px;
width: 306px;
height: 147px;
background-position: -1013px -650px;
width: 294px;
height: 168px;
}
.promo_seasonal_shop {
background-image: url('~assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: -1136px -591px;
background-position: -1155px -503px;
width: 162px;
height: 138px;
}
.promo_spooky_sparkles {
background-image: url('~assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: -1136px -296px;
background-position: -1155px -208px;
width: 140px;
height: 294px;
}
.promo_take_this {
background-image: url('~assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: -1443px -148px;
background-position: -1158px -819px;
width: 96px;
height: 69px;
}
.promo_veteran_pets {
background-image: url('~assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: 0px -1157px;
width: 363px;
height: 141px;
}
.scene_nametag {
background-image: url('~assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: -481px 0px;
background-position: -481px -244px;
width: 512px;
height: 208px;
}
.scene_positivity {
background-image: url('~assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: -481px 0px;
width: 531px;
height: 243px;
}
.scene_tools {
background-image: url('~assets/images/sprites/spritesmith-largeSprites-0.png');
background-position: -481px -209px;
background-position: 0px -723px;
width: 366px;
height: 285px;
}
File diff suppressed because it is too large Load Diff
@@ -4,45 +4,51 @@
width: 221px;
height: 39px;
}
.quest_dilatoryDistress2 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1757px -1023px;
width: 150px;
height: 150px;
}
.quest_dilatoryDistress3 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -440px -452px;
background-position: -1320px -660px;
width: 219px;
height: 219px;
}
.quest_dustbunnies {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1320px 0px;
background-position: -440px 0px;
width: 219px;
height: 219px;
}
.quest_egg {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1757px -537px;
background-position: -1757px -362px;
width: 165px;
height: 207px;
}
.quest_evilsanta {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1757px -1198px;
background-position: -1757px -1174px;
width: 118px;
height: 131px;
}
.quest_evilsanta2 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: 0px -232px;
background-position: -440px -232px;
width: 219px;
height: 219px;
}
.quest_falcon {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -220px -232px;
background-position: -660px 0px;
width: 219px;
height: 219px;
}
.quest_ferret {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -440px -232px;
background-position: -660px -220px;
width: 219px;
height: 219px;
}
@@ -54,19 +60,19 @@
}
.quest_ghost_stag {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -660px -220px;
background-position: -220px -452px;
width: 219px;
height: 219px;
}
.quest_goldenknight1 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: 0px -452px;
background-position: -440px -452px;
width: 219px;
height: 219px;
}
.quest_goldenknight2 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -251px -1546px;
background-position: 0px -1546px;
width: 250px;
height: 150px;
}
@@ -78,19 +84,19 @@
}
.quest_gryphon {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1322px -1112px;
background-position: -1097px -1332px;
width: 216px;
height: 177px;
}
.quest_guineapig {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -880px 0px;
background-position: -880px -440px;
width: 219px;
height: 219px;
}
.quest_harpy {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -880px -220px;
background-position: 0px -672px;
width: 219px;
height: 219px;
}
@@ -102,109 +108,109 @@
}
.quest_hippo {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: 0px -672px;
background-position: -440px -672px;
width: 219px;
height: 219px;
}
.quest_horse {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -220px -672px;
background-position: -660px -672px;
width: 219px;
height: 219px;
}
.quest_kangaroo {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -440px -672px;
background-position: -880px -672px;
width: 219px;
height: 219px;
}
.quest_kraken {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1531px -1332px;
background-position: -1322px -1112px;
width: 216px;
height: 177px;
}
.quest_lostMasterclasser1 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -660px -672px;
background-position: -1100px -220px;
width: 219px;
height: 219px;
}
.quest_lostMasterclasser2 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -880px -672px;
background-position: -1100px -440px;
width: 219px;
height: 219px;
}
.quest_lostMasterclasser3 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -220px 0px;
background-position: -1100px -660px;
width: 219px;
height: 219px;
}
.quest_mayhemMistiflying1 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1757px -896px;
background-position: -1757px -872px;
width: 150px;
height: 150px;
}
.quest_mayhemMistiflying2 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1100px -440px;
background-position: -220px -892px;
width: 219px;
height: 219px;
}
.quest_mayhemMistiflying3 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1100px -660px;
background-position: -440px -892px;
width: 219px;
height: 219px;
}
.quest_monkey {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: 0px -892px;
background-position: -660px -892px;
width: 219px;
height: 219px;
}
.quest_moon1 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1540px -217px;
background-position: -1540px -434px;
width: 216px;
height: 216px;
}
.quest_moon2 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -220px -892px;
background-position: -1100px -892px;
width: 219px;
height: 219px;
}
.quest_moon3 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -440px -892px;
background-position: -1320px 0px;
width: 219px;
height: 219px;
}
.quest_moonstone1 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -660px -892px;
background-position: -1320px -220px;
width: 219px;
height: 219px;
}
.quest_moonstone2 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -880px -892px;
background-position: -1320px -440px;
width: 219px;
height: 219px;
}
.quest_moonstone3 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1100px -892px;
background-position: -220px 0px;
width: 219px;
height: 219px;
}
.quest_nudibranch {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1540px -651px;
background-position: -1540px -217px;
width: 216px;
height: 216px;
}
@@ -216,7 +222,7 @@
}
.quest_owl {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1320px -440px;
background-position: -220px -1112px;
width: 219px;
height: 219px;
}
@@ -228,31 +234,31 @@
}
.quest_penguin {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1757px -353px;
background-position: -1757px -178px;
width: 190px;
height: 183px;
}
.quest_pterodactyl {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1320px -880px;
background-position: -880px -1112px;
width: 219px;
height: 219px;
}
.quest_rat {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: 0px -1112px;
background-position: -660px -1112px;
width: 219px;
height: 219px;
}
.quest_rock {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1540px -868px;
background-position: -1540px -651px;
width: 216px;
height: 216px;
}
.quest_rooster {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1757px 0px;
background-position: -1531px -1332px;
width: 213px;
height: 174px;
}
@@ -264,25 +270,25 @@
}
.quest_seaserpent {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -660px -1112px;
background-position: 0px -1112px;
width: 219px;
height: 219px;
}
.quest_sheep {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -660px 0px;
background-position: -1320px -880px;
width: 219px;
height: 219px;
}
.quest_slime {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -880px -1112px;
background-position: -880px -892px;
width: 219px;
height: 219px;
}
.quest_sloth {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -220px -1112px;
background-position: 0px -892px;
width: 219px;
height: 219px;
}
@@ -300,103 +306,97 @@
}
.quest_spider {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: 0px -1546px;
background-position: -251px -1546px;
width: 250px;
height: 150px;
}
.quest_squirrel {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1320px -660px;
background-position: -1100px 0px;
width: 219px;
height: 219px;
}
.quest_stoikalmCalamity1 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1757px -745px;
background-position: -1757px -721px;
width: 150px;
height: 150px;
}
.quest_stoikalmCalamity2 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1320px -220px;
background-position: -220px -672px;
width: 219px;
height: 219px;
}
.quest_stoikalmCalamity3 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1100px -220px;
background-position: -880px -220px;
width: 219px;
height: 219px;
}
.quest_taskwoodsTerror1 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1757px -1047px;
background-position: -1757px -570px;
width: 150px;
height: 150px;
}
.quest_taskwoodsTerror2 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1540px -434px;
background-position: -1540px -868px;
width: 216px;
height: 216px;
}
.quest_taskwoodsTerror3 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -880px -440px;
background-position: -660px -452px;
width: 219px;
height: 219px;
}
.quest_treeling {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1097px -1332px;
background-position: -880px -1332px;
width: 216px;
height: 177px;
}
.quest_trex {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1757px -175px;
background-position: -1757px 0px;
width: 204px;
height: 177px;
}
.quest_trex_undead {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -663px -1332px;
background-position: -1540px -1085px;
width: 216px;
height: 177px;
}
.quest_triceratops {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -660px -452px;
background-position: 0px -452px;
width: 219px;
height: 219px;
}
.quest_turtle {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -220px -452px;
background-position: -220px -232px;
width: 219px;
height: 219px;
}
.quest_unicorn {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -440px 0px;
background-position: 0px -232px;
width: 219px;
height: 219px;
}
.quest_vice1 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1540px -1085px;
background-position: -663px -1332px;
width: 216px;
height: 177px;
}
.quest_vice2 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -1100px 0px;
background-position: -880px 0px;
width: 219px;
height: 219px;
}
.quest_vice3 {
background-image: url('~assets/images/sprites/spritesmith-main-11.png');
background-position: -880px -1332px;
width: 216px;
height: 177px;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,474 +1,522 @@
.Pet-Unicorn-Red {
.Pet-Turtle-Skeleton {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -82px 0px;
width: 81px;
height: 99px;
}
.Pet-Unicorn-Shade {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -574px -400px;
width: 81px;
height: 99px;
}
.Pet-Unicorn-Skeleton {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -164px 0px;
width: 81px;
height: 99px;
}
.Pet-Unicorn-White {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: 0px -100px;
width: 81px;
height: 99px;
}
.Pet-Unicorn-Zombie {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -82px -100px;
width: 81px;
height: 99px;
}
.Pet-Whale-Base {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -164px -100px;
width: 81px;
height: 99px;
}
.Pet-Whale-CottonCandyBlue {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -246px 0px;
width: 81px;
height: 99px;
}
.Pet-Whale-CottonCandyPink {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -246px -100px;
width: 81px;
height: 99px;
}
.Pet-Whale-Desert {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: 0px -200px;
width: 81px;
height: 99px;
}
.Pet-Whale-Golden {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -82px -200px;
width: 81px;
height: 99px;
}
.Pet-Whale-Red {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -164px -200px;
width: 81px;
height: 99px;
}
.Pet-Whale-Shade {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -246px -200px;
width: 81px;
height: 99px;
}
.Pet-Whale-Skeleton {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -328px 0px;
width: 81px;
height: 99px;
}
.Pet-Whale-White {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -328px -100px;
width: 81px;
height: 99px;
}
.Pet-Whale-Zombie {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -328px -200px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Aquatic {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: 0px -300px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Base {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -82px -300px;
width: 81px;
height: 99px;
}
.Pet-Wolf-CottonCandyBlue {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -164px -300px;
width: 81px;
height: 99px;
}
.Pet-Wolf-CottonCandyPink {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -246px -300px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Cupid {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -328px -300px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Desert {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -410px 0px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Ember {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -410px -100px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Fairy {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -410px -200px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Floral {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -410px -300px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Ghost {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -492px 0px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Glass {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -492px -100px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Glow {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -492px -200px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Golden {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -492px -300px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Holly {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: 0px -400px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Peppermint {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -82px -400px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Rainbow {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -164px -400px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Red {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -246px -400px;
width: 81px;
height: 99px;
}
.Pet-Wolf-RoyalPurple {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -328px -400px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Shade {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -410px -400px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Shimmer {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -492px -400px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Skeleton {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -574px 0px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Spooky {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -574px -100px;
width: 81px;
height: 99px;
}
.Pet-Wolf-StarryNight {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -574px -200px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Thunderstorm {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -574px -300px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Veteran {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: 0px 0px;
width: 81px;
height: 99px;
}
.Pet-Wolf-White {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: 0px -500px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Zombie {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -82px -500px;
width: 81px;
height: 99px;
}
.Pet-Yarn-Base {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -164px -500px;
width: 81px;
height: 99px;
}
.Pet-Yarn-CottonCandyBlue {
.Pet-Turtle-White {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -246px -500px;
width: 81px;
height: 99px;
}
.Pet-Yarn-CottonCandyPink {
.Pet-Turtle-Zombie {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -164px 0px;
width: 81px;
height: 99px;
}
.Pet-Unicorn-Base {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: 0px -100px;
width: 81px;
height: 99px;
}
.Pet-Unicorn-CottonCandyBlue {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -82px -100px;
width: 81px;
height: 99px;
}
.Pet-Unicorn-CottonCandyPink {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -164px -100px;
width: 81px;
height: 99px;
}
.Pet-Unicorn-Desert {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -246px 0px;
width: 81px;
height: 99px;
}
.Pet-Unicorn-Golden {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -246px -100px;
width: 81px;
height: 99px;
}
.Pet-Unicorn-Red {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: 0px -200px;
width: 81px;
height: 99px;
}
.Pet-Unicorn-Shade {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -82px -200px;
width: 81px;
height: 99px;
}
.Pet-Unicorn-Skeleton {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -164px -200px;
width: 81px;
height: 99px;
}
.Pet-Unicorn-White {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -246px -200px;
width: 81px;
height: 99px;
}
.Pet-Unicorn-Zombie {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -328px 0px;
width: 81px;
height: 99px;
}
.Pet-Whale-Base {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -328px -100px;
width: 81px;
height: 99px;
}
.Pet-Whale-CottonCandyBlue {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -328px -200px;
width: 81px;
height: 99px;
}
.Pet-Whale-CottonCandyPink {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: 0px -300px;
width: 81px;
height: 99px;
}
.Pet-Whale-Desert {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -82px -300px;
width: 81px;
height: 99px;
}
.Pet-Whale-Golden {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -164px -300px;
width: 81px;
height: 99px;
}
.Pet-Whale-Red {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -246px -300px;
width: 81px;
height: 99px;
}
.Pet-Whale-Shade {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -328px -300px;
width: 81px;
height: 99px;
}
.Pet-Whale-Skeleton {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -410px 0px;
width: 81px;
height: 99px;
}
.Pet-Whale-White {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -410px -100px;
width: 81px;
height: 99px;
}
.Pet-Whale-Zombie {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -410px -200px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Aquatic {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -410px -300px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Base {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -492px 0px;
width: 81px;
height: 99px;
}
.Pet-Wolf-CottonCandyBlue {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -492px -100px;
width: 81px;
height: 99px;
}
.Pet-Wolf-CottonCandyPink {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -492px -200px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Cupid {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -492px -300px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Desert {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: 0px -400px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Ember {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -82px -400px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Fairy {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -164px -400px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Floral {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -246px -400px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Ghost {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -328px -400px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Glass {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -410px -400px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Glow {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -492px -400px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Golden {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -574px 0px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Holly {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -574px -100px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Peppermint {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -574px -200px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Rainbow {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -574px -300px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Red {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -574px -400px;
width: 81px;
height: 99px;
}
.Pet-Wolf-RoyalPurple {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: 0px -500px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Shade {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -82px -500px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Shimmer {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -164px -500px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Skeleton {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: 0px 0px;
width: 81px;
height: 99px;
}
.Pet-Wolf-Spooky {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -328px -500px;
width: 81px;
height: 99px;
}
.Pet-Yarn-Desert {
.Pet-Wolf-StarryNight {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -410px -500px;
width: 81px;
height: 99px;
}
.Pet-Yarn-Golden {
.Pet-Wolf-Thunderstorm {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -492px -500px;
width: 81px;
height: 99px;
}
.Pet-Yarn-Red {
.Pet-Wolf-Veteran {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -574px -500px;
width: 81px;
height: 99px;
}
.Pet-Yarn-Shade {
.Pet-Wolf-White {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -656px 0px;
width: 81px;
height: 99px;
}
.Pet-Yarn-Skeleton {
.Pet-Wolf-Zombie {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -656px -100px;
width: 81px;
height: 99px;
}
.Pet-Yarn-White {
.Pet-Yarn-Base {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -656px -200px;
width: 81px;
height: 99px;
}
.Pet-Yarn-Zombie {
.Pet-Yarn-CottonCandyBlue {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -656px -300px;
width: 81px;
height: 99px;
}
.Pet-Yarn-CottonCandyPink {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -656px -400px;
width: 81px;
height: 99px;
}
.Pet-Yarn-Desert {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -656px -500px;
width: 81px;
height: 99px;
}
.Pet-Yarn-Golden {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: 0px -600px;
width: 81px;
height: 99px;
}
.Pet-Yarn-Red {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -82px -600px;
width: 81px;
height: 99px;
}
.Pet-Yarn-Shade {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -164px -600px;
width: 81px;
height: 99px;
}
.Pet-Yarn-Skeleton {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -246px -600px;
width: 81px;
height: 99px;
}
.Pet-Yarn-White {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -328px -600px;
width: 81px;
height: 99px;
}
.Pet-Yarn-Zombie {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -410px -600px;
width: 81px;
height: 99px;
}
.Pet_HatchingPotion_Aquatic {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -656px -469px;
background-position: -561px -600px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Base {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -69px -669px;
background-position: 0px -700px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_CottonCandyBlue {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: 0px -600px;
background-position: -630px -600px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_CottonCandyPink {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -69px -600px;
background-position: -738px 0px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Cupid {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -138px -600px;
background-position: -738px -69px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Desert {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -207px -600px;
background-position: -738px -138px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Ember {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -276px -600px;
background-position: -738px -207px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Fairy {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -345px -600px;
background-position: -738px -276px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Floral {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -414px -600px;
background-position: -738px -345px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Ghost {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -483px -600px;
background-position: -738px -414px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Glass {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -552px -600px;
background-position: -738px -483px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Glow {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -621px -600px;
background-position: -738px -552px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Golden {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: 0px -669px;
background-position: -738px -621px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Holly {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -656px -400px;
background-position: -492px -600px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Peppermint {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -138px -669px;
background-position: -69px -700px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Purple {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -207px -669px;
background-position: -138px -700px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Rainbow {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -276px -669px;
background-position: -207px -700px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Red {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -345px -669px;
background-position: -276px -700px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_RoyalPurple {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -414px -669px;
background-position: -345px -700px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Shade {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -483px -669px;
background-position: -414px -700px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Shimmer {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -552px -669px;
background-position: -483px -700px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Skeleton {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -621px -669px;
background-position: -552px -700px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Spooky {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -738px 0px;
background-position: -621px -700px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_StarryNight {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -738px -69px;
background-position: -690px -700px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Thunderstorm {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -738px -138px;
background-position: -807px 0px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_White {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -738px -207px;
background-position: -807px -69px;
width: 68px;
height: 68px;
}
.Pet_HatchingPotion_Zombie {
background-image: url('~assets/images/sprites/spritesmith-main-23.png');
background-position: -738px -276px;
background-position: -807px -138px;
width: 68px;
height: 68px;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 KiB

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 KiB

After

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 KiB

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 115 KiB

+1 -1
View File
@@ -243,7 +243,7 @@
&-control {
&-bg {
background: rgba(255, 217, 160, 0.32) !important;
.small-text { color: $yellow-10 !important; }
.small-text { color: $orange-10 !important; }
&:hover { background: rgba(255, 217, 160, 0.48) !important; }
}
+16 -6
View File
@@ -5,7 +5,8 @@ div
.header
h1.text-center Need more for your Group?
.row
.col-6.offset-3.text-center {{ $t('groupBenefitsDescription') }}
.col-8.offset-2.text-center
h2.sub-text {{ $t('groupBenefitsDescription') }}
.container.benefits
.row
.col-4
@@ -165,23 +166,32 @@ div
}
.header {
margin-bottom: 3em;
margin-top: 4em;
background-color: #4f2a93;
background: #432874;
background: linear-gradient(180deg, #4F2A93 0%, #432874 100%);
color: #fff;
padding: 2em;
height: 356px;
height: 340px;
margin-bottom: 2em;
margin-left: -12px;
margin-right: -12px;
h1 {
font-size: 48px;
line-height: 1.16;
margin-top: 12px;
color: #fff;
}
h2.sub-text {
color: #D5C8FF;
font-size: 24px;
font-weight: 400;
line-height: 1.33;
}
}
.benefits {
margin-top: -12em;
margin-top: -10em;
.box {
height: 416px;
@@ -496,8 +496,9 @@ export default {
});
},
shouldShowAddManager (memberId) {
if (!this.isLeader && !this.isAdmin) return false;
if (memberId === this.group.leader || memberId === this.group.leader._id) return false;
return !(this.group.managers && this.group.managers[memberId]);
return this.groupIsSubscribed && !(this.group.managers && this.group.managers[memberId]);
},
shouldShowRemoveManager (memberId) {
if (!this.isLeader && !this.isAdmin) return false;
@@ -145,7 +145,9 @@ export default {
this.close();
},
onHide () {
this.gift.gems.amount = 0;
// TODO this breaks amazon purchases because when the amazon modal
// is opened this one is closed and the amount reset
// this.gift.gems.amount = 0;
this.gift.message = '';
this.sendingInProgress = false;
},
@@ -38,6 +38,7 @@
.col-6
h2 {{ $t('webhooks') }}
p(v-html="$t('webhooksInfo')")
table.table.table-striped
thead(v-if='user.webhooks.length')
tr
@@ -32,7 +32,7 @@
td
input(type='checkbox', v-model='user.preferences.emailNotifications[notification]',
@change='set("emailNotifications", notification)')
td
td(v-if="onlyEmailsIds.indexOf(notification) === -1")
input(type='checkbox', v-model='user.preferences.pushNotifications[notification]',
@change='set("pushNotifications", notification)')
hr
@@ -46,7 +46,7 @@ export default {
mixins: [notificationsMixin],
data () {
return {
notificationsIds: [
notificationsIds: Object.freeze([
'newPM',
'wonChallenge',
'giftedGems',
@@ -59,7 +59,13 @@ export default {
'importantAnnouncements',
'weeklyRecaps',
'onboarding',
],
]),
// list of email-only notifications
onlyEmailsIds: Object.freeze([
'importantAnnouncements',
'weeklyRecaps',
'onboarding',
]),
};
},
computed: {
@@ -62,7 +62,7 @@ layout-section(:title="$t('equipment')")
import svgHealer from 'assets/svg/healer.svg';
import _filter from 'lodash/filter';
import _sortBy from 'lodash/sortBy';
import _orderBy from 'lodash/orderBy';
import pinUtils from '../../../mixins/pinUtils';
const sortGearTypes = ['sortByType', 'sortByPrice', 'sortByCon', 'sortByPer', 'sortByStr', 'sortByInt'].map(g => ({id: g}));
@@ -71,6 +71,7 @@ layout-section(:title="$t('equipment')")
sortByType: 'type',
sortByPrice: 'value',
sortByCon: 'con',
sortByPer: 'per',
sortByStr: 'str',
sortByInt: 'int',
};
@@ -116,9 +117,33 @@ layout-section(:title="$t('equipment')")
return this.marketGearCategories.filter(c => c.id === this.selectedGroupGearByClass)[0];
},
sortedGearItems () {
let category = _filter(this.marketGearCategories, ['identifier', this.selectedGroupGearByClass]);
let result = this.filterGearItems();
let selectedSortKey = sortGearTypeMap[this.selectedSortGearBy.id];
let sortingByStat = selectedSortKey !== 'type' && selectedSortKey !== 'value';
let order = sortingByStat ? 'desc' : 'asc';
let result = _filter(category[0].items, (gear) => {
// split into unlocked and locked, then apply selected sort
return _orderBy(result, ['locked', selectedSortKey], ['asc', order]);
},
},
methods: {
getClassName (classType) {
if (classType === 'wizard') {
return this.$t('mage');
} else {
return this.$t(classType);
}
},
gearSelected (item) {
if (!item.locked) {
this.$root.$emit('buyModal::showItem', item);
}
},
filterGearItems () {
let category = _filter(this.marketGearCategories, ['identifier', this.selectedGroupGearByClass]);
let items = category[0].items;
return _filter(items, (gear) => {
if (this.hideLocked && gear.locked) {
return false;
}
@@ -136,26 +161,6 @@ layout-section(:title="$t('equipment')")
// hide already owned
return !this.userItems.gear.owned[gear.key];
});
// first all unlocked
// then the selected sort
result = _sortBy(result, [(item) => item.locked, sortGearTypeMap[this.selectedSortGearBy.id]]);
return result;
},
},
methods: {
getClassName (classType) {
if (classType === 'wizard') {
return this.$t('mage');
} else {
return this.$t(classType);
}
},
gearSelected (item) {
if (!item.locked) {
this.$root.$emit('buyModal::showItem', item);
}
},
},
created () {
@@ -7,13 +7,13 @@
.form
h2(v-once) {{ $t('filter') }}
.form-group
.form-check(
checkbox(
v-for="category in filterCategories",
:key="category.key",
:id="`category-${category.key}`",
:checked.sync="viewOptions[category.key].selected",
:text="category.value"
)
.custom-control.custom-checkbox
input.custom-control-input(type="checkbox", v-model="viewOptions[category.key].selected", :id="`category-${category.identifier}`")
label.custom-control-label(v-once, :for="`category-${category.identifier}`") {{ category.value }}
div.form-group.clearfix
h3.float-left(v-once) {{ $t('hidePinned') }}
@@ -290,6 +290,7 @@
import Item from 'client/components/inventory/item';
import CountBadge from 'client/components/ui/countBadge';
import ItemRows from 'client/components/ui/itemRows';
import Checkbox from 'client/components/ui/checkbox';
import toggleSwitch from 'client/components/ui/toggleSwitch';
import Avatar from 'client/components/avatar';
import buyMixin from 'client/mixins/buy';
@@ -326,6 +327,7 @@
CountBadge,
ItemRows,
toggleSwitch,
Checkbox,
Avatar,
},

Some files were not shown because too many files have changed in this diff Show More