Flamegraph: Add collapse and expand group buttons to toolbar (#87395)

This commit is contained in:
Andrej Ocenas
2024-05-10 11:51:09 +02:00
committed by GitHub
parent 0302b75721
commit 8213e8a2a6
9 changed files with 187 additions and 56 deletions
@@ -1,6 +1,6 @@
import { render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
import React, { useCallback } from 'react';
import { createDataFrame, createTheme } from '@grafana/data';
@@ -29,7 +29,8 @@ describe('FlameGraphContainer', () => {
},
};
return <FlameGraphContainer data={flameGraphData} getTheme={() => createTheme({ colors: { mode: 'dark' } })} />;
const getTheme = useCallback(() => createTheme({ colors: { mode: 'dark' } }), []);
return <FlameGraphContainer data={flameGraphData} getTheme={getTheme} />;
};
it('should render without error', async () => {