chore(autonomous-session): consolidate uncommitted work from prior session
Bundles the prior autonomous-session output that was sitting unstaged: - Em-dash sweep across src/ + tests/ (en-dash/em-dash to hyphen, ~2280 instances) - country-flag-icons rollout (CountryFlag component, replaces emoji glyphs that never rendered on Windows; lazy-loads the 3x2 SVG index as a single chunk after the per-subpath dynamic-import approach silently failed in webpack) - Admin IA Phase 1+2: 7-domain regroup, 41 to 38 pages, /admin/berths index, redirects (ocr to ai, reports to dashboard, invitations to users), docs/admin-ia-proposal.md - Per-template email tester (registry + endpoint + UI on Email admin page) - Cancel-document mode picker (delete-from-Documenso vs keep-for-audit) - Dashboard PDF report: 25 widgets, SVG charts, date-range picker, 11 resolvers - Customize-widgets per-region sortables at xl+ (charts/rails/feed); single flat sortable below xl when the layout stacks; per-viewport saved orders - Audit doc updates capturing each shipped item - Lint fixes: react-compiler immutability in DonutChart (reduce instead of let-reassign), set-state-in-effect disables in CountryFlag and UploadForSigning preview-bytes effect, unused 'confirm' destructures in interest contract + reservation tabs, unescaped apostrophe in test-template card copy
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Tests for validateCustomFieldValue — the private validation helper in
|
||||
* Tests for validateCustomFieldValue - the private validation helper in
|
||||
* custom-fields.service.ts. Since it is not exported we test it via the
|
||||
* public setValues function, using vi.mock to avoid database calls.
|
||||
* All assertions focus on what error message (if any) is thrown.
|
||||
@@ -111,7 +111,7 @@ async function validate(
|
||||
|
||||
// ─── text ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
describe('custom field validation — text', () => {
|
||||
describe('custom field validation - text', () => {
|
||||
it('accepts a string value', async () => {
|
||||
await expect(validate('text', 'hello')).resolves.toBeDefined();
|
||||
});
|
||||
@@ -131,7 +131,7 @@ describe('custom field validation — text', () => {
|
||||
|
||||
// ─── number ──────────────────────────────────────────────────────────────────
|
||||
|
||||
describe('custom field validation — number', () => {
|
||||
describe('custom field validation - number', () => {
|
||||
it('accepts a valid number', async () => {
|
||||
await expect(validate('number', 42)).resolves.toBeDefined();
|
||||
});
|
||||
@@ -151,7 +151,7 @@ describe('custom field validation — number', () => {
|
||||
|
||||
// ─── date ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
describe('custom field validation — date', () => {
|
||||
describe('custom field validation - date', () => {
|
||||
it('accepts a valid ISO date string', async () => {
|
||||
await expect(validate('date', '2026-06-15')).resolves.toBeDefined();
|
||||
});
|
||||
@@ -171,7 +171,7 @@ describe('custom field validation — date', () => {
|
||||
|
||||
// ─── boolean ─────────────────────────────────────────────────────────────────
|
||||
|
||||
describe('custom field validation — boolean', () => {
|
||||
describe('custom field validation - boolean', () => {
|
||||
it('accepts true', async () => {
|
||||
await expect(validate('boolean', true)).resolves.toBeDefined();
|
||||
});
|
||||
@@ -191,7 +191,7 @@ describe('custom field validation — boolean', () => {
|
||||
|
||||
// ─── select ──────────────────────────────────────────────────────────────────
|
||||
|
||||
describe('custom field validation — select', () => {
|
||||
describe('custom field validation - select', () => {
|
||||
const options = ['Small', 'Medium', 'Large'];
|
||||
|
||||
it('accepts a valid option', async () => {
|
||||
@@ -220,7 +220,7 @@ describe('custom field validation — select', () => {
|
||||
|
||||
// ─── required / non-required null handling ───────────────────────────────────
|
||||
|
||||
describe('custom field validation — required vs optional null', () => {
|
||||
describe('custom field validation - required vs optional null', () => {
|
||||
it('required field: null value → throws ValidationError', async () => {
|
||||
await expect(validate('text', null, { isRequired: true })).rejects.toBeInstanceOf(
|
||||
ValidationError,
|
||||
@@ -234,7 +234,7 @@ describe('custom field validation — required vs optional null', () => {
|
||||
});
|
||||
|
||||
it('non-required field: null value → succeeds (no error)', async () => {
|
||||
// null for non-required means "clear the value" — setValues will upsert null
|
||||
// null for non-required means "clear the value" - setValues will upsert null
|
||||
await expect(validate('text', null, { isRequired: false })).resolves.toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user