mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
test(dialog): register rejected-close mutants (#607)
Issue: #607 User-Visible: no
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user