diff --git a/test/api/v3/integration/user/POST-user_buy.test.js b/test/api/v3/integration/user/POST-user_buy.test.js index 7e07f475a2..cd97ec37fe 100644 --- a/test/api/v3/integration/user/POST-user_buy.test.js +++ b/test/api/v3/integration/user/POST-user_buy.test.js @@ -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); }); }); diff --git a/test/api/v3/integration/user/POST-user_buy_gear.test.js b/test/api/v3/integration/user/POST-user_buy_gear.test.js index f577263d4a..5f07886ce4 100644 --- a/test/api/v3/integration/user/POST-user_buy_gear.test.js +++ b/test/api/v3/integration/user/POST-user_buy_gear.test.js @@ -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); }); }); diff --git a/website/common/script/libs/shops.js b/website/common/script/libs/shops.js index 0f055794ff..6a73c4c0f3 100644 --- a/website/common/script/libs/shops.js +++ b/website/common/script/libs/shops.js @@ -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); } diff --git a/website/server/models/user/hooks.js b/website/server/models/user/hooks.js index 8fa848352d..9dbd664720 100644 --- a/website/server/models/user/hooks.js +++ b/website/server/models/user/hooks.js @@ -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 diff --git a/website/views/options/inventory/seasonal-shop.jade b/website/views/options/inventory/seasonal-shop.jade index f6209ddf7b..322610ca11 100644 --- a/website/views/options/inventory/seasonal-shop.jade +++ b/website/views/options/inventory/seasonal-shop.jade @@ -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')