feat(orion): extend report layout settings to version 1.1
This commit is contained in:
parent
12e1761a5b
commit
613ffdc8b7
591 changed files with 3601 additions and 999 deletions
|
|
@ -0,0 +1,32 @@
|
|||
import assert from "node:assert/strict";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import test from "node:test";
|
||||
|
||||
const source = fs.readFileSync(path.resolve("app/(app)/validations/quick-start/page.tsx"), "utf8");
|
||||
|
||||
test("quickstart renders selectable location and contact controls", () => {
|
||||
assert.match(source, /function SelectionCard/);
|
||||
assert.match(source, /label="Standort"/);
|
||||
assert.match(source, /label="Ansprechpartner"/);
|
||||
assert.match(source, /<select/);
|
||||
assert.match(source, /onChange=\{\(value\) => \{/);
|
||||
});
|
||||
|
||||
test("quickstart auto-selects single customer masterdata and clears stale selections", () => {
|
||||
assert.match(source, /data\.locations\.length === 1/);
|
||||
assert.match(source, /data\.contacts\.length === 1/);
|
||||
assert.match(source, /data\.devices\.length === 1/);
|
||||
assert.match(source, /setSelectedLocationId\(""\)/);
|
||||
assert.match(source, /setSelectedContactId\(""\)/);
|
||||
assert.match(source, /setSelectedDeviceId\(""\)/);
|
||||
});
|
||||
|
||||
test("quickstart button depends on valid ids rather than display objects", () => {
|
||||
assert.match(source, /hasValidLocation/);
|
||||
assert.match(source, /hasValidContact/);
|
||||
assert.match(source, /hasValidDevice/);
|
||||
assert.match(source, /location_id: selectedLocationId \|\| null/);
|
||||
assert.match(source, /contact_id: selectedContactId \|\| null/);
|
||||
assert.match(source, /window\.location\.replace\(`\/validations\/\$\{created\.id\}\/edit`\)/);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue