Layout measurement excluded pill margin on some renderers, collapsing the intended gap above visible tracks. Keep the two-pill rail on one line and derive its complete tail clearance from shared geometry so chat switching and layout callbacks cannot change the result.
23 lines
635 B
TypeScript
23 lines
635 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { resolveBottomOverlayTailInset } from "./bottom-overlay-inset";
|
|
|
|
describe("resolveBottomOverlayTailInset", () => {
|
|
it("adds only the space missing after existing footer clearance", () => {
|
|
expect(
|
|
resolveBottomOverlayTailInset({
|
|
requiredTailClearance: 56,
|
|
existingTailSpacing: 24,
|
|
}),
|
|
).toBe(32);
|
|
});
|
|
|
|
it("reserves the full overlay and clearance when the tail has no spacing", () => {
|
|
expect(
|
|
resolveBottomOverlayTailInset({
|
|
requiredTailClearance: 56,
|
|
existingTailSpacing: 0,
|
|
}),
|
|
).toBe(56);
|
|
});
|
|
});
|