Add HTML5 object privacy context
This commit is contained in:
@@ -256,6 +256,7 @@ def test_html5_object_context_fragment(tmp_path: Path):
|
||||
assert indexed.status_code == 200
|
||||
snapshot = client.get(f"/projects/{project_id}/snapshot/export").json()
|
||||
handler = next(node for node in snapshot["nodes"] if node["name"] == "ПровестиКоманда")
|
||||
attribute = next(node for node in snapshot["nodes"] if node["name"] == "Контрагент")
|
||||
signal = client.post(
|
||||
f"/projects/{project_id}/runtime/signals",
|
||||
json={
|
||||
@@ -279,6 +280,15 @@ def test_html5_object_context_fragment(tmp_path: Path):
|
||||
},
|
||||
)
|
||||
assert knowledge.status_code == 200
|
||||
marker = client.post(
|
||||
f"/projects/{project_id}/privacy/markers",
|
||||
json={
|
||||
"target_id": attribute["lineage_id"],
|
||||
"classification": "PERSONAL_DATA",
|
||||
"reason": "Контрагент содержит персональные данные",
|
||||
},
|
||||
)
|
||||
assert marker.status_code == 200
|
||||
|
||||
editor = client.get(f"/html5/projects/{project_id}/editor")
|
||||
assert editor.status_code == 200
|
||||
@@ -301,6 +311,8 @@ def test_html5_object_context_fragment(tmp_path: Path):
|
||||
assert "125.0 ms" in context.text
|
||||
assert "Правила проведения HTML5" in context.text
|
||||
assert "Контекст проведения заказа" in context.text
|
||||
assert "PERSONAL_DATA" in context.text
|
||||
assert "Контрагент содержит персональные данные" in context.text
|
||||
assert "Роль.Менеджер" in context.text
|
||||
assert "read, write, post" in context.text or "post, read, write" in context.text
|
||||
assert "<html" not in context.text
|
||||
|
||||
Reference in New Issue
Block a user