Implement CE-WP-0012 attribute types; freeze accepted catalog defaults.
Demo schema exercises amount and one-of; capture-state validates options; proposal marked accepted; workplan finished.
This commit is contained in:
parent
d4327b6be6
commit
36d8d3a73f
9 changed files with 117 additions and 56 deletions
|
|
@ -84,7 +84,12 @@ describe("Capture session persistence", () => {
|
|||
const user = userEvent.setup();
|
||||
await loadApp();
|
||||
|
||||
await user.type(screen.getByRole("textbox", { name: /Disputed amount/ }), "EUR 500");
|
||||
const amountInput = document.querySelector(
|
||||
'#field-amount',
|
||||
) as HTMLInputElement;
|
||||
expect(amountInput).toBeTruthy();
|
||||
await user.clear(amountInput);
|
||||
await user.type(amountInput, "500");
|
||||
|
||||
await waitFor(() => {
|
||||
const keys = Object.keys(globalThis.localStorage ?? {});
|
||||
|
|
@ -92,7 +97,8 @@ describe("Capture session persistence", () => {
|
|||
expect(captureKey).toBeTruthy();
|
||||
const sessionId = captureKey!.split(":")[2];
|
||||
const state = loadCaptureState(sessionId as never);
|
||||
expect(state?.fieldValues.amount).toBe("EUR 500");
|
||||
expect(state?.fieldValues.amount).toContain("500");
|
||||
expect(state?.fieldValues.amount).toContain("EUR");
|
||||
expect(captureStateKey(sessionId as never)).toBe(captureKey);
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue