Skip to content

Commit 244c2a6

Browse files
backup-achievements.test.ts: Also test displaying backup info in the Stats menu.
1 parent 6dea40b commit 244c2a6

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

test/backup-achievements.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,17 @@ test.describe('Backup counter', () => {
136136
await page.click('text="All done!"');
137137
expect(await page.evaluate('Spice.sessionData.backupsThisSession')).toBe(4);
138138
});
139+
140+
test('is nicely displayed in the stats menu', async ({ page }) => {
141+
await setupCookieClickerPage(page, {saveGame: makeSave(7, 3)});
142+
await page.evaluate(() => Game.LoadMod('https://staticvariablejames.github.io/SpicedCookies/Spice.js'));
143+
await page.waitForFunction(() => 'Spiced cookies' in Game.mods);
144+
145+
await page.click('text=Stats');
146+
let specialSectionHandle = await page.locator('text=Special Number');
147+
await page.evaluate(() => Game.CloseNotes());
148+
expect(await specialSectionHandle.screenshot()).toMatchSnapshot('backup-statistics-display.png');
149+
});
139150
});
140151

141152
test.describe('Backup achievements', () => {
44 KB
Loading
46.4 KB
Loading

0 commit comments

Comments
 (0)