DONUI-T-034: Localized Empty-Field Errors

Operator Contract

testEmptyFieldValidation is a separate ScheduledTest type. It starts at amount, selects a preset (which advances directly in current DonUI), clears visible information fields, and clicks the information submit button once. It requires blank required controls, invalid ARIA state, linked localized field alerts and a visible page alert while remaining at information. It never interacts with payment controls. Older screens requiring Next are supported using only the amount-scoped Next control; a generic Next click is never used. Legacy state fields are supported. The information form can become visible before the carousel exposes all inputs. Preparation waits within the existing timeout for the strict core-field contract; permanently missing fields still fail before any information submission.

Language Baseline and Evidence

test_interface/fixtures/empty_field_messages.json contains 26 list-code expectations for messages.invalidFieldValue, reviewed against soft-donui 08996455d9b7e58dc86fdefbeb8cab0f52d270f7. These are independent expectations, not strings fetched from the app under test. Deliberate copy changes require review of both the translation and this baseline; never auto-bless a mismatch. Only Unicode composition and whitespace are normalized.

Evidence uses scenario, list, checked field IDs, expectation commit/key and boolean assertions. Existing scheduled-test diagnostics/teardown remain in use. No identity values or raw page messages are added to the evidence. An error means validation, language/copy, target drift or test-contract drift needs investigation; it is not evidence of donor loss or payment failure.

Offline Verification

Use a venv with the repository's pinned requirements:

DJANGO_SETTINGS_MODULE=main.settings_ci python manage.py test test_interface.tests_empty_field_validation
DJANGO_SETTINGS_MODULE=main.settings_ci LTI_LOCAL_BROWSER_TESTS=1 python manage.py test test_interface.tests_empty_field_browser
DJANGO_SETTINGS_MODULE=main.settings_ci python manage.py makemigrations test_interface --check --dry-run

The browser regression suite requires Chrome (Selenium Manager resolves the driver). It serves synthetic HTML on loopback only, with network/form actions blocked by CSP. Its test-only URL validator mock does not bypass the scheduled adapter's preflight. English, Spanish and French fixtures exercise native interactions, optional fields and conditional country/province behavior; wrong language, missing field/page alerts and unexpected progression must fail. The unit suite checks all 26 reviewed locales and target-policy rejection. CI enables the loopback browser suite. These are not hosted acceptance results.

Review, Merge and Deployment

Release warning: the existing production workflow listens for successful CI on main. A merge can therefore initiate production deployment (subject to its environment gates). Obtain rollout approval and review those gates before merging; this implementation does not change or disable that workflow.

This branch is independent of PR63 (default OTD) and PR65 (rapid submit). Preferred sequence for the existing stack: merge PR63, retarget/update PR65 against main and merge it, then refresh this PR and reconcile migration leaves before merging. This is coordination, not a feature dependency: this PR can merge first if the later branches reconcile their migrations instead.

0023_localized_empty_field_validation is a choice-only migration based on 0022. PR63 also adds a 0023 leaf. Preserve the union of test choices, create a merge/choice-state migration as needed, and require no migration drift on the combined main. Do not delete or rewrite an already-applied migration.

After human review and exact-head CI, apply approved migrations and deploy the same immutable image to the intended LTI acceptance web/runner processes using the normal pipeline. Preserve scheduler pause/enrollment state and credentials. Run only explicitly approved sandbox scenarios (at least en-us, fr-fr and es-ho; expand all lists for full coverage), inspect screenshots/evidence, and confirm no payment step was submitted. Record deployed SHA, URLs, locale results and any copy mismatch. Merge, deploy and hosted acceptance remain separate from the completed implementation handoff. Production activation is not authorized.