(label)
| 769 | }); |
| 770 | |
| 771 | const headerVisible = async (label) => { |
| 772 | await scrollChatToEnd(); |
| 773 | await page.waitForTimeout(250); |
| 774 | const dom = await chatDom(page); |
| 775 | const chips = dom.depthBox; |
| 776 | const panel = dom.panelBox; |
| 777 | const ok = |
| 778 | chips !== null |
| 779 | && panel !== null |
| 780 | && chips.height > 0 |
| 781 | && chips.top >= panel.top - 1 |
| 782 | && chips.bottom <= panel.bottom + 1 |
| 783 | && chips.top >= 0 |
| 784 | && chips.bottom <= dom.viewportHeight |
| 785 | && dom.scrollTop > 0; |
| 786 | extras.header = [...(extras.header ?? []), { label, chips, panel, scrollTop: dom.scrollTop }]; |
| 787 | log(`Kopfzeile ${label}: Chips ${JSON.stringify(chips)}, gescrollt ${dom.scrollTop} ` |
| 788 | + `-> sichtbar ${ok}`); |
| 789 | return ok; |
| 790 | }; |
| 791 | |
| 792 | const atDefaultHeight = await headerVisible('bei Vorgabehoehe'); |
| 793 |
no test coverage detected