Skip to content

Commit cfa8236

Browse files
test(web): a swipe from the tab strip's edge still goes back after earlier gestures
Covers the begin re-arming the swipe tracker after a gesture end left it ignored, with the begin arriving after the gesture's first wheel. AI-assisted; verified with the tests and tools listed above.
1 parent 8b2c2fd commit cfa8236

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎apps/web/src/components/RightPanelTabs.browser.test.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const surfaces: RightPanelSurface[] = Array.from({ length: 16 }, (_, index) => (
6060
}));
6161

6262
describe("RightPanelTabs", () => {
63-
it("a flick that scrolls the tab strip to its left edge keeps the thread", async () => {
63+
it("a flick that scrolls the tab strip to its left edge keeps the thread, a swipe from the edge goes back", async () => {
6464
navigateHistory.mockReset();
6565
const { bridge, scroll } = trackpad();
6666
using _bridge = stubGlobal("desktopBridge", bridge);
@@ -136,5 +136,10 @@ describe("RightPanelTabs", () => {
136136
scroll(viewport.querySelector("[data-active-tab]")!, [-10, -20, -30, ...momentum]);
137137

138138
expect(navigateHistory).not.toHaveBeenCalled();
139+
140+
viewport.scrollLeft = 0;
141+
scroll(viewport.querySelector("[data-active-tab]")!, [-40, -40, -40, -40, -40]);
142+
143+
expect(navigateHistory).toHaveBeenCalledExactlyOnceWith("back");
139144
});
140145
});

0 commit comments

Comments
 (0)