feat(ui): skill levels + titles on CREW tab and team-builder (#45)
CI / build + unit + e2e (pull_request) Successful in 3m7s
CI / build + unit + e2e (pull_request) Successful in 3m7s
This commit is contained in:
+7
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user