fix(shops): hardcode NYE card

This commit is contained in:
Sabe Jones 2016-12-30 23:08:01 +00:00
parent 969607cd3b
commit c5c2da75bf
5 changed files with 15 additions and 43 deletions

View file

@ -62,15 +62,6 @@ describe('POST /user/buy/:key', () => {
await user.post(`/user/buy/${key}`);
await user.sync();
expect(user.items.gear.owned).to.eql({
armor_warrior_1: true,
eyewear_special_blackTopFrame: true,
eyewear_special_blueTopFrame: true,
eyewear_special_greenTopFrame: true,
eyewear_special_pinkTopFrame: true,
eyewear_special_redTopFrame: true,
eyewear_special_whiteTopFrame: true,
eyewear_special_yellowTopFrame: true,
});
expect(user.items.gear.owned.armor_warrior_1).to.eql(true);
});
});

View file

@ -31,15 +31,6 @@ describe('POST /user/buy-gear/:key', () => {
await user.post(`/user/buy-gear/${key}`);
await user.sync();
expect(user.items.gear.owned).to.eql({
armor_warrior_1: true,
eyewear_special_blackTopFrame: true,
eyewear_special_blueTopFrame: true,
eyewear_special_greenTopFrame: true,
eyewear_special_pinkTopFrame: true,
eyewear_special_redTopFrame: true,
eyewear_special_whiteTopFrame: true,
eyewear_special_yellowTopFrame: true,
});
expect(user.items.gear.owned.armor_warrior_1).to.eql(true);
});
});

View file

@ -236,10 +236,6 @@ shops.getSeasonalShopCategories = function getSeasonalShopCategories (user, lang
'snowball',
];
const AVAILABLE_CARDS = [
'nye',
];
const AVAILABLE_QUESTS = [
'evilsanta',
'evilsanta2',
@ -253,11 +249,7 @@ shops.getSeasonalShopCategories = function getSeasonalShopCategories (user, lang
return _.indexOf(AVAILABLE_SPELLS, key) !== -1;
});
let cards = pickBy(content.cardTypes, (card, key) => {
return _.indexOf(AVAILABLE_CARDS, key) !== -1;
});
if (_.keys(spells).length > 0 || _.keys(cards).length > 0) {
if (_.keys(spells).length > 0) {
let category = {
identifier: 'spells',
text: i18n.t('seasonalItems', language),
@ -275,19 +267,7 @@ shops.getSeasonalShopCategories = function getSeasonalShopCategories (user, lang
purchaseType: 'spells',
class: `inventory_special_${key}`,
};
}).concat(_.map(cards, (card, key) => {
return {
key,
text: content.spells.special[key].text(language),
notes: content.spells.special[key].notes(language),
value: content.spells.special[key].value,
type: 'card',
currency: 'gold',
locked: false,
purchaseType: 'spells',
class: `inventory_special_${key}`,
};
}));
});
categories.push(category);
}

View file

@ -79,7 +79,7 @@ function _setUpNewUser (user) {
user._ABtest = '';
user.migration = '20161230_nye_hats.js';
user.items.gear.owned.head_special_nye = false;
user.items.gear.owned.head_special_nye = false; // eslint-disable-line camelcase
// A/B test 2016-12-21: Should we deliver notifications for upcoming incentives on days when users don't receive rewards?
if (Math.random() < 0.5) {
user._ABtests.checkInModals = '20161221_noCheckInPreviews'; // no 'preview' check-in modals

View file

@ -19,3 +19,13 @@
div
| {{item.value}}
span(ng-class="{ 'shop_gold': item.currency === 'gold', 'Pet_Currency_Gem1x inline-gems': item.currency === 'gems'}")
div(ng-if='category.identifier === "spells"')
button.customize-option(class='inventory_special_nye',
popover='{{::Content.spells.special.nye.notes()}}',
popover-title='{{::Content.spells.special.nye.text()}}',
popover-trigger='mouseenter', popover-placement='right',
popover-append-to-body='true',
ng-click='castStart(Content.spells.special.nye)')
p
| {{Content.spells.special.nye.value}}
span(class='shop_gold')