test: allow inert summary style in lost-space smoke (#437)

Issue: #437
User-Visible: no
This commit is contained in:
Sergey Matyunin
2026-09-08 19:30:18 +03:00
parent af44114992
commit 336d8f30ba
+5 -1
View File
@@ -299,7 +299,11 @@ const out = await page.evaluate(async () => {
card.requestUpdate();
await settle();
const spaceLossDecision = await boundedDangerDecision(pendingAtSpaceLoss);
result.lostSpaceBranchIsActuallyEntered = root().childElementCount === 0;
// The summary runtime may keep its inert lazy stylesheet in the shadow root
// after render() returns `nothing`; it is not a decision or content surface.
const lostSpaceContent = [...root().children]
.filter((element) => !element.matches('style[data-hp-summary]'));
result.lostSpaceBranchIsActuallyEntered = lostSpaceContent.length === 0;
result.openConfirmCancelsWhenSpaceIsLost = spaceLossDecision.settled
&& spaceLossDecision.value === false
&& card._dangerConfirm === null && card._dangerConfirmController.state === null;