From 97a352f9f5755fd2977b43cae91ef0168cfb35a8 Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Mon, 21 Sep 2026 17:07:08 +0700 Subject: [PATCH] test(e2e): a rung with no record describes the bot, not a missing record --- web/e2e/bot-game.spec.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web/e2e/bot-game.spec.js b/web/e2e/bot-game.spec.js index 62db47d..74f74d4 100644 --- a/web/e2e/bot-game.spec.js +++ b/web/e2e/bot-game.spec.js @@ -252,13 +252,14 @@ test.describe('playing the bot', () => { await page.getByRole('button', { name: 'Về trang chủ' }).click(); - // The record shows against Trung bình, and only against it. + // The record shows against Trung bình, and only against it: a rung + // with no record describes the bot instead of saying there is none. const medium = page.getByRole('radio', { name: /Trung bình/ }); await expect(medium).toBeVisible(); - await expect(page.locator('label', { has: medium })).not.toContainText('Chưa có'); + await expect(page.locator('label', { has: medium })).toContainText('Kỷ lục'); await expect( page.locator('label', { has: page.getByRole('radio', { name: /^Dễ/ }) }) - ).toContainText('Chưa có'); + ).not.toContainText('Kỷ lục'); }); test('the attribution footer credits the dictionary source', async ({ page }) => {