automationFormInputSurface.test.ts 933 B

12345678910111213141516171819202122232425262728
  1. import { readFileSync } from "node:fs";
  2. import { describe, expect, it } from "vitest";
  3. describe("automation form input surface", () => {
  4. it("matches the settings search input size, surface, and border semantics", () => {
  5. const editView = readFileSync(
  6. "packages/ui/src/settings/AutomationEditView.tsx",
  7. "utf8",
  8. );
  9. const composer = readFileSync(
  10. "packages/ui/src/settings/AutomationInstructionsComposer.tsx",
  11. "utf8",
  12. );
  13. expect(editView).toContain('size="lg"');
  14. expect(editView).toContain(
  15. '"h-9 rounded-xl bg-input px-3 text-foreground"',
  16. );
  17. expect(editView).toContain(
  18. "rounded-xl border border-input-border bg-input",
  19. );
  20. expect(composer).toContain(
  21. "rounded-xl border-0 bg-surface",
  22. );
  23. expect(composer).toContain("rounded-xl border border-input-border bg-input");
  24. expect(composer).toContain("bg-input p-3 text-foreground");
  25. });
  26. });