test(dialog): register rejected-close mutants (#607)

Issue: #607
User-Visible: no
This commit is contained in:
Claude
2026-09-23 02:25:57 +03:00
parent 4382817e55
commit fc70a3fcf4
+32
View File
@@ -1466,6 +1466,38 @@ const MUTANT_DEFINITIONS = [
replace: ' // mutant: reconnect reconciliation removed',
}],
},
{
id: 'dialog-ha-rejected-close-reopen-disabled',
guard: 'node demo/smoke_dialog_modal_recovery.mjs',
because: 'an HA shell may close outside Lit; rejected close must force live() to reconcile the '
+ 'same physical modal instead of leaving its preserved draft invisible (#607)',
patches: [{
file: 'src/hp-dialog.ts',
find: ' return html`<ha-dialog\n'
+ ' .hass=${this.hass}\n'
+ ' .open=${live(!this._closing)}',
replace: ' return html`<ha-dialog\n'
+ ' .hass=${this.hass}\n'
+ ' .open=${true}',
}],
},
{
id: 'dialog-ha-disconnected-reject-reopen-enabled',
guard: 'node demo/smoke_dialog_modal_recovery.mjs',
because: 'rejectClose must not schedule a render for a detached HA dialog, otherwise a stale '
+ 'shell can reopen after its owner has already been removed (#607)',
patches: [{
file: 'src/hp-dialog.ts',
find: ' public rejectClose(): void {\n'
+ ' this._closing = false;\n'
+ ' if (this.isConnected) this.requestUpdate();\n'
+ ' }',
replace: ' public rejectClose(): void {\n'
+ ' this._closing = false;\n'
+ ' this.requestUpdate();\n'
+ ' }',
}],
},
{
id: 'confirm-dialog-loses-alertdialog',
guard: 'node demo/smoke_danger_confirm_branches.mjs',