refactor: remove manual refresh and search controls
ci / gitleaks (push) Successful in 8s
ci / docker (push) Successful in 7m17s

This commit is contained in:
2026-09-19 21:15:23 +08:00
parent 0cf1c49094
commit 4973d56a64
29 changed files with 244 additions and 860 deletions
+9 -8
View File
@@ -376,7 +376,7 @@ def test_folder_and_list_lifecycle(client):
assert client.delete(f"/api/v1/folders/{folder['id']}").status_code == 204
def test_task_search_subtasks_and_recycle_bin(client):
def test_task_subtasks_and_recycle_bin(client):
client = initialized_client(client)
inbox = client.get("/api/v1/lists").json()[0]
parent = client.post(
@@ -392,10 +392,10 @@ def test_task_search_subtasks_and_recycle_bin(client):
assert detail.status_code == 200
assert "tags" not in detail.json()
assert len(detail.json()["subtasks"]) == 1
listed = client.get("/api/v1/tasks", params={"q": "咖啡"}).json()["items"]
assert len(listed) == 1
assert "tags" not in listed[0]
assert listed[0]["subtasks"][0]["title"] == "比较价格"
listed = client.get("/api/v1/tasks").json()["items"]
parent_row = next(row for row in listed if row["id"] == parent["id"])
assert "tags" not in parent_row
assert parent_row["subtasks"][0]["title"] == "比较价格"
assert client.delete(f"/api/v1/tasks/{parent['id']}").status_code == 204
trash = client.get("/api/v1/trash").json()["items"]
@@ -470,7 +470,7 @@ def test_inbox_is_protected_and_deleted_collections_are_hidden(client):
).json()
assert client.delete(f"/api/v1/lists/{task_list['id']}").status_code == 204
assert all(row["id"] != task_list["id"] for row in client.get("/api/v1/lists").json())
assert client.get("/api/v1/tasks", params={"q": "保留任务"}).json()["items"] == []
assert all(row["id"] != task["id"] for row in client.get("/api/v1/tasks").json()["items"])
assert client.get(f"/api/v1/tasks/{task['id']}").status_code == 404
archived = client.get("/api/v1/lists", params={"archived": True})
assert archived.status_code == 200
@@ -539,8 +539,9 @@ def test_restore_replace_recovers_habits_and_task_links_without_tags(client):
habits = client.get("/api/v1/habits").json()
assert "俯卧撑" in [row["name"] for row in habits]
assert "深蹲" in [row["name"] for row in habits]
listed = client.get("/api/v1/tasks", params={"q": "备份任务"}).json()["items"]
assert "tags" not in listed[0]
listed = client.get("/api/v1/tasks").json()["items"]
backup_row = next(row for row in listed if row["title"] == "备份任务")
assert "tags" not in backup_row
def test_trash_cursor_paginates_more_than_fifty_items(client):