fix: remove navigation wait for AJAX form submission
This commit is contained in:
@@ -36,12 +36,11 @@ test.describe('表单验证测试', () => {
|
||||
subject: '测试主题'
|
||||
});
|
||||
|
||||
const submitPromise = page.waitForNavigation();
|
||||
await contactPage.submitForm();
|
||||
await submitPromise;
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
const currentUrl = page.url();
|
||||
expect(currentUrl).toContain('/contact');
|
||||
const formExists = await page.locator('form').count();
|
||||
expect(formExists).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
test('联系表单 - 必填字段验证', async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user