diff --git a/e2e/study.spec.ts b/e2e/study.spec.ts index a2a1bd9..89e8930 100644 --- a/e2e/study.spec.ts +++ b/e2e/study.spec.ts @@ -98,6 +98,10 @@ test.describe('Study page', () => { }); await page.locator('.action-card').locator('button', { hasText: '删除任务' }).click(); + // 处理确认弹窗 + const confirmBtn = page.locator('.el-message-box__btns button:has-text("确定删除")'); + await confirmBtn.waitFor({ timeout: 3000 }); + await confirmBtn.click(); await expect(page.locator('.task-list-item')).toHaveCount(1, { timeout: 5000 }); });