mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[FTR] Move find service to shared location (#173874)
## Summary Refactoring general ui service to a kbn package. Resolves an [Appex QA](https://github.com/elastic/appex-qa-team) issue. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
99fd4aa6a4
commit
0515829a9e
98 changed files with 119 additions and 107 deletions
|
@ -671,7 +671,7 @@ module.exports = {
|
|||
*/
|
||||
{
|
||||
files: [
|
||||
'test/functional/services/lib/web_element_wrapper/scroll_into_view_if_necessary.js',
|
||||
'packages/kbn-ftr-common-functional-ui-services/services/web_element_wrapper/scroll_into_view_if_necessary.js',
|
||||
'**/browser_exec_scripts/**/*.js',
|
||||
],
|
||||
rules: {
|
||||
|
|
|
@ -8,3 +8,15 @@
|
|||
|
||||
export { services as commonFunctionalUIServices } from './services/all';
|
||||
export type { FtrProviderContext } from './services/ftr_provider_context';
|
||||
export { WebElementWrapper } from './services/web_element_wrapper';
|
||||
export type {
|
||||
CustomCheerio,
|
||||
CustomCheerioStatic,
|
||||
} from './services/web_element_wrapper/custom_cheerio_api';
|
||||
export { Browsers } from './services/remote/browsers';
|
||||
export {
|
||||
NETWORK_PROFILES,
|
||||
type NetworkOptions,
|
||||
type NetworkProfile,
|
||||
} from './services/remote/network_profiles';
|
||||
export type { TimeoutOpt } from './types';
|
||||
|
|
|
@ -7,7 +7,11 @@
|
|||
*/
|
||||
|
||||
import { RetryOnStaleProvider } from './retry_on_stale';
|
||||
import { RemoteProvider } from './remote';
|
||||
import { FindProvider } from './find';
|
||||
|
||||
export const services = {
|
||||
retryOnStale: RetryOnStaleProvider,
|
||||
__webdriver__: RemoteProvider,
|
||||
find: FindProvider,
|
||||
};
|
||||
|
|
|
@ -8,10 +8,12 @@
|
|||
|
||||
import { WebDriver, WebElement, By, until } from 'selenium-webdriver';
|
||||
|
||||
import { Browsers } from '../remote/browsers';
|
||||
import { FtrService, FtrProviderContext } from '../../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../lib/web_element_wrapper';
|
||||
import { TimeoutOpt } from './types';
|
||||
import { Browsers } from './remote/browsers';
|
||||
import type { FtrProviderContext } from './ftr_provider_context';
|
||||
import { WebElementWrapper } from './web_element_wrapper';
|
||||
import { TimeoutOpt } from '../types';
|
||||
|
||||
import { FtrService } from './ftr_provider_context';
|
||||
|
||||
export class FindService extends FtrService {
|
||||
private readonly log = this.ctx.getService('log');
|
|
@ -7,8 +7,13 @@
|
|||
*/
|
||||
|
||||
import { GenericFtrProviderContext, GenericFtrService } from '@kbn/test';
|
||||
import { RetryService } from '@kbn/ftr-common-functional-services';
|
||||
import { services as commonFunctionalUiServices } from './all';
|
||||
|
||||
import type { services } from './all';
|
||||
const services = {
|
||||
...commonFunctionalUiServices,
|
||||
retry: RetryService,
|
||||
};
|
||||
|
||||
type Services = typeof services;
|
||||
|
||||
|
|
|
@ -9,9 +9,12 @@
|
|||
import { fork } from 'child_process';
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { REPO_ROOT } from '@kbn/repo-info';
|
||||
|
||||
const FTR_SCRIPT = require.resolve('../../../../../scripts/functional_test_runner');
|
||||
const CONFIG_PATH = require.resolve('./fixtures/several_nested_window_size_changes/config.js');
|
||||
const FTR_SCRIPT = require.resolve(`${REPO_ROOT}/scripts/functional_test_runner`);
|
||||
const CONFIG_PATH = require.resolve(
|
||||
`${REPO_ROOT}/packages/kbn-ftr-common-functional-ui-services/services/remote/__tests__/fixtures/several_nested_window_size_changes/config.js`
|
||||
);
|
||||
const SECOND = 1000;
|
||||
|
||||
const DEFAULT_SIZE = { width: 1600, height: 1000 };
|
|
@ -7,3 +7,5 @@
|
|||
*/
|
||||
|
||||
export { RemoteProvider } from './remote';
|
||||
export { Browsers } from './browsers';
|
||||
export { NETWORK_PROFILES, type NetworkOptions, type NetworkProfile } from './network_profiles';
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import { NoSuchSessionError, NoSuchWindowError } from 'selenium-webdriver/lib/error';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
import { initWebDriver, BrowserConfig } from './webdriver';
|
||||
import { Browsers } from './browsers';
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* eslint-disable @kbn/eslint/require-license-header */
|
||||
/* eslint-disable @kbn/eslint/require-license-header, no-var */
|
||||
|
||||
/* @notice
|
||||
* Based on the scroll-into-view-if-necessary module from npm
|
|
@ -15,7 +15,7 @@ import { ToolingLog } from '@kbn/tooling-log';
|
|||
import { CustomCheerio, CustomCheerioStatic } from './custom_cheerio_api';
|
||||
// @ts-ignore not supported yet
|
||||
import { scrollIntoViewIfNecessary } from './scroll_into_view_if_necessary';
|
||||
import { Browsers } from '../../remote/browsers';
|
||||
import { Browsers } from '../remote/browsers';
|
||||
|
||||
interface TypeOptions {
|
||||
charByChar: boolean;
|
|
@ -2,18 +2,15 @@
|
|||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "target/types",
|
||||
"types": [
|
||||
"jest",
|
||||
"node"
|
||||
]
|
||||
"types": ["jest", "cheerio", "node"]
|
||||
},
|
||||
"include": [
|
||||
"**/*.ts",
|
||||
],
|
||||
"exclude": [
|
||||
"target/**/*"
|
||||
],
|
||||
"include": ["**/*.ts"],
|
||||
"exclude": ["target/**/*"],
|
||||
"kbn_references": [
|
||||
"@kbn/test",
|
||||
"@kbn/tooling-log",
|
||||
"@kbn/repo-info",
|
||||
"@kbn/test-subj-selector",
|
||||
"@kbn/ftr-common-functional-services"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
import type { estypes } from '@elastic/elasticsearch';
|
||||
import expect from '@kbn/expect';
|
||||
import assert from 'assert';
|
||||
import type { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import type { FtrProviderContext } from '../../functional/ftr_provider_context';
|
||||
import type { WebElementWrapper } from '../../functional/services/lib/web_element_wrapper';
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
|
||||
import { WebElementWrapper } from '../../../services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../../services/lib/web_element_wrapper';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const find = getService('find');
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
import { ES_FIELD_TYPES } from '@kbn/field-types';
|
||||
import expect from '@kbn/expect';
|
||||
import { FIELD_FORMAT_IDS } from '@kbn/field-formats-plugin/common';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../../../services/lib/web_element_wrapper';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
import { Key } from 'selenium-webdriver';
|
||||
import { asyncForEach } from '@kbn/std';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../services/lib/web_element_wrapper';
|
||||
|
||||
export class ConsolePageObject extends FtrService {
|
||||
private readonly testSubjects = this.ctx.getService('testSubjects');
|
||||
|
|
|
@ -17,8 +17,8 @@ import { OptionsListSortingType } from '@kbn/controls-plugin/common/options_list
|
|||
import expect from '@kbn/expect';
|
||||
import { asyncForEach } from '@kbn/std';
|
||||
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../services/lib/web_element_wrapper';
|
||||
|
||||
interface OptionsListAdditionalSettings {
|
||||
searchTechnique?: OptionsListSearchTechnique;
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../services/lib/web_element_wrapper';
|
||||
|
||||
export class DiscoverPageObject extends FtrService {
|
||||
private readonly retry = this.ctx.getService('retry');
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../../services/lib/web_element_wrapper';
|
||||
|
||||
export class LegacyDataTableVisPageObject extends FtrService {
|
||||
private readonly testSubjects = this.ctx.getService('testSubjects');
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../services/lib/web_element_wrapper';
|
||||
|
||||
export class TagCloudPageObject extends FtrService {
|
||||
private readonly find = this.ctx.getService('find');
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
*/
|
||||
|
||||
import moment from 'moment';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../services/lib/web_element_wrapper';
|
||||
|
||||
export type CommonlyUsed =
|
||||
| 'Today'
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import type { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../ftr_provider_context';
|
||||
import type { WebElementWrapper } from '../services/lib/web_element_wrapper';
|
||||
|
||||
export class TimelionPageObject extends FtrService {
|
||||
private readonly testSubjects = this.ctx.getService('testSubjects');
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
*/
|
||||
|
||||
import type { DebugState } from '@elastic/charts';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../services/lib/web_element_wrapper';
|
||||
|
||||
type Duration =
|
||||
| 'Milliseconds'
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../ftr_provider_context';
|
||||
import { WebElementWrapper } from './lib/web_element_wrapper';
|
||||
|
||||
/**
|
||||
* wrapper around EuiComboBox interactions
|
||||
|
|
|
@ -15,14 +15,14 @@ import Url from 'url';
|
|||
|
||||
import { NoSuchSessionError } from 'selenium-webdriver/lib/error';
|
||||
import sharp from 'sharp';
|
||||
import { FtrService, type FtrProviderContext } from '../../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../lib/web_element_wrapper';
|
||||
import { Browsers } from '../remote/browsers';
|
||||
import {
|
||||
WebElementWrapper,
|
||||
Browsers,
|
||||
NETWORK_PROFILES,
|
||||
type NetworkOptions,
|
||||
type NetworkProfile,
|
||||
} from '../remote/network_profiles';
|
||||
} from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService, type FtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
export type Browser = BrowserService;
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
export type { Browser } from './browser';
|
||||
export { BrowserProvider } from './browser';
|
||||
export { FailureDebuggingProvider } from './failure_debugging';
|
||||
export { FindProvider } from './find';
|
||||
export { PngService } from './png';
|
||||
export { ScreenshotsService } from './screenshots';
|
||||
export { SnapshotsService } from './snapshots';
|
||||
|
|
|
@ -12,9 +12,9 @@ import { promisify } from 'util';
|
|||
|
||||
import del from 'del';
|
||||
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { comparePngs } from '../lib/compare_pngs';
|
||||
import { FtrProviderContext, FtrService } from '../../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../lib/web_element_wrapper';
|
||||
|
||||
const mkdirAsync = promisify(mkdir);
|
||||
const writeFileAsync = promisify(writeFile);
|
||||
|
|
|
@ -7,9 +7,8 @@
|
|||
*/
|
||||
|
||||
import { subj as testSubjSelector } from '@kbn/test-subj-selector';
|
||||
import { WebElementWrapper } from '../lib/web_element_wrapper';
|
||||
import { WebElementWrapper, type TimeoutOpt } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../../ftr_provider_context';
|
||||
import { TimeoutOpt } from './types';
|
||||
|
||||
interface ExistsOptions {
|
||||
timeout?: number;
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../lib/web_element_wrapper';
|
||||
|
||||
export class DashboardExpectService extends FtrService {
|
||||
private readonly log = this.ctx.getService('log');
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '../lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../../ftr_provider_context';
|
||||
|
||||
const REMOVE_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-deletePanel';
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../lib/web_element_wrapper';
|
||||
|
||||
const CREATE_DRILLDOWN_DATA_TEST_SUBJ = 'embeddablePanelAction-OPEN_FLYOUT_ADD_DRILLDOWN';
|
||||
const MANAGE_DRILLDOWNS_DATA_TEST_SUBJ = 'embeddablePanelAction-OPEN_FLYOUT_EDIT_DRILLDOWN';
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
import { CommonlyUsed } from '../../page_objects/time_picker';
|
||||
import { WebElementWrapper } from '../lib/web_element_wrapper';
|
||||
|
||||
export function DashboardCustomizePanelProvider({ getService, getPageObject }: FtrProviderContext) {
|
||||
const log = getService('log');
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
import { chunk } from 'lodash';
|
||||
import { Key } from 'selenium-webdriver';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../ftr_provider_context';
|
||||
import { WebElementWrapper } from './lib/web_element_wrapper';
|
||||
|
||||
export interface TabbedGridData {
|
||||
columns: string[];
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../ftr_provider_context';
|
||||
import { WebElementWrapper } from './lib/web_element_wrapper';
|
||||
|
||||
interface SelectOptions {
|
||||
isAnchorRow?: boolean;
|
||||
|
|
|
@ -13,7 +13,6 @@ import { AppsMenuService } from './apps_menu';
|
|||
import {
|
||||
BrowserProvider,
|
||||
FailureDebuggingProvider,
|
||||
FindProvider,
|
||||
PngService,
|
||||
ScreenshotsService,
|
||||
SnapshotsService,
|
||||
|
@ -40,7 +39,6 @@ import { InspectorService } from './inspector';
|
|||
import { FieldEditorService } from './field_editor';
|
||||
import { ManagementMenuService } from './management';
|
||||
import { QueryBarService } from './query_bar';
|
||||
import { RemoteProvider } from './remote';
|
||||
import { RenderableService } from './renderable';
|
||||
import { ToastsService } from './toasts';
|
||||
import { DataGridService } from './data_grid';
|
||||
|
@ -61,10 +59,8 @@ import { DashboardSettingsProvider } from './dashboard/dashboard_settings';
|
|||
export const services = {
|
||||
...commonServiceProviders,
|
||||
...commonFunctionalUIServices,
|
||||
__webdriver__: RemoteProvider,
|
||||
filterBar: FilterBarService,
|
||||
queryBar: QueryBarService,
|
||||
find: FindProvider,
|
||||
testSubjects: TestSubjects,
|
||||
docTable: DocTableService,
|
||||
png: PngService,
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../ftr_provider_context';
|
||||
import { WebElementWrapper } from './lib/web_element_wrapper';
|
||||
|
||||
export class SavedObjectsFinderService extends FtrService {
|
||||
private readonly testSubjects = this.ctx.getService('testSubjects');
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
import { DebugState } from '@elastic/charts';
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../lib/web_element_wrapper';
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
import type { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const a11y = getService('a11y');
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { DebugState } from '@elastic/charts';
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import expect from '@kbn/expect';
|
|||
import { parse } from 'url';
|
||||
import { enableInfrastructureHostsView } from '@kbn/observability-plugin/common';
|
||||
import { ALERT_STATUS_ACTIVE, ALERT_STATUS_RECOVERED } from '@kbn/rule-data-utils';
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
import {
|
||||
DATES,
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import expect from '@kbn/expect';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from './config';
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
|
||||
const initialPackageMap = {
|
||||
apache: 'Apache HTTP Server',
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../ftr_provider_context';
|
||||
|
||||
interface Node {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { AlertStatus } from '@kbn/rule-data-utils';
|
||||
import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
|
||||
export function InfraHostsViewProvider({ getService }: FtrProviderContext) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
|
||||
export function InfraMetricsExplorerProvider({ getService }: FtrProviderContext) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import path from 'path';
|
||||
import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
|
||||
export function IngestPipelinesPageProvider({ getService, getPageObjects }: FtrProviderContext) {
|
||||
|
|
|
@ -9,7 +9,7 @@ import expect from '@kbn/expect';
|
|||
import { setTimeout as setTimeoutAsync } from 'timers/promises';
|
||||
import type { FittingFunction, XYCurveType } from '@kbn/lens-plugin/public';
|
||||
import { DebugState } from '@elastic/charts';
|
||||
import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
import { logWrapper } from './log_wrapper';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../ftr_provider_context';
|
||||
|
||||
interface SearchResult {
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
} from '@kbn/observability-log-explorer-plugin/common';
|
||||
import rison from '@kbn/rison';
|
||||
import querystring from 'querystring';
|
||||
import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
|
||||
export interface IntegrationPackage {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
/* eslint-disable max-classes-per-file */
|
||||
|
||||
import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService, FtrProviderContext } from '../ftr_provider_context';
|
||||
|
||||
interface FillTagFormFields {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { CaseSeverity, CaseStatuses } from '@kbn/cases-plugin/common/types/domain';
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
import { CasesCommon } from './common';
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper';
|
||||
|
||||
export function InfraSourceConfigurationFormProvider({
|
||||
getService,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
export function LogEntryCategoriesPageProvider({ getPageObjects, getService }: FtrProviderContext) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
export function LogEntryRatePageProvider({ getPageObjects, getService }: FtrProviderContext) {
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { TabsParams } from '../../page_objects/infra_logs_page';
|
||||
|
||||
export function LogStreamPageProvider({ getPageObjects, getService }: FtrProviderContext) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
export type MlTableService = ReturnType<typeof MlTableServiceProvider>;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { ProvidedType } from '@kbn/test';
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
import type { CanvasElementColorStats } from '../canvas_element';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
import type { CanvasElementColorStats } from '../canvas_element';
|
||||
import type { MlCommonUI } from './common_ui';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import expect from '@kbn/expect';
|
||||
import { ProvidedType } from '@kbn/test';
|
||||
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
type ExpectedSectionTableEntries = Record<string, string>;
|
||||
|
|
|
@ -14,7 +14,7 @@ import path from 'path';
|
|||
import type { JobType, MlSavedObjectType } from '@kbn/ml-plugin/common/types/saved_objects';
|
||||
import type { Job, Datafeed } from '@kbn/ml-plugin/common/types/anomaly_detection_jobs';
|
||||
import type { DataFrameAnalyticsConfig } from '@kbn/ml-data-frame-analytics-utils';
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import type { FtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
type SyncFlyoutObjectType =
|
||||
|
|
|
@ -9,8 +9,8 @@ import expect from '@kbn/expect';
|
|||
import { ProvidedType } from '@kbn/test';
|
||||
import { DebugState } from '@elastic/charts';
|
||||
import { DebugStateAxis } from '@elastic/charts/dist/state/types';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
|
||||
type HeatmapDebugState = Required<Pick<DebugState, 'heatmap' | 'axes' | 'legend'>>;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import expect from '@kbn/expect';
|
|||
import { ProvidedType } from '@kbn/test';
|
||||
import { upperFirst } from 'lodash';
|
||||
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import type { FtrProviderContext } from '../../ftr_provider_context';
|
||||
import type { MlCommonUI } from './common_ui';
|
||||
import { MappedInputParams, MappedOutput, ModelType, TrainedModelsActions } from './trained_models';
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
import expect from '@kbn/expect';
|
||||
import { chunk } from 'lodash';
|
||||
import { ALERT_STATUS_ACTIVE, ALERT_STATUS_RECOVERED, AlertStatus } from '@kbn/rule-data-utils';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
|
||||
// Based on the x-pack/test/functional/es_archives/observability/alerts archive.
|
||||
const DATE_WITH_DATA = {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
|
|||
import { INITIAL_SEARCH_SESSION_REST_VERSION } from '@kbn/data-plugin/server';
|
||||
import expect from '@kbn/expect';
|
||||
import { SavedObjectsFindResponse } from '@kbn/core/server';
|
||||
import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../ftr_provider_context';
|
||||
|
||||
const SEARCH_SESSION_INDICATOR_TEST_SUBJ = 'searchSessionIndicator';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
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']);
|
||||
|
|
|
@ -6,10 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import {
|
||||
CustomCheerio,
|
||||
CustomCheerioStatic,
|
||||
} from '../../../../test/functional/services/lib/web_element_wrapper/custom_cheerio_api';
|
||||
import type { CustomCheerio, CustomCheerioStatic } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
|
||||
const ENTER_KEY = '\uE007';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { panAnimationDuration } from '@kbn/security-solution-plugin/public/resolver/store/camera/scaling_constants';
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import { IndexedHostsAndAlertsResponse } from '@kbn/security-solution-plugin/com
|
|||
import { EXCEPTION_LIST_ITEM_URL } from '@kbn/securitysolution-list-constants';
|
||||
import { ArtifactElasticsearchProperties } from '@kbn/fleet-plugin/server/services';
|
||||
import { FoundExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types';
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
import { targetTags } from '../../target_tags';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
|
||||
export function EndpointPageProvider({ getService, getPageObjects }: FtrProviderContext) {
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper';
|
||||
|
||||
export function IngestManagerCreatePackagePolicy({
|
||||
getService,
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper';
|
||||
|
||||
export function EndpointPageUtils({ getService }: FtrProviderContext) {
|
||||
const testSubjects = getService('testSubjects');
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../../../functional/ftr_provider_context';
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
|
||||
const ALERT_TABLE_ROW_CSS_SELECTOR = '[data-test-subj="alertsTable"] .euiDataGridRow';
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrService } from '../../../functional/ftr_provider_context';
|
||||
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
|
||||
export class HostsPageObject extends FtrService {
|
||||
private readonly pageObjects = this.ctx.getPageObjects(['common', 'header']);
|
||||
|
|
|
@ -165,5 +165,6 @@
|
|||
"@kbn/log-explorer-plugin",
|
||||
"@kbn/security-plugin-types-common",
|
||||
"@kbn/typed-react-router-config",
|
||||
"@kbn/ftr-common-functional-ui-services",
|
||||
]
|
||||
}
|
||||
|
|
|
@ -6,11 +6,8 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import type { CustomCheerio, CustomCheerioStatic } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
import {
|
||||
CustomCheerio,
|
||||
CustomCheerioStatic,
|
||||
} from '../../../../test/functional/services/lib/web_element_wrapper/custom_cheerio_api';
|
||||
|
||||
export function RulesHelper({ getPageObjects, getService }: FtrProviderContext) {
|
||||
const find = getService('find');
|
||||
|
|
|
@ -16,8 +16,8 @@ import type { NavigationID as DevNavId } from '@kbn/default-nav-devtools';
|
|||
// use this for nicer type suggestions, but allow any string anyway
|
||||
type NavigationId = MlNavId | AlNavId | MgmtNavId | DevNavId | string;
|
||||
|
||||
import type { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import type { FtrProviderContext } from '../ftr_provider_context';
|
||||
import type { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper';
|
||||
|
||||
const getSectionIdTestSubj = (sectionId: NavigationId) => `~nav-item-${sectionId}`;
|
||||
|
||||
|
|
|
@ -6,10 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import type {
|
||||
CustomCheerio,
|
||||
CustomCheerioStatic,
|
||||
} from '../../../../test/functional/services/lib/web_element_wrapper/custom_cheerio_api';
|
||||
import type { CustomCheerio, CustomCheerioStatic } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
|
||||
const ENTER_KEY = '\uE007';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import type { WebElementWrapper } from '../../../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import type { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import type { estypes } from '@elastic/elasticsearch';
|
||||
import expect from '@kbn/expect';
|
||||
import assert from 'assert';
|
||||
import type { WebElementWrapper } from '../../../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import type { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import type { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
|
||||
import type { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
import type { WebElementWrapper } from '../../../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
|
||||
export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
||||
const pageObjects = getPageObjects(['svlCommonPage', 'common', 'indexManagement', 'header']);
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
|
||||
import type { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
import type { WebElementWrapper } from '../../../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
|
||||
export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
||||
const pageObjects = getPageObjects(['svlCommonPage', 'common', 'indexManagement', 'header']);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import moment from 'moment';
|
||||
import expect from '@kbn/expect';
|
||||
import type { WebElementWrapper } from '../../../../../../test/functional/services/lib/web_element_wrapper';
|
||||
import type { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
|
||||
import type { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
|
||||
import { HOSTS_VIEW_PATH } from './constants';
|
||||
|
|
|
@ -84,5 +84,6 @@
|
|||
"@kbn/log-explorer-plugin",
|
||||
"@kbn/index-management-plugin",
|
||||
"@kbn/alerting-plugin",
|
||||
"@kbn/ftr-common-functional-ui-services",
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue