Add error context and media files for seafarer registration tests

- Created error context markdown files for failed tests in seafarer registration, detailing validation errors related to profile details.
- Added binary files (PNG, ZIP, WEBM) for test results, including snapshots and traces for debugging purposes.
- Updated test cases to include new error context and media files for better analysis of failures.
This commit is contained in:
Fistum
2026-08-18 09:20:36 +00:00
parent c7bd69eecb
commit 1931e69594
42 changed files with 17179 additions and 40 deletions

View File

@@ -264,6 +264,16 @@ export interface WizardStep {
* the stepper short. Anything ungrouped keeps a step of its own, so a licence
* type that has not been grouped still behaves exactly as before.
*/
/** "identitySummary" -> "Identity Summary". Last resort for an untitled group. */
function humanise(key: string): string {
return key
.replace(/[_-]+/g, ' ')
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
.replace(/\s+/g, ' ')
.trim()
.replace(/^./, (c) => c.toUpperCase());
}
export function buildWizardSteps(
sections: FormSectionConfig[],
formData: Record<string, Record<string, unknown>>,
@@ -304,7 +314,11 @@ export function buildWizardSteps(
}
const step: WizardStep = {
key: `group:${group}`,
label: group,
// A group is a config key, not a caption — showing it raw put
// "identitySummary" and "applicant" in front of applicants. The first
// section's own title is the readable name for the step it opens; the
// humanised key is the fallback when a section carries no title.
label: localized(section.title, options?.language) || humanise(group),
kind: 'sections',
sections: [section],
};