cceed8ddd6
* Add delete engine route to App Search * Add new deleteEngine listener to EnginesLogic * Convert EnginesTable Manage into a proper EuiBasicTable action * Call EnginesLogic.actions.deleteEngine using new action in EnginesTable * Manage action on EnginesTable should use eye icon * Confirmation alert for delete action on EnginesTable * Only display manage/delete actions to users with canManageEngines * Add success message and reload after successful engine delete * Jest tests for EngineTable actions * Copy change for engine delete success message * Fixing EnginesTable tests * Adding more tests for DELETE engine route * engineNameLink -> EngineNameLink * Remove redundant test * Convert Engine.type to enum EngineTypes * Must use mountWithIntl * Use platinum license instead of role ability check
31 lines
1.3 KiB
TypeScript
31 lines
1.3 KiB
TypeScript
/*
|
|
* 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 { FtrProviderContext } from '../ftr_provider_context';
|
|
import { TestSubjects } from '../../../../test/functional/services/common';
|
|
import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper';
|
|
|
|
export function AppSearchPageProvider({ getService, getPageObjects }: FtrProviderContext) {
|
|
const PageObjects = getPageObjects(['common']);
|
|
const testSubjects = getService('testSubjects') as TestSubjects;
|
|
|
|
return {
|
|
async navigateToPage(): Promise<void> {
|
|
return await PageObjects.common.navigateToApp('enterprise_search/app_search');
|
|
},
|
|
|
|
async getEngineLinks(): Promise<WebElementWrapper[]> {
|
|
const engines = await testSubjects.find('appSearchEngines');
|
|
return await testSubjects.findAllDescendant('EngineNameLink', engines);
|
|
},
|
|
|
|
async getMetaEngineLinks(): Promise<WebElementWrapper[]> {
|
|
const metaEngines = await testSubjects.find('appSearchMetaEngines');
|
|
return await testSubjects.findAllDescendant('EngineNameLink', metaEngines);
|
|
},
|
|
};
|
|
}
|