mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
don’t return event data anymore for items
This commit is contained in:
@@ -35,6 +35,14 @@ describe('shops', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('does not return items with event data', async () => {
|
||||
shopCategories.forEach(category => {
|
||||
category.items.forEach(item => {
|
||||
expect(item.event).to.not.exist;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('shows relevant non class gear in special category', () => {
|
||||
const contributor = generateUser({
|
||||
contributor: {
|
||||
@@ -163,6 +171,14 @@ describe('shops', () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it('does not return items with event data', async () => {
|
||||
shopCategories.forEach(category => {
|
||||
category.items.forEach(item => {
|
||||
expect(item.event).to.not.exist;
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('timeTravelers', () => {
|
||||
@@ -189,10 +205,19 @@ describe('shops', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('does not return items with event data', async () => {
|
||||
shopCategories.forEach(category => {
|
||||
category.items.forEach(item => {
|
||||
expect(item.event).to.not.exist;
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('seasonalShop', () => {
|
||||
const shopCategories = shared.shops.getSeasonalShopCategories(user);
|
||||
const today = new Date();
|
||||
|
||||
it('does not contain an empty category', () => {
|
||||
_.each(shopCategories, category => {
|
||||
@@ -206,6 +231,14 @@ describe('shops', () => {
|
||||
expect(identifiers.length).to.eql(shopCategories.length);
|
||||
});
|
||||
|
||||
it('does not return items with event data', async () => {
|
||||
shopCategories.forEach(category => {
|
||||
category.items.forEach(item => {
|
||||
expect(item.event).to.not.exist;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('items contain required fields', () => {
|
||||
_.each(shopCategories, category => {
|
||||
_.each(category.items, item => {
|
||||
@@ -215,5 +248,15 @@ describe('shops', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('items have a valid end date', () => {
|
||||
shopCategories.forEach(category => {
|
||||
category.items.forEach(item => {
|
||||
expect(item.end).to.be.a('date');
|
||||
expect(item.end).to.be.greaterThan(today);
|
||||
console.log(item.end)
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -53,7 +53,6 @@ function getDefaultGearProps (item, language) {
|
||||
per: item.per,
|
||||
con: item.con,
|
||||
klass: item.klass,
|
||||
event: item.event,
|
||||
set: item.set,
|
||||
};
|
||||
}
|
||||
@@ -106,7 +105,6 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
||||
purchaseType: 'hatchingPotions',
|
||||
path: item.wacky ? `wackyHatchingPotions.${item.key}` : `premiumHatchingPotions.${item.key}`,
|
||||
pinType: 'premiumHatchingPotion',
|
||||
event: item.event,
|
||||
};
|
||||
break;
|
||||
case 'food':
|
||||
@@ -135,7 +133,6 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
||||
purchaseType: 'bundles',
|
||||
path: `bundles.${item.key}`,
|
||||
pinType: 'bundles',
|
||||
event: item.event,
|
||||
};
|
||||
break;
|
||||
case 'quests': // eslint-disable-line no-case-declarations
|
||||
@@ -147,7 +144,6 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
||||
notes: item.notes(language),
|
||||
addlNotes: item.addlNotes ? item.addlNotes(language) : null,
|
||||
group: item.group,
|
||||
event: item.event,
|
||||
value: item.goldValue ? item.goldValue : item.value,
|
||||
locked,
|
||||
previous: content.quests[item.previous]
|
||||
@@ -193,7 +189,6 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
||||
class: `inventory_special_${item.key}`,
|
||||
path: `spells.special.${item.key}`,
|
||||
pinType: 'seasonalSpell',
|
||||
event: item.event,
|
||||
};
|
||||
break;
|
||||
case 'debuffPotion':
|
||||
|
||||
Reference in New Issue
Block a user