← Back to Craft
AgentCraft
Editor lifecycle testing
Checks editing, undo, paste, saving and reload as one complete document lifecycle.
editor-verification
See how it helpsWhen is it useful?
Use when editor changes must preserve content and selection across interruptions.
What does it help you do?
- Validates schema and selection after structural operations.
- Checks undo equivalence and sanitization of hostile pasted content.
- Exercises reordered saves, network loss and reload consistency.
Try asking this
Test paste, edit, undo and reload while the first save response arrives after the second. After the delayed response, reload from persisted data. The newest document and its sanitized content should match the visible state before reload.
Detailed documentation
Read the skill’s original instructions, examples and checks in their authored language.
Show less
Editor Verification
Use this skill when testing and verifying visual editors, block editors, drag-and-drop workspaces, and document persistence flows.
Full Editing Lifecycle Verification
Isolated unit tests on helper functions miss interaction bugs between selection, DOM rendering, history, and autosave. Verify the complete editing chain: $$\text{Create} \to \text{Edit} \to \text{Reorder / Nest} \to \text{Duplicate / Paste} \to \text{Delete} \to \text{Undo / Redo} \to \text{Autosave} \to \text{Reload}$$
- Structural & Schema Invariant Checks:
- After every editing command (split, merge, move, indent/outdent, duplicate, delete), assert that:
- All block IDs in the document are unique and non-empty.
- Parent-child nesting conforms to the document schema.
- Serializing and re-parsing the document produces the exact same structure.
- After every editing command (split, merge, move, indent/outdent, duplicate, delete), assert that:
- Selection, Keyboard & Accessibility Checks:
- Verify keyboard-only operation: creating blocks, moving between blocks with arrow keys, invoking commands, reordering blocks via keyboard alternatives, and restoring focus after closing popovers/modals.
- Verify that IME composition (
compositionstart/compositionend) and accented character input do not drop characters or trigger premature block transforms.
- Undo/Redo Equivalence Checks:
- After a multi-step sequence of edits $S_0 \xrightarrow{T_1} S_1 \xrightarrow{T_2} S_2$, verify that
undo()yields document state $S_1$, a secondundo()yields $S_0$, andredo()yields $S_1 \to S_2$ with valid selection and without polluting history during autosave.
- After a multi-step sequence of edits $S_0 \xrightarrow{T_1} S_1 \xrightarrow{T_2} S_2$, verify that
- Adversarial Clipboard & Sanitization Checks:
- Test pasting malformed HTML, deeply nested Word/Google Docs markup,
<script>/onerror/javascript:payloads, and plain text with newlines; verify clean schema normalization and zero XSS execution.
- Test pasting malformed HTML, deeply nested Word/Google Docs markup,
- Network Interruption, Out-of-Order Save & Reload Checks:
- Simulate edits while a save request is delayed (
saving), edit again before the first response returns, and assert the newer edit is not overwritten and eventually reachessaved. - Simulate a failed save (
500/ offline) followed by page reload or409 Conflict, and verify that local draft recovery and conflict handling preserve user work without silent data loss.
- Simulate edits while a save request is delayed (
Checklist
- Has the full chain (create, edit, reorder, duplicate, delete, undo/redo, save, reload) been verified end to end?
- Are unique block IDs, schema validity, and selection placement asserted after structural commands?
- Are keyboard reordering alternatives and hostile clipboard paste payloads tested?
- Are concurrent edits during in-flight saves, offline failures, and
409version conflicts tested?
Included files 1
SKILL.md
