[verified] move trash restore into action menu
ci / gitleaks (push) Successful in 1m9s
ci / docker (push) Successful in 5m49s

This commit is contained in:
2026-09-21 10:22:46 +08:00
parent 927e15cf17
commit 7f8b435164
5 changed files with 39 additions and 16 deletions
+3 -2
View File
@@ -106,13 +106,14 @@ test('task rows use the body for detail and Trash keeps distinct actions', async
const restoreRow = await taskRow(page, restoreTitle)
const purgeRow = await taskRow(page, purgeTitle)
for (const deletedRow of [restoreRow, purgeRow]) {
await expect(deletedRow.getByRole('button', { name: '恢复' })).toBeVisible()
await expect(deletedRow.getByRole('button', { name: '恢复' })).toHaveCount(0)
await expect(deletedRow.getByRole('button', { name: '打开任务操作' })).toBeVisible()
await expect(deletedRow.locator('.task-main')).not.toHaveAttribute('role')
await expect(deletedRow.locator('.task-main')).not.toHaveAttribute('tabindex')
expect(await deletedRow.locator('.task-detail-trigger, .task-check').count()).toBe(0)
}
await restoreRow.getByRole('button', { name: '恢复' }).click()
await restoreRow.getByRole('button', { name: '打开任务操作' }).click()
await page.getByRole('menuitem', { name: '恢复', exact: true }).click()
await expect(restoreRow).toHaveCount(0)
await purgeRow.getByRole('button', { name: '打开任务操作' }).click()
await page.getByRole('menuitem', { name: '永久删除' }).click()