Files
pdfcraft/tests/interactions/document-properties/commit-save-undo.json
T
Perchenko Anton d47adeff89 M4: bind property drafts with edit-session and replay UI scenarios (#4594)
Binds Properties dialog drafts to the vendored edit-session crate (byte-identical to PerchAnton/edit-session@033f7c3a, ledger in vendor/README) and adds replayable UI scenarios. Includes a merge of main and a test covering the clean Properties inspection-tab live refresh.
2026-11-10 20:22:58 +01:00

63 lines
3.3 KiB
JSON

{
"schema": 1,
"name": "Document Properties: commit-save-undo",
"steps": [
{
"event": {"op": "open"},
"expect": {"error": null, "properties_open": true, "document": {"title": "Original", "author": "Original author", "custom": {"Untouched": "Keep me"}, "display_title": false, "dirty": false, "undo": null, "redo": null, "pages": 2, "custom_count": 1}, "original_bytes": true}
},
{
"event": {"op": "type", "field": "Title", "value": "Preview 1"},
"expect": {"error": null, "draft": {"title": "Preview 1"}, "document": {"title": "Original", "author": "Original author", "custom": {"Untouched": "Keep me"}, "display_title": false, "dirty": false, "undo": null, "redo": null, "pages": 2, "custom_count": 1}, "original_bytes": true}
},
{
"event": {"op": "type", "field": "Title", "value": "Published title"},
"expect": {"error": null}
},
{
"event": {"op": "type", "field": "Author", "value": "Review team"},
"expect": {"error": null}
},
{
"event": {"op": "click", "label": "Custom"},
"expect": {"error": null}
},
{
"event": {"op": "type", "field": "Name:", "value": "Project"},
"expect": {"error": null}
},
{
"event": {"op": "type", "field": "Value:", "value": "PdfCraft"},
"expect": {"error": null}
},
{
"event": {"op": "click", "label": "Add"},
"expect": {"error": null, "draft": {"custom": {"Project": "PdfCraft", "Untouched": "Keep me"}}, "document": {"title": "Original", "author": "Original author", "custom": {"Untouched": "Keep me"}, "display_title": false, "dirty": false, "undo": null, "redo": null, "pages": 2, "custom_count": 1}, "original_bytes": true}
},
{
"event": {"op": "click", "label": "Initial View"},
"expect": {"error": null}
},
{
"event": {"op": "click", "label": "Document Title"},
"expect": {"error": null, "draft": {"display_title": true}, "document": {"title": "Original", "author": "Original author", "custom": {"Untouched": "Keep me"}, "display_title": false, "dirty": false, "undo": null, "redo": null, "pages": 2, "custom_count": 1}, "original_bytes": true}
},
{
"event": {"op": "click", "label": "OK"},
"expect": {"error": null, "properties_open": false, "draft": null, "document": {"title": "Published title", "author": "Review team", "custom": {"Project": "PdfCraft", "Untouched": "Keep me"}, "display_title": true, "dirty": true, "undo": "Change document properties", "redo": null, "custom_count": 2}}
},
{
"event": {"op": "undo"},
"expect": {"error": null, "document": {"title": "Original", "author": "Original author", "custom": {"Untouched": "Keep me"}, "display_title": false, "undo": null, "redo": "Change document properties", "custom_count": 1}}
},
{
"event": {"op": "redo"},
"expect": {"error": null, "document": {"title": "Published title", "author": "Review team", "display_title": true, "undo": "Change document properties", "redo": null}}
},
{
"event": {"op": "save_reopen"},
"expect": {"error": null, "reopened": {"title": "Published title", "author": "Review team", "custom": {"Project": "PdfCraft", "Untouched": "Keep me"}, "display_title": true, "dirty": false, "pages": 2, "undo": null, "redo": null, "custom_count": 2}}
}
]
}