diff --git a/src/plugins/data_views/public/data_views/data_views_api_client.test.ts b/src/plugins/data_views/public/data_views/data_views_api_client.test.ts index 8e1261802fbbc..4eaf2e88f56d9 100644 --- a/src/plugins/data_views/public/data_views/data_views_api_client.test.ts +++ b/src/plugins/data_views/public/data_views/data_views_api_client.test.ts @@ -30,9 +30,6 @@ describe('IndexPatternsApiClient', () => { expect(fetchSpy).toHaveBeenCalledWith(expectedPath, { // not sure what asResponse is but the rest of the results are useful asResponse: true, - headers: { - 'user-hash': '', - }, query: { allow_hidden: undefined, allow_no_index: undefined, diff --git a/src/plugins/data_views/public/data_views/data_views_api_client.ts b/src/plugins/data_views/public/data_views/data_views_api_client.ts index e569e7f25bff6..233b05ea7bc22 100644 --- a/src/plugins/data_views/public/data_views/data_views_api_client.ts +++ b/src/plugins/data_views/public/data_views/data_views_api_client.ts @@ -56,6 +56,7 @@ export class DataViewsApiClient implements IDataViewsApiClient { const userId = await this.getCurrentUserId(); const userHash = userId ? await sha1(userId) : ''; + const headers = userHash ? { 'user-hash': userHash } : undefined; const request = body ? this.http.post(url, { query, body, version, asResponse }) @@ -64,7 +65,7 @@ export class DataViewsApiClient implements IDataViewsApiClient { version, ...cacheOptions, asResponse, - headers: { 'user-hash': userHash }, + headers, }); return request.catch((resp) => { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/tour/knowledge_base/overview.gif b/x-pack/packages/kbn-elastic-assistant/impl/tour/knowledge_base/overview.gif index 4cf07dfecd6a9..2f2d372f5497d 100644 Binary files a/x-pack/packages/kbn-elastic-assistant/impl/tour/knowledge_base/overview.gif and b/x-pack/packages/kbn-elastic-assistant/impl/tour/knowledge_base/overview.gif differ diff --git a/x-pack/packages/kbn-elastic-assistant/impl/tour/knowledge_base/video_toast.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/tour/knowledge_base/video_toast.test.tsx index 89979efd63fef..5322a34405621 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/tour/knowledge_base/video_toast.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/tour/knowledge_base/video_toast.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { VideoToast } from './video_toast'; +import { VIDEO_PAGE, VideoToast } from './video_toast'; describe('VideoToast', () => { const onCloseMock = jest.fn(); @@ -32,19 +32,13 @@ describe('VideoToast', () => { it('should open the video in a new tab when the gif is clicked', async () => { const videoGif = screen.getByTestId('video-gif'); await userEvent.click(videoGif); - expect(window.open).toHaveBeenCalledWith( - 'https://videos.elastic.co/watch/BrDaDBAAvdygvemFKNAkBW', - '_blank' - ); + expect(window.open).toHaveBeenCalledWith(VIDEO_PAGE, '_blank'); }); it('should open the video in a new tab when the "Watch overview video" button is clicked', async () => { const watchVideoButton = screen.getByRole('button', { name: 'Watch overview video' }); await userEvent.click(watchVideoButton); - expect(window.open).toHaveBeenCalledWith( - 'https://videos.elastic.co/watch/BrDaDBAAvdygvemFKNAkBW', - '_blank' - ); + expect(window.open).toHaveBeenCalledWith(VIDEO_PAGE, '_blank'); }); it('should call the onClose callback when the close button is clicked', async () => { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/tour/knowledge_base/video_toast.tsx b/x-pack/packages/kbn-elastic-assistant/impl/tour/knowledge_base/video_toast.tsx index b1b2bfe02a1eb..8431cf687ff0c 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/tour/knowledge_base/video_toast.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/tour/knowledge_base/video_toast.tsx @@ -18,10 +18,8 @@ import React, { useCallback } from 'react'; import * as i18n from './translations'; import theGif from './overview.gif'; -const VIDEO_CONTENT_WIDTH = 250; -// TODO before removing assistantKnowledgeBaseByDefault feature flag -// update the VIDEO_PAGE to the correct URL -const VIDEO_PAGE = `https://videos.elastic.co/watch/BrDaDBAAvdygvemFKNAkBW`; +const VIDEO_CONTENT_WIDTH = 330; +export const VIDEO_PAGE = `https://ela.st/seckb`; const VideoComponent: React.FC<{ onClose: () => void }> = ({ onClose }) => { const openVideoInNewTab = useCallback(() => {