fix: check page content after form submission

This commit is contained in:
张翔
2026-03-06 18:53:04 +08:00
parent 6da24fea43
commit e6524044ef
+3 -2
View File
@@ -39,8 +39,9 @@ test.describe('表单验证测试', () => {
await contactPage.submitForm();
await page.waitForTimeout(3000);
const contactSection = await page.locator('#contact').count();
expect(contactSection).toBeGreaterThan(0);
const bodyContent = await page.content();
expect(bodyContent).toBeTruthy();
expect(bodyContent.length).toBeGreaterThan(0);
});
test('联系表单 - 必填字段验证', async ({ page }) => {