Open
Description
Follow-up from PR #1218
(reference comment: #1218 (comment)).
Implement a test that:
- Creates a file via the JupyterLab API.
- Moves it to Trash using the API (e.g. PATCH /api/contents/ with {"trash": true}).
- Verifies the file appears in the Trash folder.
Sample code:
import requests
def test_jlab_trash_feature():
base = "http://localhost:8888"
fname = "deleteme.txt"
# Create file
requests.put(f"{base}/api/contents/{fname}", json={"type": "file", "content": "test", "format": "text"})
# Move to trash
r = requests.patch(f"{base}/api/contents/{fname}", json={"trash": True})
assert r.status_code == 200
# List Trash (may require custom API or check .trash folder)
# r = requests.get(f"{base}/api/contents/.trash")
# assert fname in [f["name"] for f in r.json().get("content",[])]
Owner: @jiridanek
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status