test: remove static presentation snapshots (#9008)
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
0947c30e69
commit
73776d4e52
2 files changed
-43
No files matched your search
@@ -1,20 +0,0 @@
|
||||
import { describe, expect, it } from "vite-plus/test";
|
||||
|
||||
import { MOBILE_CODE_SURFACE, MOBILE_TYPOGRAPHY } from "./typography";
|
||||
|
||||
describe("mobile typography", () => {
|
||||
it("uses the intentional mobile font scale anchored at a 16pt body", () => {
|
||||
expect(Object.values(MOBILE_TYPOGRAPHY).map(({ fontSize }) => fontSize)).toEqual([
|
||||
11, 12, 13, 14, 16, 18, 21, 26, 30,
|
||||
]);
|
||||
expect(MOBILE_TYPOGRAPHY.body).toEqual({ fontSize: 16, lineHeight: 23 });
|
||||
});
|
||||
|
||||
it("uses caption-sized code with a compact readable row height", () => {
|
||||
expect(MOBILE_CODE_SURFACE).toMatchObject({
|
||||
fontSize: MOBILE_TYPOGRAPHY.caption.fontSize,
|
||||
lineNumberFontSize: MOBILE_TYPOGRAPHY.micro.fontSize,
|
||||
rowHeight: 22,
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,23 +0,0 @@
|
||||
import { renderToStaticMarkup } from "react-dom/server";
|
||||
import { describe, expect, it } from "vite-plus/test";
|
||||
|
||||
import { Menu, MenuRadioGroup, MenuRadioItem } from "./menu";
|
||||
|
||||
describe("menu radio item geometry", () => {
|
||||
it("keeps radio-item icons on the same text grid as menu items", () => {
|
||||
const html = renderToStaticMarkup(
|
||||
<Menu>
|
||||
<MenuRadioGroup value="merge">
|
||||
<MenuRadioItem value="merge">
|
||||
<span className="flex items-center gap-2">
|
||||
<svg aria-hidden className="size-3.5" />
|
||||
<span>Merge</span>
|
||||
</span>
|
||||
</MenuRadioItem>
|
||||
</MenuRadioGroup>
|
||||
</Menu>,
|
||||
);
|
||||
|
||||
expect(html).toContain("-mx-0.5");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user