fix: check for form validation error instead of API error
This commit is contained in:
@@ -112,7 +112,7 @@ test.describe('表单验证测试', () => {
|
|||||||
await contactPage.submitForm();
|
await contactPage.submitForm();
|
||||||
|
|
||||||
await page.waitForTimeout(3000);
|
await page.waitForTimeout(3000);
|
||||||
const pageContent = await page.content();
|
const errorMessage = await contactPage.getFormErrorMessage();
|
||||||
expect(pageContent).toContain('提交失败');
|
expect(errorMessage).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user