Halte die Vorgangsleiste sichtbar und nimm die ueberfluessigen Kapitelworte weg, damit Datum, Bezuege, Titel und mehrere Belege direkt gesetzt werden koennen.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
cbd45a8997
commit
deb5d662fe
13 files changed
+423
-101
No files matched your search
@@ -0,0 +1,47 @@
|
||||
"""An entry title can be renamed without touching the document body."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from tests.support import Actor, document, register
|
||||
|
||||
|
||||
def test_element_title_can_be_renamed(client, db):
|
||||
ada = Actor(client, "ada-titel@example.test", "Ada Titel")
|
||||
register(db, ada.email, ada.name)
|
||||
ada.login()
|
||||
matter = ada.request("POST", "/api/v1/matters", json={"title": "Vorgang"}, status=201)
|
||||
ada.request(
|
||||
"POST",
|
||||
"/api/v1/notes",
|
||||
json={
|
||||
"title": "Alter Titel",
|
||||
"document": document("Text"),
|
||||
"context": {"kind": "matter", "id": matter["id"]},
|
||||
},
|
||||
status=201,
|
||||
)
|
||||
detail = ada.request("GET", f"/api/v1/matters/{matter['id']}")
|
||||
element = detail["bindings"][0]["element"]
|
||||
renamed = ada.request(
|
||||
"PATCH",
|
||||
f"/api/v1/elements/{element['id']}/title",
|
||||
json={
|
||||
"expected_version": element["version"],
|
||||
"title": "Neuer Titel",
|
||||
"context": {"kind": "matter", "id": matter["id"]},
|
||||
},
|
||||
)
|
||||
assert renamed["title"] == "Neuer Titel"
|
||||
assert renamed["version"] == element["version"] + 1
|
||||
shown = ada.request("GET", f"/api/v1/matters/{matter['id']}")
|
||||
assert shown["bindings"][0]["element"]["title"] == "Neuer Titel"
|
||||
ada.request(
|
||||
"PATCH",
|
||||
f"/api/v1/elements/{element['id']}/title",
|
||||
json={
|
||||
"expected_version": renamed["version"],
|
||||
"title": " ",
|
||||
"context": {"kind": "matter", "id": matter["id"]},
|
||||
},
|
||||
status=422,
|
||||
)
|
||||
Reference in new issue
Block a user