diff --git a/test/content/hatching-potions.test.js b/test/content/hatching-potions.test.js index 1d1fd575a5..5d1d37bf65 100644 --- a/test/content/hatching-potions.test.js +++ b/test/content/hatching-potions.test.js @@ -5,7 +5,7 @@ import { expectValidTranslationString, } from '../helpers/content.helper'; -import { all } from '../../website/common/script/content/hatching-potions'; +import hatchingPotions from '../../website/common/script/content/hatching-potions'; describe('hatchingPotions', () => { let clock; @@ -25,7 +25,7 @@ describe('hatchingPotions', () => { potionTypes.forEach(potionType => { describe(potionType, () => { it('contains basic information about each potion', () => { - each(all, (potion, key) => { + each(hatchingPotions.all, (potion, key) => { expectValidTranslationString(potion.text); expectValidTranslationString(potion.notes); expect(potion.canBuy).to.be.a('function'); @@ -35,4 +35,20 @@ describe('hatchingPotions', () => { }); }); }); + + it('does not contain unreleased potions', () => { + clock = sinon.useFakeTimers(new Date('2024-05-20')); + const premiumPotions = hatchingPotions.premium; + expect(premiumPotions.Koi).to.not.exist; + }); + + it('Releases potions when appropriate without needing restarting', () => { + clock = sinon.useFakeTimers(new Date('2024-05-20')); + const mayPotions = hatchingPotions.premium; + clock.restore(); + clock = sinon.useFakeTimers(new Date('2024-06-20')); + const junePotions = hatchingPotions.premium; + expect(junePotions.Koi).to.exist; + expect(Object.keys(mayPotions).length).to.equal(Object.keys(junePotions).length - 1); + }); }); diff --git a/test/content/schedule.test.js b/test/content/schedule.test.js index 09d4ebfd6f..139fbe8bf2 100644 --- a/test/content/schedule.test.js +++ b/test/content/schedule.test.js @@ -7,7 +7,7 @@ import { import QUEST_PETS from '../../website/common/script/content/quests/pets'; import QUEST_HATCHINGPOTIONS from '../../website/common/script/content/quests/potions'; import QUEST_BUNDLES from '../../website/common/script/content/bundles'; -import { premium } from '../../website/common/script/content/hatching-potions'; +import potions from '../../website/common/script/content/hatching-potions'; import SPELLS from '../../website/common/script/content/spells'; import QUEST_SEASONAL from '../../website/common/script/content/quests/seasonal'; @@ -167,7 +167,7 @@ describe('Content Schedule', () => { }); it('premium hatching potions', () => { - const potionKeys = Object.keys(premium); + const potionKeys = Object.keys(potions.premium); Object.keys(MONTHLY_SCHEDULE).forEach(key => { const monthlyPotions = MONTHLY_SCHEDULE[key][21].find(item => item.type === 'premiumHatchingPotions'); for (const potion of monthlyPotions.items) { diff --git a/website/common/locales/en/backgrounds.json b/website/common/locales/en/backgrounds.json index 30d85d35e6..5e986b75f0 100644 --- a/website/common/locales/en/backgrounds.json +++ b/website/common/locales/en/backgrounds.json @@ -987,14 +987,6 @@ "backgroundRiverBottomText": "River Bottom", "backgroundRiverBottomNotes": "Explore a River Bottom.", - "backgrounds072024": "SET 122: Released July 2024", - "backgroundRiverBottomText": "River Bottom", - "backgroundRiverBottomNotes": "Explore a River Bottom.", - - "backgrounds072024": "SET 122: Released July 2024", - "backgroundRiverBottomText": "River Bottom", - "backgroundRiverBottomNotes": "Explore a River Bottom.", - "timeTravelBackgrounds": "Steampunk Backgrounds", "backgroundAirshipText": "Airship", "backgroundAirshipNotes": "Become a sky sailor on board your very own Airship.",