test: opravy Playwright testů
CI / Generate TypeScript types (push) Successful in 9s
CI / Generate TypeScript types (pull_request) Successful in 10s
CI / Server unit tests (push) Successful in 19s
CI / Build server (push) Successful in 24s
CI / Server unit tests (pull_request) Successful in 22s
CI / Build client (push) Successful in 32s
CI / Build server (pull_request) Successful in 25s
CI / Build client (pull_request) Successful in 33s
CI / Playwright E2E tests (push) Failing after 2m3s
CI / Build and push Docker image (push) Has been skipped
CI / Notify (push) Successful in 3s
CI / Playwright E2E tests (pull_request) Failing after 2m19s
CI / Build and push Docker image (pull_request) Has been skipped
CI / Notify (pull_request) Has been skipped

This commit is contained in:
2026-04-29 20:29:25 +02:00
parent f400d1c5f2
commit e9c570b3d5
2 changed files with 13 additions and 6 deletions
+7 -6
View File
@@ -23,18 +23,19 @@ test('Nastavení ukládají číslo účtu a jméno do localStorage', async ({ p
// Modal musí být viditelný
await expect(page.locator('.modal-title')).toContainText('Nastavení', { timeout: 5_000 });
// Změníme číslo účtu
// Změníme číslo účtu pressSequentially zajistí spuštění React onChange na každý znak
const accountInput = page.getByPlaceholder('123456-1234567890/1234');
await accountInput.clear();
await accountInput.fill('1234567890/5500');
await accountInput.click({ clickCount: 3 });
await accountInput.pressSequentially('1234567890/5500');
// Změníme jméno
const nameInput = page.getByPlaceholder('Jan Novák');
await nameInput.clear();
await nameInput.fill('Nové Jméno');
await nameInput.click({ clickCount: 3 });
await nameInput.pressSequentially('Nové Jméno');
// Uložíme
// Uložíme a počkáme na zavření modalu
await page.locator('.modal-footer button', { hasText: 'Uložit' }).click();
await expect(page.locator('.modal')).not.toBeVisible({ timeout: 5_000 });
// Ověříme v localStorage
const bankAccount = await page.evaluate(() => localStorage.getItem('bank_account_number'));