Skip to content

Commit d1ed777

Browse files
committed
chore: fix the failing tests
1 parent 3a12c95 commit d1ed777

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

frontend/src/components/QuickFilters/tests/__snapshots__/QuickFilters.test.tsx.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ exports[`Quick Filters renders correctly with default props 1`] = `
110110
class="left-action"
111111
>
112112
<svg
113+
aria-hidden="true"
113114
class="lucide lucide-chevron-down"
114115
cursor="pointer"
115116
fill="none"
@@ -347,6 +348,7 @@ exports[`Quick Filters renders correctly with default props 1`] = `
347348
class="left-action"
348349
>
349350
<svg
351+
aria-hidden="true"
350352
class="lucide lucide-chevron-right"
351353
cursor="pointer"
352354
fill="none"

frontend/src/container/TraceWaterfall/TraceWaterfallStates/Success/__tests__/SpanDuration.test.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,20 @@ const mockTraceMetadata = {
4141
hasMissingSpans: false,
4242
};
4343

44+
jest.mock('uplot', () => {
45+
const paths = {
46+
spline: jest.fn(),
47+
bars: jest.fn(),
48+
};
49+
const uplotMock = jest.fn(() => ({
50+
paths,
51+
}));
52+
return {
53+
paths,
54+
default: uplotMock,
55+
};
56+
});
57+
4458
describe('SpanDuration', () => {
4559
const mockSetSelectedSpan = jest.fn();
4660
const mockUrlQuerySet = jest.fn();

frontend/src/pages/TraceDetail/__test__/TraceDetail.test.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,20 @@ jest.mock('container/TraceFlameGraph/index.tsx', () => ({
2525
default: (): JSX.Element => <div>TraceFlameGraph</div>,
2626
}));
2727

28+
jest.mock('uplot', () => {
29+
const paths = {
30+
spline: jest.fn(),
31+
bars: jest.fn(),
32+
};
33+
const uplotMock = jest.fn(() => ({
34+
paths,
35+
}));
36+
return {
37+
paths,
38+
default: uplotMock,
39+
};
40+
});
41+
2842
describe('TraceDetail', () => {
2943
it('should render tracedetail', async () => {
3044
const { findByText, getByText, getAllByText, getByPlaceholderText } = render(

0 commit comments

Comments
 (0)