diff --git a/packages/kbn-doc-links/src/get_doc_links.ts b/packages/kbn-doc-links/src/get_doc_links.ts index 03886d9d901bc..d2ac9c6678797 100644 --- a/packages/kbn-doc-links/src/get_doc_links.ts +++ b/packages/kbn-doc-links/src/get_doc_links.ts @@ -51,6 +51,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D elasticStackGetStarted: isServerless ? `${SERVERLESS_DOCS}` : `${ELASTIC_WEBSITE_URL}guide/en/index.html`, + apiReference: `${ELASTIC_WEBSITE_URL}guide/en/starting-with-the-elasticsearch-platform-and-its-solutions/current/api-reference.html`, upgrade: { upgradingStackOnPrem: `${ELASTIC_WEBSITE_URL}guide/en/elastic-stack/current/upgrading-elastic-stack-on-prem.html`, upgradingStackOnCloud: `${ELASTIC_WEBSITE_URL}guide/en/elastic-stack/current/upgrade-elastic-stack-for-elastic-cloud.html`, diff --git a/packages/kbn-doc-links/src/types.ts b/packages/kbn-doc-links/src/types.ts index 4a5aee07d68c2..ae6e56a9ac385 100644 --- a/packages/kbn-doc-links/src/types.ts +++ b/packages/kbn-doc-links/src/types.ts @@ -25,6 +25,7 @@ export interface DocLinksMeta { export interface DocLinks { readonly settings: string; readonly elasticStackGetStarted: string; + readonly apiReference: string; readonly upgrade: { readonly upgradingStackOnPrem: string; readonly upgradingStackOnCloud: string; diff --git a/x-pack/plugins/search_indices/common/doc_links.ts b/x-pack/plugins/search_indices/common/doc_links.ts new file mode 100644 index 0000000000000..dbffa8f9f0f33 --- /dev/null +++ b/x-pack/plugins/search_indices/common/doc_links.ts @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { DocLinks } from '@kbn/doc-links'; + +class SearchIndicesDocLinks { + public apiReference: string = ''; + + constructor() {} + + setDocLinks(newDocLinks: DocLinks) { + this.apiReference = newDocLinks.apiReference; + } +} +export const docLinks = new SearchIndicesDocLinks(); diff --git a/x-pack/plugins/search_indices/kibana.jsonc b/x-pack/plugins/search_indices/kibana.jsonc index 7f23aa80fef15..303a264d2bafd 100644 --- a/x-pack/plugins/search_indices/kibana.jsonc +++ b/x-pack/plugins/search_indices/kibana.jsonc @@ -20,6 +20,7 @@ ], "requiredBundles": [ "kibanaReact", + "esUiShared" ] } } diff --git a/x-pack/plugins/search_indices/public/components/indices/delete_index_modal.tsx b/x-pack/plugins/search_indices/public/components/indices/delete_index_modal.tsx new file mode 100644 index 0000000000000..de9c887adb538 --- /dev/null +++ b/x-pack/plugins/search_indices/public/components/indices/delete_index_modal.tsx @@ -0,0 +1,75 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React, { Fragment, useEffect } from 'react'; +import { i18n } from '@kbn/i18n'; +import { EuiConfirmModal } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { useDeleteIndex } from '../../hooks/api/use_delete_index'; +interface DeleteIndexModelProps { + onCancel: () => void; + indexName: string; + navigateToIndexListPage: () => void; +} +export const DeleteIndexModal: React.FC = ({ + onCancel, + indexName, + navigateToIndexListPage, +}) => { + const { mutate, isLoading, isSuccess } = useDeleteIndex(indexName); + useEffect(() => { + if (isSuccess) { + navigateToIndexListPage(); + } + }, [navigateToIndexListPage, isSuccess]); + return ( + mutate()} + isLoading={isLoading} + buttonColor="danger" + confirmButtonDisabled={false} + cancelButtonText={i18n.translate( + 'xpack.searchIndices.indexActionsMenu.deleteIndex.confirmModal.cancelButtonText', + { + defaultMessage: 'Cancel', + } + )} + confirmButtonText={i18n.translate( + 'xpack.searchIndices.indexActionsMenu.deleteIndex.confirmModal.confirmButtonText', + { + defaultMessage: 'Delete index', + } + )} + > + +

+ +

+
    +
  • {indexName}
  • +
+ +

+ +

+
+
+ ); +}; diff --git a/x-pack/plugins/search_indices/public/components/indices/details_page.tsx b/x-pack/plugins/search_indices/public/components/indices/details_page.tsx index ed8ad6325f45f..afa798814d864 100644 --- a/x-pack/plugins/search_indices/public/components/indices/details_page.tsx +++ b/x-pack/plugins/search_indices/public/components/indices/details_page.tsx @@ -5,18 +5,36 @@ * 2.0. */ -import { EuiPageSection, EuiSpacer, EuiButton, EuiPageTemplate } from '@elastic/eui'; -import React, { useCallback, useMemo } from 'react'; +import { + EuiPageSection, + EuiSpacer, + EuiButton, + EuiPageTemplate, + EuiFlexItem, + EuiFlexGroup, + EuiPopover, + EuiButtonIcon, + EuiContextMenuItem, + EuiContextMenuPanel, + EuiText, + EuiIcon, + EuiButtonEmpty, +} from '@elastic/eui'; +import React, { useCallback, useMemo, useState } from 'react'; import { useParams } from 'react-router-dom'; import { FormattedMessage } from '@kbn/i18n-react'; +import { i18n } from '@kbn/i18n'; +import { SectionLoading } from '@kbn/es-ui-shared-plugin/public'; import { useIndex } from '../../hooks/api/use_index'; import { useKibana } from '../../hooks/use_kibana'; +import { DeleteIndexModal } from './delete_index_modal'; +import { IndexloadingError } from './details_page_loading_error'; export const SearchIndexDetailsPage = () => { const indexName = decodeURIComponent(useParams<{ indexName: string }>().indexName); - const { console: consolePlugin, application } = useKibana().services; + const { console: consolePlugin, docLinks, application } = useKibana().services; + const { data: index, refetch, isSuccess, isInitialLoading } = useIndex(indexName); - const { data: index } = useIndex(indexName); const embeddableConsole = useMemo( () => (consolePlugin?.EmbeddableConsole ? : null), [consolePlugin] @@ -24,6 +42,61 @@ export const SearchIndexDetailsPage = () => { const navigateToIndexListPage = useCallback(() => { application.navigateToApp('management', { deepLinkId: 'index_management' }); }, [application]); + + const refetchIndex = useCallback(() => { + refetch(); + }, [refetch]); + const [showMoreOptions, setShowMoreOptions] = useState(false); + const [isShowingDeleteModal, setShowDeleteIndexModal] = useState(false); + const moreOptionsPopover = ( + setShowMoreOptions(!showMoreOptions)} + button={ + setShowMoreOptions(!showMoreOptions)} + size="m" + data-test-subj="moreOptionsActionButton" + aria-label={i18n.translate('xpack.searchIndices.moreOptions.ariaLabel', { + defaultMessage: 'More options', + })} + /> + } + > + } + onClick={() => { + setShowDeleteIndexModal(!isShowingDeleteModal); + }} + size="s" + color="danger" + data-test-subj="moreOptionsDeleteIndex" + > + + {i18n.translate('xpack.searchIndices.moreOptions.deleteIndexLabel', { + defaultMessage: 'Delete Index', + })} + + , + ]} + /> + + ); + if (isInitialLoading) { + return ( + + {i18n.translate('xpack.searchIndices.loadingDescription', { + defaultMessage: 'Loading index details…', + })} + + ); + } + return ( { grow={false} bottomBorder={false} > - - - + ) : ( + <> + + navigateToIndexListPage()} + > + + + + + + + {i18n.translate('xpack.searchIndices.indexActionsMenu.apiReference.docLink', { + defaultMessage: 'API Reference', + })} + + + {moreOptionsPopover} + , + ]} /> - - - - + + + {isShowingDeleteModal && ( + setShowDeleteIndexModal(!isShowingDeleteModal)} + indexName={indexName} + navigateToIndexListPage={navigateToIndexListPage} + /> + )} -
+
+ + )} {embeddableConsole} ); diff --git a/x-pack/plugins/search_indices/public/components/indices/details_page_loading_error.tsx b/x-pack/plugins/search_indices/public/components/indices/details_page_loading_error.tsx new file mode 100644 index 0000000000000..2b02f6c9e1716 --- /dev/null +++ b/x-pack/plugins/search_indices/public/components/indices/details_page_loading_error.tsx @@ -0,0 +1,82 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { + EuiButton, + EuiButtonEmpty, + EuiFlexGroup, + EuiFlexItem, + EuiPageTemplate, + EuiText, +} from '@elastic/eui'; +import React from 'react'; +import { FormattedMessage } from '@kbn/i18n-react'; +interface IndexloadingErrorProps { + indexName: string; + navigateToIndexListPage: () => void; + reloadFunction: () => void; +} +export const IndexloadingError = ({ + indexName, + navigateToIndexListPage, + reloadFunction, +}: IndexloadingErrorProps) => ( + + + + } + body={ + + + + } + actions={ + + + navigateToIndexListPage()} + data-test-subj="loadingErrorBackToIndicesButton" + > + + + + + + + + + + } + /> +); diff --git a/x-pack/plugins/search_indices/public/constants.ts b/x-pack/plugins/search_indices/public/constants.ts index 3e352aa9b0d2f..54652954964aa 100644 --- a/x-pack/plugins/search_indices/public/constants.ts +++ b/x-pack/plugins/search_indices/public/constants.ts @@ -5,6 +5,16 @@ * 2.0. */ +export enum QueryKeys { + FetchIndex = 'fetchIndex', + FetchSearchIndicesStatus = 'fetchSearchIndicesStatus', + FetchUserStartPrivileges = 'fetchUserStartPrivileges', +} + +export enum MutationKeys { + SearchIndicesCreateIndex = 'searchIndicesCreateIndex', +} + export const ELASTICSEARCH_URL_PLACEHOLDER = 'https://your_deployment_url'; export const API_KEY_PLACEHOLDER = 'YOUR_API_KEY'; export const INDEX_PLACEHOLDER = 'my-index'; diff --git a/x-pack/plugins/search_indices/public/hooks/api/use_create_index.ts b/x-pack/plugins/search_indices/public/hooks/api/use_create_index.ts index 4dcb98002b997..b00384e2bc521 100644 --- a/x-pack/plugins/search_indices/public/hooks/api/use_create_index.ts +++ b/x-pack/plugins/search_indices/public/hooks/api/use_create_index.ts @@ -9,6 +9,7 @@ import { useMutation } from '@tanstack/react-query'; import { POST_CREATE_INDEX_ROUTE } from '../../../common/routes'; import { CreateIndexRequest, CreateIndexResponse } from '../../../common/types'; +import { MutationKeys } from '../../constants'; import { useKibana } from '../use_kibana'; @@ -16,7 +17,7 @@ export const useCreateIndex = () => { const { http } = useKibana().services; const { mutate: createIndex, ...rest } = useMutation({ - mutationKey: ['searchIndicesCreateIndex'], + mutationKey: [MutationKeys.SearchIndicesCreateIndex], mutationFn: async (input: CreateIndexRequest) => http.post(POST_CREATE_INDEX_ROUTE, { body: JSON.stringify(input), diff --git a/x-pack/plugins/search_indices/public/hooks/api/use_delete_index.ts b/x-pack/plugins/search_indices/public/hooks/api/use_delete_index.ts new file mode 100644 index 0000000000000..9e1162a6ac390 --- /dev/null +++ b/x-pack/plugins/search_indices/public/hooks/api/use_delete_index.ts @@ -0,0 +1,36 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { AcknowledgedResponseBase } from '@elastic/elasticsearch/lib/api/types'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import { QueryKeys } from '../../constants'; +import { useKibana } from '../use_kibana'; + +export const useDeleteIndex = (indexName: string) => { + const { http } = useKibana().services; + const indices = [indexName]; + const body = JSON.stringify({ + indices, + }); + const queryClient = useQueryClient(); + + const result = useMutation({ + mutationFn: async () => { + const response = await http.post( + `/api/index_management/indices/delete`, + { + body, + } + ); + return response.acknowledged; + }, + onSuccess: () => { + queryClient.invalidateQueries([QueryKeys.FetchIndex, indexName]); + }, + }); + return { ...result }; +}; diff --git a/x-pack/plugins/search_indices/public/hooks/api/use_index.ts b/x-pack/plugins/search_indices/public/hooks/api/use_index.ts index 65a8710589393..5831187516b73 100644 --- a/x-pack/plugins/search_indices/public/hooks/api/use_index.ts +++ b/x-pack/plugins/search_indices/public/hooks/api/use_index.ts @@ -7,18 +7,19 @@ import type { Index } from '@kbn/index-management'; import { useQuery } from '@tanstack/react-query'; +import { QueryKeys } from '../../constants'; import { useKibana } from '../use_kibana'; const POLLING_INTERVAL = 15 * 1000; export const useIndex = (indexName: string) => { const { http } = useKibana().services; - const queryKey = ['fetchIndex', indexName]; + const queryKey = [QueryKeys.FetchIndex, indexName]; const result = useQuery({ queryKey, refetchInterval: POLLING_INTERVAL, refetchIntervalInBackground: true, refetchOnWindowFocus: 'always', - retry: true, + retry: 3, queryFn: () => http.fetch(`/internal/index_management/indices/${encodeURIComponent(indexName)}`), }); diff --git a/x-pack/plugins/search_indices/public/hooks/api/use_indices_status.ts b/x-pack/plugins/search_indices/public/hooks/api/use_indices_status.ts index 81bd4579539e8..0ac7f3acd2e3c 100644 --- a/x-pack/plugins/search_indices/public/hooks/api/use_indices_status.ts +++ b/x-pack/plugins/search_indices/public/hooks/api/use_indices_status.ts @@ -9,6 +9,7 @@ import { useQuery } from '@tanstack/react-query'; import { GET_STATUS_ROUTE } from '../../../common/routes'; import type { IndicesStatusResponse } from '../../../common/types'; +import { QueryKeys } from '../../constants'; import { useKibana } from '../use_kibana'; @@ -21,7 +22,7 @@ export const useIndicesStatusQuery = (pollingInterval = DEFAULT_INDICES_POLLING_ refetchIntervalInBackground: true, refetchOnWindowFocus: 'always', retry: true, - queryKey: ['fetchSearchIndicesStatus'], + queryKey: [QueryKeys.FetchSearchIndicesStatus], queryFn: () => http.get(GET_STATUS_ROUTE), }); }; diff --git a/x-pack/plugins/search_indices/public/hooks/api/use_user_permissions.ts b/x-pack/plugins/search_indices/public/hooks/api/use_user_permissions.ts index a0a84e0148560..d3f4f34887157 100644 --- a/x-pack/plugins/search_indices/public/hooks/api/use_user_permissions.ts +++ b/x-pack/plugins/search_indices/public/hooks/api/use_user_permissions.ts @@ -9,13 +9,14 @@ import { useQuery } from '@tanstack/react-query'; import { GET_USER_PRIVILEGES_ROUTE } from '../../../common/routes'; import type { UserStartPrivilegesResponse } from '../../../common/types'; +import { QueryKeys } from '../../constants'; import { useKibana } from '../use_kibana'; export const useUserPrivilegesQuery = () => { const { http } = useKibana().services; return useQuery({ - queryKey: ['fetchUserStartPrivileges'], + queryKey: [QueryKeys.FetchUserStartPrivileges], queryFn: () => http.get(GET_USER_PRIVILEGES_ROUTE), }); }; diff --git a/x-pack/plugins/search_indices/tsconfig.json b/x-pack/plugins/search_indices/tsconfig.json index c8f2397b39a55..c3623afcc0f29 100644 --- a/x-pack/plugins/search_indices/tsconfig.json +++ b/x-pack/plugins/search_indices/tsconfig.json @@ -27,7 +27,9 @@ "@kbn/share-plugin", "@kbn/kibana-utils-plugin", "@kbn/shared-ux-router", - "@kbn/index-management", + "@kbn/es-ui-shared-plugin", + "@kbn/doc-links", + "@kbn/index-management-shared-types", "@kbn/try-in-console", "@kbn/cloud-plugin", ], diff --git a/x-pack/test_serverless/functional/page_objects/svl_search_index_detail_page.ts b/x-pack/test_serverless/functional/page_objects/svl_search_index_detail_page.ts index 963ffa13f5cf8..5ac440ce6c4f4 100644 --- a/x-pack/test_serverless/functional/page_objects/svl_search_index_detail_page.ts +++ b/x-pack/test_serverless/functional/page_objects/svl_search_index_detail_page.ts @@ -11,6 +11,7 @@ import { FtrProviderContext } from '../ftr_provider_context'; export function SvlSearchIndexDetailPageProvider({ getService }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const browser = getService('browser'); + const retry = getService('retry'); return { async expectToBeIndexDetailPage() { @@ -19,17 +20,52 @@ export function SvlSearchIndexDetailPageProvider({ getService }: FtrProviderCont async expectIndexDetailPageHeader() { await testSubjects.existOrFail('searchIndexDetailsHeader', { timeout: 2000 }); }, - async expectIndexDetailPage() { - await testSubjects.existOrFail('searchIndicesDetailsPage', { timeout: 2000 }); + async expectAPIReferenceDocLinkExists() { + await testSubjects.existOrFail('ApiReferenceDoc', { timeout: 2000 }); }, async expectBackToIndicesButtonExists() { - await testSubjects.existOrFail('searchIndexDetailsBackToIndicesButton', { timeout: 2000 }); + await testSubjects.existOrFail('backToIndicesButton', { timeout: 2000 }); }, async clickBackToIndicesButton() { - await testSubjects.click('searchIndexDetailsBackToIndicesButton'); + await testSubjects.click('backToIndicesButton'); }, async expectBackToIndicesButtonRedirectsToListPage() { await testSubjects.existOrFail('indicesList'); }, + async expectMoreOptionsActionButtonExists() { + await testSubjects.existOrFail('moreOptionsActionButton'); + }, + async clickMoreOptionsActionsButton() { + await testSubjects.click('moreOptionsActionButton'); + }, + async expectMoreOptionsOverviewMenuIsShown() { + await testSubjects.existOrFail('moreOptionsContextMenu'); + }, + async expectDeleteIndexButtonExists() { + await testSubjects.existOrFail('moreOptionsDeleteIndex'); + }, + async clickDeleteIndexButton() { + await testSubjects.click('moreOptionsDeleteIndex'); + }, + async expectDeleteIndexModalExists() { + await testSubjects.existOrFail('deleteIndexActionModal'); + }, + async clickConfirmingDeleteIndex() { + await testSubjects.existOrFail('confirmModalConfirmButton'); + await testSubjects.click('confirmModalConfirmButton'); + }, + async expectPageLoadErrorExists() { + await retry.tryForTime(60 * 1000, async () => { + await testSubjects.existOrFail('pageLoadError'); + }); + + await testSubjects.existOrFail('loadingErrorBackToIndicesButton'); + await testSubjects.existOrFail('reloadButton'); + }, + async clickPageReload() { + await retry.tryForTime(60 * 1000, async () => { + await testSubjects.click('reloadButton', 2000); + }); + }, }; } diff --git a/x-pack/test_serverless/functional/services/svl_search_navigation.ts b/x-pack/test_serverless/functional/services/svl_search_navigation.ts index d37cdb1518e0c..9de765cabd6bb 100644 --- a/x-pack/test_serverless/functional/services/svl_search_navigation.ts +++ b/x-pack/test_serverless/functional/services/svl_search_navigation.ts @@ -30,5 +30,13 @@ export function SvlSearchNavigationServiceProvider({ await testSubjects.existOrFail('elasticsearchStartPage', { timeout: 2000 }); }); }, + async navigateToIndexDetailPage(indexName: string) { + await retry.tryForTime(60 * 1000, async () => { + await PageObjects.common.navigateToApp(`elasticsearch/indices/index_details/${indexName}`, { + shouldLoginIfPrompted: false, + }); + }); + await testSubjects.existOrFail('searchIndicesDetailsPage', { timeout: 2000 }); + }, }; } diff --git a/x-pack/test_serverless/functional/test_suites/search/search_index_detail.ts b/x-pack/test_serverless/functional/test_suites/search/search_index_detail.ts index e86ea3d3c4296..9450dca44df57 100644 --- a/x-pack/test_serverless/functional/test_suites/search/search_index_detail.ts +++ b/x-pack/test_serverless/functional/test_suites/search/search_index_detail.ts @@ -13,39 +13,68 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { 'embeddedConsole', 'svlSearchIndexDetailPage', ]); + const svlSearchNavigation = getService('svlSearchNavigation'); const es = getService('es'); - const retry = getService('retry'); - const PageObjects = getPageObjects(['common']); const esDeleteAllIndices = getService('esDeleteAllIndices'); const indexName = 'test-my-index'; - describe('search index detail page', () => { + describe('Search index detail page', () => { before(async () => { await pageObjects.svlCommonPage.loginWithRole('developer'); - await es.indices.create({ index: indexName }); - await retry.tryForTime(60 * 1000, async () => { - await PageObjects.common.navigateToApp(`elasticsearch/indices/index_details/${indexName}`, { - shouldLoginIfPrompted: false, - }); - await pageObjects.svlSearchIndexDetailPage.expectIndexDetailPage(); - }); }); - after(async () => { await esDeleteAllIndices(indexName); }); - it('loads index detail page', async () => { - await pageObjects.svlSearchIndexDetailPage.expectIndexDetailPageHeader(); - await pageObjects.svlSearchIndexDetailPage.expectIndexDetailPage(); - }); - it('should have embedded dev console', async () => { - await testHasEmbeddedConsole(pageObjects); - }); - it('should redirect to indices list page', async () => { - await pageObjects.svlSearchIndexDetailPage.expectBackToIndicesButtonExists(); - await pageObjects.svlSearchIndexDetailPage.clickBackToIndicesButton(); - await pageObjects.svlSearchIndexDetailPage.expectBackToIndicesButtonRedirectsToListPage(); + describe('index details page overview', () => { + before(async () => { + await es.indices.create({ index: indexName }); + await svlSearchNavigation.navigateToIndexDetailPage(indexName); + }); + after(async () => { + await esDeleteAllIndices(indexName); + }); + it('can load index detail page', async () => { + await pageObjects.svlSearchIndexDetailPage.expectIndexDetailPageHeader(); + await pageObjects.svlSearchIndexDetailPage.expectAPIReferenceDocLinkExists(); + }); + it('should have embedded dev console', async () => { + await testHasEmbeddedConsole(pageObjects); + }); + it('back to indices button should redirect to list page', async () => { + await pageObjects.svlSearchIndexDetailPage.expectBackToIndicesButtonExists(); + await pageObjects.svlSearchIndexDetailPage.clickBackToIndicesButton(); + await pageObjects.svlSearchIndexDetailPage.expectBackToIndicesButtonRedirectsToListPage(); + }); + describe('page loading error', () => { + before(async () => { + await svlSearchNavigation.navigateToIndexDetailPage(indexName); + await esDeleteAllIndices(indexName); + }); + it('has page load error section', async () => { + await pageObjects.svlSearchIndexDetailPage.expectPageLoadErrorExists(); + }); + it('reload button shows details page again', async () => { + await es.indices.create({ index: indexName }); + await pageObjects.svlSearchIndexDetailPage.clickPageReload(); + await pageObjects.svlSearchIndexDetailPage.expectIndexDetailPageHeader(); + }); + }); + describe('Index more options menu', () => { + before(async () => { + await svlSearchNavigation.navigateToIndexDetailPage(indexName); + }); + it('shows action menu in actions popover', async () => { + await pageObjects.svlSearchIndexDetailPage.expectMoreOptionsActionButtonExists(); + await pageObjects.svlSearchIndexDetailPage.clickMoreOptionsActionsButton(); + await pageObjects.svlSearchIndexDetailPage.expectMoreOptionsOverviewMenuIsShown(); + }); + it('should delete index', async () => { + await pageObjects.svlSearchIndexDetailPage.expectDeleteIndexButtonExists(); + await pageObjects.svlSearchIndexDetailPage.clickDeleteIndexButton(); + await pageObjects.svlSearchIndexDetailPage.clickConfirmingDeleteIndex(); + }); + }); }); }); }