Skip to content

Commit 39faa2c

Browse files
committed
fix: fix the failing test
1 parent 82d109f commit 39faa2c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frontend/src/container/ApiMonitoring/__tests__/StatusCodeBarChartsV5Migration.test.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* - stepInterval: 60 → null
1616
* - Grouped by response_status_code
1717
*/
18+
import { TraceAggregation } from 'api/v5/v5';
1819
import { getEndPointDetailsQueryPayload } from 'container/ApiMonitoring/utils';
1920
import { IBuilderQuery } from 'types/api/queryBuilder/queryBuilderData';
2021

@@ -106,7 +107,10 @@ describe('StatusCodeBarCharts - V5 Migration Validation', () => {
106107
// Aggregation: p99 on duration_nano
107108
expect(queryA.queryName).toBe('A');
108109
expect(queryA.aggregateOperator).toBe('p99');
109-
expect(queryA.aggregateAttribute?.key).toBe('duration_nano');
110+
expect(queryA.aggregations?.[0]).toBeDefined();
111+
expect((queryA.aggregations?.[0] as TraceAggregation)?.expression).toBe(
112+
'p99(duration_nano)',
113+
);
110114
expect(queryA.disabled).toBe(false);
111115

112116
// Grouped by response_status_code

0 commit comments

Comments
 (0)