From fe69964ef5ff0b9c2a7d9a44c2e42389c368a0b9 Mon Sep 17 00:00:00 2001 From: Glary-Bot Date: Mon, 20 Apr 2026 03:36:17 +0000 Subject: [PATCH] =?UTF-8?q?test:=20add=20credits=E2=86=92pay=20reverse=20s?= =?UTF-8?q?ync=20test=20and=20harden=20max-boundary=20assertion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add credits-driven sync test covering the creditsModel setter reverse path. Harden max-boundary test with blur + credits clamp assertion to catch pay/credits desync bugs. --- .../tests/dialogs/topUpCreditsDialog.spec.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/browser_tests/tests/dialogs/topUpCreditsDialog.spec.ts b/browser_tests/tests/dialogs/topUpCreditsDialog.spec.ts index 59bbf129cd..9b1356ea9a 100644 --- a/browser_tests/tests/dialogs/topUpCreditsDialog.spec.ts +++ b/browser_tests/tests/dialogs/topUpCreditsDialog.spec.ts @@ -130,12 +130,24 @@ test.describe('Top Up Credits Dialog', { tag: '@ui' }, () => { await expect(dialog.creditsInput).toHaveValue(expectedCredits(500)) }) + test('typing in credits stepper updates pay', async () => { + const credits = String(50 * CREDITS_PER_USD) + + await dialog.creditsInput.fill('') + await dialog.creditsInput.pressSequentially(credits) + await dialog.creditsInput.blur() + + await expect(dialog.payInput).toHaveValue('50') + }) + test('max ceiling warning appears when exceeding max', async () => { await dialog.payInput.fill('') await dialog.payInput.pressSequentially('99999') + await dialog.payInput.blur() await expect(dialog.ceilingWarning).toBeVisible() await expect(dialog.payInput).toHaveValue('10,000') + await expect(dialog.creditsInput).toHaveValue(expectedCredits(10_000)) }) test('min amount warning appears for values below minimum', async () => {