fix stackdriver tests

This commit is contained in:
Ashley Harrison
2026-01-06 10:21:14 +00:00
parent ff7bab5753
commit 59d3ef2504
2 changed files with 13 additions and 9 deletions
@@ -295,14 +295,18 @@ describe('VisualMetricQueryEditor', () => {
const defaultQuery = { ...query, ...defaultTimeSeriesList(datasource), filters: query.filters };
const range = getDefaultTimeRange();
render(
<VisualMetricQueryEditor
{...defaultProps}
onChange={onChange}
datasource={datasource}
query={query}
range={range}
/>
// TODO investigate why we need act
// see https://github.com/testing-library/react-testing-library/issues/1375
await act(async () =>
render(
<VisualMetricQueryEditor
{...defaultProps}
onChange={onChange}
datasource={datasource}
query={query}
range={range}
/>
)
);
expect(document.body).toHaveTextContent('metric.test_label');
expect(await screen.findByText('Delta')).toBeInTheDocument();
@@ -41,7 +41,7 @@ exports[`VariableQueryEditor renders correctly 1`] = `
<div
class="css-8nwx1l-singleValue css-0"
>
Loading...
Projects
</div>
<div
class="css-1eu65zc"