test: update playwright script and fix jsdom alert mock

This commit is contained in:
2026-04-11 23:03:04 +08:00
parent 47b7205916
commit 339c740365
2 changed files with 31 additions and 26 deletions

View File

@@ -86,6 +86,10 @@ describe('PageHeader Component', () => {
// =============================================================================
describe('Form Validation Consistency', () => {
beforeEach(() => {
vi.spyOn(window, 'alert').mockImplementation(() => {})
})
it('validates required fields', async () => {
const user = userEvent.setup()
const handleSubmit = vi.fn()