fix stackdriver tests
This commit is contained in:
+12
-8
@@ -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();
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ exports[`VariableQueryEditor renders correctly 1`] = `
|
||||
<div
|
||||
class="css-8nwx1l-singleValue css-0"
|
||||
>
|
||||
Loading...
|
||||
Projects
|
||||
</div>
|
||||
<div
|
||||
class="css-1eu65zc"
|
||||
|
||||
Reference in New Issue
Block a user