test(app): find the side sheet by a data attribute, not its class

This commit is contained in:
Kit Langton 2026-10-25 08:47:27 -07:00
parent 99bb9d147c
commit d14a779a71
2 changed files with 2 additions and 1 deletions

View file

@ -699,7 +699,7 @@ for (const width of [800, 1000]) {
// Records whether the side panel ever floats as a sheet, on any frame, through an open and a close.
await page.evaluate(() => {
const sample = () => {
if (document.querySelector('[data-slot="session-side-panel-presence"].z-20'))
if (document.querySelector('[data-slot="session-side-panel-presence"][data-sheet]'))
document.documentElement.dataset.sheetSeen = ""
requestAnimationFrame(sample)

View file

@ -534,6 +534,7 @@ function SessionScreenContent(props: {
paintSheet()
}}
data-slot="session-side-panel-presence"
data-sheet={sideMotion.present() && sideSheet() ? "" : undefined}
class={`min-w-0 h-full overflow-visible ${
!sideMotion.present()
? // Out of the row, so a closed panel takes no space or gap.