Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[workspace]Hide the assistant entry when there isn't data2summary agent #9277

Merged
merged 6 commits into from
Feb 25, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { coreMock } from '../../../../../core/public/mocks';
import { Query } from '../../../common/query';
import { ISearchInterceptor } from '../../search';
import { DataStorage, DEFAULT_DATA } from 'src/plugins/data/common';

import { waitFor } from '@testing-library/react';
describe('QueryStringManager', () => {
let service: QueryStringManager;
let storage: DataStorage;
Expand All @@ -53,6 +53,11 @@ describe('QueryStringManager', () => {
);
});

afterEach(() => {
window.localStorage.clear();
window.sessionStorage.clear();
});

test('getUpdates$ is a cold emits only after query changes', () => {
const obs$ = service.getUpdates$();
const emittedValues: Query[] = [];
Expand Down Expand Up @@ -108,7 +113,6 @@ describe('QueryStringManager', () => {
test('clearQueryHistory clears the query history', () => {
service.addToQueryHistory({ query: 'test query 1', language: 'sql' });
service.addToQueryHistory({ query: 'test query 2', language: 'sql' });
expect(service.getQueryHistory()).toHaveLength(2);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: The fixing of unit tests seems not related to the current PR. Shall we separate a PR to fix it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I will revert this commit. thanks~


service.clearQueryHistory();
expect(service.getQueryHistory()).toHaveLength(0);
Expand Down
Loading