mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-10 21:11:52 +00:00
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.
47 lines
1.9 KiB
JSON
47 lines
1.9 KiB
JSON
{
|
|
"schema": 1,
|
|
"name": "Document Properties: custom-validation",
|
|
"steps": [
|
|
{
|
|
"event": {"op": "open"},
|
|
"expect": {"error": null}
|
|
},
|
|
{
|
|
"event": {"op": "click", "label": "Custom"},
|
|
"expect": {"error": null}
|
|
},
|
|
{
|
|
"event": {"op": "type", "field": "Name:", "value": "Title"},
|
|
"expect": {"error": null}
|
|
},
|
|
{
|
|
"event": {"op": "type", "field": "Value:", "value": "Not an accepted property"},
|
|
"expect": {"error": null}
|
|
},
|
|
{
|
|
"event": {"op": "click", "label": "Add"},
|
|
"expect": {"error": "ambiguous or disabled action: Add", "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": "Name:", "value": "Project"},
|
|
"expect": {"error": null}
|
|
},
|
|
{
|
|
"event": {"op": "type", "field": "Value:", "value": "Accepted"},
|
|
"expect": {"error": null}
|
|
},
|
|
{
|
|
"event": {"op": "click", "label": "Add"},
|
|
"expect": {"error": null, "draft": {"custom": {"Untouched": "Keep me", "Project": "Accepted"}}, "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, "document": {"title": "Original", "custom": {"Untouched": "Keep me", "Project": "Accepted"}, "undo": "Change document properties", "custom_count": 2}}
|
|
},
|
|
{
|
|
"event": {"op": "save_reopen"},
|
|
"expect": {"error": null, "reopened": {"title": "Original", "custom": {"Untouched": "Keep me", "Project": "Accepted"}, "pages": 2, "custom_count": 2}}
|
|
}
|
|
]
|
|
}
|