Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
DRAWER_CONTENT_MOTION_CLASS,
|
||||
MODAL_CONTENT_MOTION_CLASS,
|
||||
SHEET_CONTENT_MOTION_CLASS,
|
||||
} from "./modal-motion";
|
||||
import { CONTEXT_MENU_MOTION_CLASS, HEADLESS_FLOATING_MOTION } from "./floating-motion";
|
||||
|
||||
describe("app motion contracts", () => {
|
||||
it("keeps modern and legacy drawers on the same timing", () => {
|
||||
for (const contract of [DRAWER_CONTENT_MOTION_CLASS, SHEET_CONTENT_MOTION_CLASS]) {
|
||||
expect(contract).toContain("data-[state=open]:duration-[360ms]");
|
||||
expect(contract).toContain("data-[state=closed]:duration-200");
|
||||
expect(contract).toContain("motion-reduce:animate-none");
|
||||
}
|
||||
});
|
||||
|
||||
it("keeps modal and floating motion reduced-motion safe", () => {
|
||||
expect(MODAL_CONTENT_MOTION_CLASS).toContain("motion-reduce:animate-none");
|
||||
expect(CONTEXT_MENU_MOTION_CLASS).toContain("data-[state=open]:duration-200");
|
||||
expect(CONTEXT_MENU_MOTION_CLASS).toContain("data-[state=closed]:duration-150");
|
||||
expect(HEADLESS_FLOATING_MOTION.enter).toContain("duration-200");
|
||||
expect(HEADLESS_FLOATING_MOTION.leave).toContain("duration-150");
|
||||
expect(HEADLESS_FLOATING_MOTION.enter).toContain("motion-reduce:transition-none");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user