fix(theme): switch thumb travels inside the track, toggle scene for the preview

This commit is contained in:
hh
2026-08-29 19:42:59 +02:00
parent 353ee143f6
commit b619c75119
2 changed files with 20 additions and 7 deletions
+5 -1
View File
@@ -25,6 +25,7 @@ function press(element: Element | null | undefined): void {
// Scenes for screenshots: open the page with a hash to land in a state.
// Width comes from the window (``--window-size``), the state from here.
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: one flat scene list
async function main(): Promise<void> {
const client = new FakeClient();
const state = new PanelState();
@@ -33,7 +34,7 @@ async function main(): Promise<void> {
if (scene === "empty") {
state.selected = null;
}
if (scene === "question") {
if (scene === "question" || scene === "toggle") {
state.selected = BRANCH_BLASTER;
}
if (scene === "deep") {
@@ -95,6 +96,9 @@ async function main(): Promise<void> {
})
);
}
if (scene.startsWith("toggle")) {
press(document.querySelector('[data-slot="switch"]'));
}
if (scene.startsWith("actions")) {
press(document.querySelector('[aria-label="Conversation actions"]'));
}