fix: make vehicle demand fields responsive
This commit is contained in:
1 parent
5210a7385a
commit
d0f04e3787
2 files changed
+47
-28
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import vehicleDemandSource from "@/pages/vehicle-demand.vue?raw";
|
||||
|
||||
describe("vehicle demand form layout", () => {
|
||||
it("keeps native inputs and textarea inside their responsive parent width", () => {
|
||||
const fieldClasses = [
|
||||
...vehicleDemandSource.matchAll(/<(?:input|textarea)\b[^>]*\sclass="([^"]+)"/g),
|
||||
].map((match) => match[1].split(/\s+/));
|
||||
|
||||
expect(fieldClasses).toHaveLength(7);
|
||||
expect(fieldClasses.every((classes) => classes.includes("box-border"))).toBe(true);
|
||||
expect(fieldClasses.every((classes) => classes.includes("min-w-0"))).toBe(true);
|
||||
});
|
||||
|
||||
it("allows the two-column passenger fields to shrink within the form card", () => {
|
||||
expect(vehicleDemandSource).toContain('class="grid min-w-0 grid-cols-2 gap-3"');
|
||||
expect(vehicleDemandSource).toContain('class="min-w-0"');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user