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

This commit is contained in:
JUST.in DO IT
2024-02-14 13:04:59 -08:00
committed by GitHub
parent 152cd70b5f
commit 7b59c94827
14 changed files with 719 additions and 308 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,