fix(sqllab): flaky json explore modal due to over-rendering (#26156)

This commit is contained in:
JUST.in DO IT
2023-12-07 09:28:59 -08:00
committed by GitHub
parent 39c6488463
commit f30f685eb5
13 changed files with 679 additions and 278 deletions

View File

@@ -19,9 +19,10 @@
import React from 'react';
import { render, screen } from 'spec/helpers/testing-library';
import QueryHistory from 'src/SqlLab/components/QueryHistory';
import { initialState } from 'src/SqlLab/fixtures';
const mockedProps = {
queries: [],
queryEditorId: 123,
displayLimit: 1000,
latestQueryId: 'yhMUZCGb',
};
@@ -32,7 +33,7 @@ const setup = (overrides = {}) => (
describe('QueryHistory', () => {
it('Renders an empty state for query history', () => {
render(setup());
render(setup(), { useRedux: true, initialState });
const emptyStateText = screen.getByText(
/run a query to display query history/i,