Skip to content

Commit

Permalink
rename filename
Browse files Browse the repository at this point in the history
  • Loading branch information
Samiul-TheSoccerFan committed Apr 8, 2024
1 parent caabda7 commit acfad62
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ import React from 'react';
import { CrawlerStatusIndicator } from '../../../shared/crawler_status_indicator/crawler_status_indicator';

import { getHeaderActions } from './header_actions';
import { SearchEnginesPlayground } from './search_engines_playground';
import { SearchPlaygroundPopover } from './search_playground_popover';
import { SyncsContextMenu } from './syncs_context_menu';

describe('Header Actions', () => {
it('renders api index', () => {
expect(getHeaderActions(apiIndex)).toEqual([
<SearchEnginesPlayground indexName="api" ingestionMethod="api" />,
<SearchPlaygroundPopover indexName="api" ingestionMethod="api" />,
]);
expect(getHeaderActions(apiIndex)).toEqual([]);
});
it('renders connector index', () => {
expect(getHeaderActions(connectorIndex)).toEqual([
<SyncsContextMenu />,
<SearchEnginesPlayground indexName="connector" ingestionMethod="connector" />,
<SearchPlaygroundPopover indexName="connector" ingestionMethod="connector" />,
]);
expect(getHeaderActions(connectorIndex)).toEqual([<SyncsContextMenu />]);
});
it('renders crawler index', () => {
expect(getHeaderActions(crawlerIndex)).toEqual([
<CrawlerStatusIndicator />,
<SearchEnginesPlayground indexName="crawler" ingestionMethod="crawler" />,
<SearchPlaygroundPopover indexName="crawler" ingestionMethod="crawler" />,
]);
expect(getHeaderActions(crawlerIndex)).toEqual([<CrawlerStatusIndicator />]);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { ElasticsearchIndexWithIngestion } from '../../../../../../../common/typ
import { isCrawlerIndex, isConnectorIndex, getIngestionMethod } from '../../../../utils/indices';
import { CrawlerStatusIndicator } from '../../../shared/crawler_status_indicator/crawler_status_indicator';

import { SearchEnginesPlayground } from './search_engines_playground';
import { SearchPlaygroundPopover } from './search_playground_popover';
import { SyncsContextMenu } from './syncs_context_menu';

// Used to populate rightSideItems of an EuiPageTemplate, which is rendered right-to-left
Expand All @@ -26,7 +26,7 @@ export const getHeaderActions = (
...(isCrawlerIndex(indexData) && indexData.connector ? [<CrawlerStatusIndicator />] : []),
...(isConnectorIndex(indexData) || connector ? [<SyncsContextMenu />] : []),
...(indexData
? [<SearchEnginesPlayground indexName={indexData?.name} ingestionMethod={ingestionMethod} />]
? [<SearchPlaygroundPopover indexName={indexData?.name} ingestionMethod={ingestionMethod} />]
: []),
];
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import { KibanaLogic } from '../../../../../shared/kibana';

import { PLAYGROUND_PATH } from '../../../../routes';

export interface SearchEnginesPlaygroundProps {
export interface SearchPlaygroundPopoverProps {
indexName: string;
ingestionMethod: string;
}

export const SearchEnginesPlayground: React.FC<SearchEnginesPlaygroundProps> = ({
export const SearchPlaygroundPopover: React.FC<SearchPlaygroundPopoverProps> = ({
indexName,
ingestionMethod,
}) => {
Expand Down

0 comments on commit acfad62

Please sign in to comment.