fix: check for success message text after form submission
This commit is contained in:
@@ -39,8 +39,8 @@ test.describe('表单验证测试', () => {
|
|||||||
await contactPage.submitForm();
|
await contactPage.submitForm();
|
||||||
await page.waitForTimeout(3000);
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
const formExists = await page.locator('form').count();
|
const successMessage = await page.locator('text=消息已发送').count();
|
||||||
expect(formExists).toBeGreaterThan(0);
|
expect(successMessage).toBeGreaterThan(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('联系表单 - 必填字段验证', async ({ page }) => {
|
test('联系表单 - 必填字段验证', async ({ page }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user