feat: add mdtodo task editing flow
This commit is contained in:
@@ -40,6 +40,28 @@ test.describe("project management pages", () => {
|
||||
await page.getByTestId("mdtodo-source-reindex-dialog").click();
|
||||
await expect(page.getByTestId("mdtodo-source-message")).toContainText("Reindex 2 files / 4 tasks");
|
||||
await page.getByLabel("关闭配置").click();
|
||||
await page.getByTestId("mdtodo-edit-title").fill("实现项目根导航 - edited");
|
||||
await page.getByTestId("mdtodo-edit-status").selectOption("in_progress");
|
||||
await page.getByTestId("mdtodo-edit-save").click();
|
||||
await expect(page.getByTestId("mdtodo-task-mutation-message")).toContainText("任务已保存");
|
||||
await expect(page.getByTestId("mdtodo-task-detail")).toContainText("实现项目根导航 - edited");
|
||||
await expect(page.locator('[data-task-id="R1"]')).toContainText("进行中");
|
||||
await page.getByTestId("mdtodo-edit-body").fill("Body saved from Playwright.");
|
||||
await page.getByTestId("mdtodo-edit-body-save").click();
|
||||
await expect(page.getByTestId("mdtodo-task-mutation-message")).toContainText("正文已保存");
|
||||
await page.getByTestId("mdtodo-new-title").fill("Playwright child");
|
||||
await page.getByTestId("mdtodo-new-body").fill("Child from E2E.");
|
||||
await page.getByTestId("mdtodo-add-subtask").click();
|
||||
await expect(page.getByTestId("mdtodo-task-mutation-message")).toContainText("任务已创建");
|
||||
await expect(page.locator('[data-task-id="R1.2"]')).toContainText("Playwright child");
|
||||
await page.getByTestId("mdtodo-new-title").fill("Playwright sibling");
|
||||
await page.getByTestId("mdtodo-continue-task").click();
|
||||
await expect(page.locator('[data-task-id="R1.3"]')).toContainText("Playwright sibling");
|
||||
await page.getByTestId("mdtodo-delete-task").click();
|
||||
await expect(page.getByTestId("mdtodo-task-mutation-message")).toContainText("再次点击确认删除");
|
||||
await page.getByTestId("mdtodo-delete-task").click();
|
||||
await expect(page.getByTestId("mdtodo-task-mutation-message")).toContainText("任务已删除");
|
||||
await expect(page.locator('[data-task-id="R1.3"]')).toHaveCount(0);
|
||||
await expect(page.getByTestId("mdtodo-workbench-link-summary")).toContainText("ses_project_seed");
|
||||
await expect(page.getByTestId("mdtodo-workbench-launch")).toBeEnabled();
|
||||
await expect(page.locator("iframe")).toHaveCount(0);
|
||||
|
||||
Reference in New Issue
Block a user