6.0 KiB
Component Deletion Safety Test Plan
Purpose
Verify that deleting a referenced component is safe, warns before damage, and leaves useful diagnostics when deletion is confirmed.
Use a disposable project. Save it before each deletion test so the working version can be restored without rebuilding it.
Test 1: Table Referenced by a Response Binding
Setup
- Confirm the project contains a Table named
postsTable. - In Actions & Bindings, confirm a response binding targets
postsTable (Table.rows). - Save the project.
Why: deleting postsTable would break a real canonical response-binding target.
Attempt deletion
- Open Visual Editor.
- Select
postsTable. - Select the Table's red x.
Expected warning:
- The UI says
postsTableis referenced. - It identifies the affected response binding.
- It offers Cancel and Delete anyway.
Stop condition
If the Table disappears immediately without a warning, stop this test and record:
Referenced Table deleted without a warning.
This confirms the deletion-warning implementation gap. Continue only with Post-deletion diagnostic below.
Cancel path
If a warning appears:
- Select Cancel.
- Confirm
postsTableremains on the canvas. - Confirm the response binding remains unchanged.
Why: cancellation must not partially modify the component or binding.
Confirmed deletion path
- Attempt the deletion again.
- Select Delete anyway.
- Confirm only
postsTablewas removed.
Why: intentional deletion must remain possible without changing unrelated records.
Post-deletion diagnostic
- Open Actions & Bindings.
- Find the binding that targeted
postsTable. - Confirm it reports that target component
postsTableis missing. - Open JSON Editor and confirm:
postsTableis absent frompage.components.- The binding still targets
components.postsTable.rows. - Unrelated actions, bindings, variables, and components are unchanged.
Why: broken references must remain visible and diagnosable rather than being silently removed.
Restore
- Do not save the broken project.
- Use Load to reopen the saved project.
- Confirm
postsTableand its binding return. - Enter Preview and confirm page-load population still works.
Test 2: Text Input Referenced by a Request Template
Setup
-
Add a Text Input named
itemInput. -
In Actions & Bindings, edit or create a disposable GET action.
-
Add this query parameter:
- Key:
item - Value:
{{components.itemInput.value}}
- Key:
-
Save the action and project.
Why: the action now depends on itemInput when rendering its request.
Attempt deletion
- Open Visual Editor.
- Select
itemInput. - Select its red x.
Expected warning:
- The UI says
itemInputis referenced by an action request template. - It offers Cancel and Delete anyway.
If no warning appears, record:
Referenced Text Input deleted without a warning.
Diagnostic after confirmed deletion
- Open Actions & Bindings.
- Inspect the affected action.
- Confirm it reports that the template references missing component
itemInput. - Confirm unrelated configuration remains unchanged.
- Reload the saved project to restore the working version.
Results
- Referenced Table deletion produced a warning. Failed: the Table was deleted immediately without a warning.
- The Table warning identified the affected binding. Not applicable: no warning appeared.
- Cancel preserved the Table and binding. Not applicable: no warning appeared.
- Delete anyway removed only the Table. Not applicable: deletion was immediate.
- The broken binding produced a missing-component diagnostic.
- Referenced Text Input deletion produced a warning. Failed: itemInput was deleted immediately without a warning.
- The Text Input warning identified the affected request template. Not applicable: no warning appeared.
- The broken template produced a missing-component diagnostic.
- Reload restored the saved working project.
Tester/date: User, 2026-07-29 through 2026-07-30
Notes or defects: Deleting postsTable did not show a reference warning even though binding_response_1 targeted components.postsTable.rows. After deletion, Actions & Bindings correctly retained the binding and reported component postsTable not found / Target references component postsTable which does not exist on any page. Deleting itemInput also produced no warning, but the retained action correctly diagnosed the missing component template afterward. After restoration, the query row correctly placed the template in the value field; queryParameters.key identifies the query parameter named key rather than the editor's key field. The separate action-trigger warning remains a false positive because it ignores the valid page onLoad event.
Implementation Retest
The missing warning is now implemented and automated-tested. Repeat these checks in the rebuilt app:
- Delete referenced
postsTable; the dialog lists its response binding. - Choose Cancel; the Table and binding remain.
- Try again and choose Delete anyway; only the Table is removed, and the retained binding reports the missing component.
- Delete referenced
itemInput; the dialog lists the action request-template reference. - Choose Cancel; the Text Input and action remain.
- Try again and choose Delete anyway; only the Text Input is removed, and the retained action reports the missing component.
- Delete an unreferenced disposable component; it is removed immediately without an unnecessary dialog.
Why: this proves both safe interruption and intentional deletion work, while broken references remain visible instead of being silently erased.
Automated checkpoint on 2026-07-30: focused coverage passed at 4 suites / 12 tests, the full frontend suite passed at 20 suites / 490 tests, and the production build passed. The user manually confirmed every implementation-retest check passed on 2026-07-30.