feat(ui): skill levels + titles on CREW tab and team-builder (#45)
CI / build + unit + e2e (pull_request) Successful in 3m7s

This commit is contained in:
2026-10-04 03:22:51 +00:00
parent 9d1a8e9d89
commit 1a36160392
8 changed files with 146 additions and 25 deletions
+7 -2
View File
@@ -137,8 +137,13 @@ describe('OpenAPI spec', () => {
expect((taskDto.properties.status as { enum: string[] }).enum).toEqual(['ACTIVE', 'PENDING']);
expect((taskDto.properties.helperCrewIds as { items: { type: string } }).items.type).toBe('integer');
const member = openApiSpec.components.schemas.CrewMember.properties;
expect(Object.keys(member)).toEqual(['id', 'name', 'role', 'trait_good', 'trait_bad', 'origin']);
// R-P1: the response object is camelCase (traitGood/traitBad), and since the skill-
// progression work the member also carries its four fixed-order skill levels + title.
const member = openApiSpec.components.schemas.CrewMember as { properties: Record<string, unknown>; required: string[] };
expect(Object.keys(member.properties)).toEqual(['id', 'name', 'role', 'traitGood', 'traitBad', 'origin', 'skills', 'title']);
expect(member.required).toEqual(['id', 'name', 'role', 'traitGood', 'traitBad', 'origin', 'skills', 'title']);
expect((member.properties.skills as { items: { required: string[] } }).items.required).toEqual(['skill', 'level']);
expect((member.properties.title as { nullable: boolean }).nullable).toBe(true);
const exploreResult = openApiSpec.components.schemas.ExploreResult as { allOf: unknown[] };
const extra = (exploreResult.allOf[1] as { properties: Record<string, unknown> }).properties;