Show all metric insights with descriptions

This commit is contained in:
dahyeon committed 2026-07-03 02:44:00 -07:00
1 parent 741fce0adb
commit cfbc74d882
9 files changed
+171 -33

No files matched your search

+25 -7
View File
@@ -353,7 +353,7 @@ describe('AppController (e2e)', () => {
queueId: 420,
featureSchemaVersion: FEATURE_SCHEMA_VERSION,
});
expect(responseBody).toEqual({
expect(responseBody).toMatchObject({
account: {
gameName: 'Hide on bush',
profileIconId: 1,
@@ -392,18 +392,36 @@ describe('AppController (e2e)', () => {
queueId: 420,
sampleGameCount: 12,
},
strengths: [
updatedAt: '2026-07-02T00:00:00.000Z',
});
expect(responseBody.strengths).toHaveLength(12);
expect(responseBody.weaknesses).toHaveLength(12);
expect(responseBody.strengths).toEqual(
expect.arrayContaining([
{ metricId: 'deathsPerMin', value: 0.1 },
{ metricId: 'kda', value: 0.8 },
{ metricId: 'killParticipation', value: 0.7 },
],
weaknesses: [
{ metricId: 'wardsKilledPerMin', value: 0.1 },
]),
);
expect(responseBody.weaknesses).toEqual(
expect.arrayContaining([
{ metricId: 'wardsKilledPerMin', value: 0.1 },
{ metricId: 'visionScorePerMin', value: 0.2 },
{ metricId: 'controlWardsPlaced', value: 0.2 },
],
updatedAt: '2026-07-02T00:00:00.000Z',
});
{ metricId: 'deathsPerMin', value: 0.1 },
]),
);
expect(responseBody.strengths.slice(0, 3)).toEqual([
{ metricId: 'deathsPerMin', value: 0.1 },
{ metricId: 'kda', value: 0.8 },
{ metricId: 'killParticipation', value: 0.7 },
]);
expect(responseBody.weaknesses.slice(0, 3)).toEqual([
{ metricId: 'wardsKilledPerMin', value: 0.1 },
{ metricId: 'visionScorePerMin', value: 0.2 },
{ metricId: 'controlWardsPlaced', value: 0.2 },
]);
});
it('/api/players/:puuid/analysis/latest (GET) returns 404 without a profile', async () => {