Skip to content

Commit 691df76

Browse files
author
Sol
committed
test(navigation): observe transfer focus before moving next tab
Signed-off-by: Sol <49aa1f65411fd096d2e2ec144f1e7aa36fdc76d1b907cfdf7be000c66f9d3b8e@buzz.block.builderlab.xyz>
1 parent 2ca2522 commit 691df76

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎tests/browser/navigation-thread-history.spec.mjs‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,9 +455,15 @@ test("dragging thread tabs reorders and crosses panes without losing the reply",
455455

456456
// Moving the last side tab away also removes the pane, without toggling it.
457457
for (let remaining = 2; remaining > 0; remaining--) {
458-
await threadTabs(side).first().focus();
458+
const tab = threadTabs(side).first();
459+
const value = await tab.getAttribute("data-tab-value");
460+
await tab.focus();
459461
await page.keyboard.press("Alt+Shift+ArrowLeft");
460462
await expect(threadTabs(side)).toHaveCount(remaining - 1);
463+
// Transfer completion includes focus on the tab in its destination pane.
464+
await expect(
465+
main.locator(`[role="tab"][data-tab-value="${value}"]`),
466+
).toBeFocused();
461467
}
462468
await expect(side).toBeHidden();
463469
const emptyBounds = await main.boundingBox();

0 commit comments

Comments
 (0)