diff --git a/.buildkite/ftr_platform_stateful_configs.yml b/.buildkite/ftr_platform_stateful_configs.yml index e394e0e190f6..00294960a374 100644 --- a/.buildkite/ftr_platform_stateful_configs.yml +++ b/.buildkite/ftr_platform_stateful_configs.yml @@ -7,6 +7,7 @@ disabled: - src/platform/test/functional/config.base.js - src/platform/test/functional/firefox/config.base.ts - x-pack/test/functional/config.base.js + - x-pack/platform/test/functional/config.base.ts - x-pack/test/localization/config.base.ts - src/platform/test/server_integration/config.base.js - x-pack/test/functional_with_es_ssl/config.base.ts @@ -21,6 +22,7 @@ disabled: - x-pack/test/stack_functional_integration/configs/config.stack_functional_integration_base.js - x-pack/test/upgrade/config.ts - src/platform/test/functional/config.edge.js + - x-pack/platform/test/functional/config.edge.ts - x-pack/test/functional/config.edge.js # Configs that exist but weren't running in CI when this file was introduced @@ -49,6 +51,10 @@ disabled: # Gen AI suites, running with their own pipeline - x-pack/test/functional_gen_ai/inference/config.ts + # They will be moved to enabled once the first test is added, the first two initial configs are in disabled section + - x-pack/platform/test/functional/config.firefox.ts + - x-pack/platform/test/functional/config_security_basic.ts + defaultQueue: 'n2-4-spot' enabled: - src/platform/test/accessibility/config.ts diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f0f2a2f539b6..74aedc095880 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1739,8 +1739,11 @@ x-pack/platform/plugins/shared/ml/server/models/data_recognizer/modules/security /x-pack/test/functional/services/remote_es/remote_es.ts @elastic/appex-qa /x-pack/test/functional/services/random.js @elastic/appex-qa /x-pack/test/functional/services/index.ts @elastic/appex-qa +/x-pack/platform/test/functional/services/index.ts @elastic/appex-qa /x-pack/test/functional/page_objects/index.ts @elastic/appex-qa +/x-pack/platform/test/functional/page_objects/index.ts @elastic/appex-qa /x-pack/test/functional/ftr_provider_context.ts @elastic/appex-qa +/x-pack/platform/test/functional/ftr_provider_context.ts @elastic/appex-qa /x-pack/test/functional/README.md @elastic/appex-qa /x-pack/test/examples/config.ts @elastic/appex-qa /x-pack/test/common/services/index.ts @elastic/appex-qa @@ -1812,6 +1815,7 @@ x-pack/platform/plugins/shared/ml/server/models/data_recognizer/modules/security /x-pack/test/scalability @elastic/appex-qa /src/dev/performance @elastic/appex-qa /x-pack/test/functional/config.*.* @elastic/appex-qa +/x-pack/platform/test/functional/config.*.* @elastic/appex-qa /x-pack/test/api_integration/ftr_provider_context.d.ts @elastic/appex-qa # Maybe this should be a glob? /x-pack/test/accessibility/services.ts @elastic/appex-qa /x-pack/test/accessibility/page_objects.ts @elastic/appex-qa @@ -2014,6 +2018,7 @@ x-pack/platform/plugins/private/cloud_integrations/cloud_full_story/server/confi /src/platform/test/functional/page_objects/login_page.ts @elastic/kibana-security /x-pack/test_serverless/functional/test_suites/observability/role_management @elastic/kibana-security /x-pack/test/functional/config_security_basic.ts @elastic/kibana-security +/x-pack/platform/test/functional/config_security_basic.ts @elastic/kibana-security /x-pack/test/functional/page_objects/user_profile_page.ts @elastic/kibana-security /x-pack/test/functional/page_objects/space_selector_page.ts @elastic/kibana-security /x-pack/test/functional/page_objects/security_page.ts @elastic/kibana-security diff --git a/x-pack/platform/test/functional/config.base.ts b/x-pack/platform/test/functional/config.base.ts new file mode 100644 index 000000000000..97e33028ec0f --- /dev/null +++ b/x-pack/platform/test/functional/config.base.ts @@ -0,0 +1,775 @@ +/* + * 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 { ScoutTestRunConfigCategory } from '@kbn/scout-info'; +import { resolve } from 'path'; +import { FtrConfigProviderContext } from '@kbn/test'; +import { services } from './services'; +import { pageObjects } from './page_objects'; + +// the default export of config files must be a config provider +// that returns an object with the projects config values +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const kibanaCommonConfig = await readConfigFile( + require.resolve('@kbn/test-suites-src/common/config') + ); + const kibanaFunctionalConfig = await readConfigFile( + require.resolve('@kbn/test-suites-src/functional/config.base') + ); + + return { + services, + pageObjects, + + testConfigCategory: ScoutTestRunConfigCategory.UI_TEST, + + servers: kibanaFunctionalConfig.get('servers'), + + esTestCluster: { + license: 'trial', + from: 'snapshot', + serverArgs: ['path.repo=/tmp/', 'xpack.security.authc.api_key.enabled=true'], + }, + + kbnTestServer: { + ...kibanaCommonConfig.get('kbnTestServer'), + serverArgs: [ + ...kibanaCommonConfig.get('kbnTestServer.serverArgs'), + '--status.allowAnonymous=true', + '--server.uuid=5b2de169-2785-441b-ae8c-186a1936b17d', + '--xpack.maps.showMapsInspectorAdapter=true', + '--xpack.maps.preserveDrawingBuffer=true', + '--xpack.security.encryptionKey="wuGNaIhoMpk5sO4UBxgr3NyW1sFcLgIf"', // server restarts should not invalidate active sessions + '--xpack.encryptedSavedObjects.encryptionKey="DkdXazszSCYexXqz4YktBGHCRkV6hyNK"', + '--xpack.discoverEnhanced.actions.exploreDataInContextMenu.enabled=true', + '--savedObjects.maxImportPayloadBytes=10485760', // for OSS test management/_import_objects, + '--savedObjects.allowHttpApiAccess=false', // override default to not allow hiddenFromHttpApis saved objects access to the http APIs see https://github.com/elastic/dev/issues/2200 + // explicitly disable internal API restriction. See https://github.com/elastic/kibana/issues/163654 + '--server.restrictInternalApis=false', + // disable fleet task that writes to metrics.fleet_server.* data streams, impacting functional tests + `--xpack.task_manager.unsafe.exclude_task_types=${JSON.stringify(['Fleet-Metrics-Task'])}`, + ], + }, + uiSettings: { + defaults: { + 'accessibility:disableAnimations': true, + 'dateFormat:tz': 'UTC', + }, + }, + // the apps section defines the urls that + // `PageObjects.common.navigateTo(appKey)` will use. + // Merge urls for your plugin with the urls defined in + // Kibana's config in order to use this helper + apps: { + ...kibanaFunctionalConfig.get('apps'), + lens: { + pathname: '/app/lens', + }, + login: { + pathname: '/login', + }, + monitoring: { + pathname: '/app/monitoring', + }, + logstashPipelines: { + pathname: '/app/management/ingest/pipelines', + }, + cases: { + pathname: '/app/management/insightsAndAlerting/cases/', + }, + maps: { + pathname: '/app/maps', + }, + graph: { + pathname: '/app/graph', + }, + grokDebugger: { + pathname: '/app/dev_tools', + hash: '/grokdebugger', + }, + searchProfiler: { + pathname: '/app/dev_tools', + hash: '/searchprofiler', + }, + painlessLab: { + pathname: '/app/dev_tools', + hash: '/painless_lab', + }, + spaceSelector: { + pathname: '/', + }, + infraOps: { + pathname: '/app/metrics', + }, + infraLogs: { + pathname: '/app/logs', + }, + canvas: { + pathname: '/app/canvas', + hash: '/', + }, + uptime: { + pathname: '/app/uptime', + }, + fleet: { + pathname: '/app/fleet', + }, + ml: { + pathname: '/app/ml', + }, + roleMappings: { + pathname: '/app/management/security/role_mappings', + }, + rollupJob: { + pathname: '/app/management/data/rollup_jobs', + }, + apiKeys: { + pathname: '/app/management/security/api_keys', + }, + licenseManagement: { + pathname: '/app/management/stack/license_management', + }, + indexManagement: { + pathname: '/app/management/data/index_management', + }, + indexLifecycleManagement: { + pathname: '/app/management/data/index_lifecycle_management', + }, + ingestPipelines: { + pathname: '/app/management/ingest/ingest_pipelines', + }, + snapshotRestore: { + pathname: '/app/management/data/snapshot_restore', + }, + spacesManagement: { + pathname: '/app/management/kibana/spaces', + }, + remoteClusters: { + pathname: '/app/management/data/remote_clusters', + }, + crossClusterReplication: { + pathname: '/app/management/data/cross_cluster_replication', + }, + apm: { + pathname: '/app/apm', + }, + watcher: { + pathname: '/app/management/insightsAndAlerting/watcher/watches', + }, + transform: { + pathname: '/app/management/data/transform', + }, + reporting: { + pathname: '/app/management/insightsAndAlerting/reporting', + }, + securitySolution: { + pathname: '/app/security', + }, + observability: { + pathname: '/app/observability', + }, + observabilityLogsExplorer: { + pathname: '/app/observability-logs-explorer', + }, + connectors: { + pathname: '/app/management/insightsAndAlerting/triggersActionsConnectors/', + }, + triggersActions: { + pathname: '/app/management/insightsAndAlerting/triggersActions', + }, + maintenanceWindows: { + pathname: '/app/management/insightsAndAlerting/maintenanceWindows', + }, + obsAIAssistant: { + pathname: '/app/observabilityAIAssistant', + }, + aiAssistantManagementSelection: { + pathname: '/app/management/kibana/aiAssistantManagementSelection', + }, + obsAIAssistantManagement: { + pathname: '/app/management/kibana/observabilityAiAssistantManagement', + }, + enterpriseSearch: { + pathname: '/app/elasticsearch/overview', + }, + elasticsearchStart: { + pathname: '/app/elasticsearch/start', + }, + elasticsearchIndices: { + pathname: '/app/elasticsearch/indices', + }, + searchPlayground: { + pathname: '/app/search_playground', + }, + }, + + suiteTags: { + ...kibanaCommonConfig.get('suiteTags'), + exclude: [...kibanaCommonConfig.get('suiteTags').exclude, 'upgradeAssistant'], + }, + + // choose where screenshots should be saved + screenshots: { + directory: resolve(__dirname, 'screenshots'), + }, + + junit: { + reportName: 'Chrome X-Pack UI Functional Tests', + }, + security: { + roles: { + test_monitoring: { + elasticsearch: { + cluster: ['monitor'], + }, + }, + test_logstash_reader: { + elasticsearch: { + cluster: [], + indices: [ + { + names: ['logstash*'], + privileges: ['read', 'view_index_metadata'], + field_security: { grant: ['*'], except: [] }, + }, + ], + run_as: [], + }, + kibana: [], + }, + test_filebeat_reader: { + elasticsearch: { + cluster: [], + indices: [ + { + names: ['filebeat*'], + privileges: ['read', 'view_index_metadata'], + field_security: { grant: ['*'], except: [] }, + }, + ], + run_as: [], + }, + kibana: [], + }, + + global_canvas_all: { + kibana: [ + { + feature: { + canvas: ['all'], + visualize: ['all'], + }, + spaces: ['*'], + }, + ], + }, + + global_discover_all: { + kibana: [ + { + feature: { + discover: ['all'], + }, + spaces: ['*'], + }, + ], + }, + + global_dashboard_read: { + kibana: [ + { + feature: { + dashboard: ['read'], + }, + spaces: ['*'], + }, + ], + }, + + global_discover_read: { + kibana: [ + { + feature: { + discover: ['read'], + }, + spaces: ['*'], + }, + ], + }, + global_visualize_read: { + kibana: [ + { + feature: { + visualize: ['read'], + }, + spaces: ['*'], + }, + ], + }, + global_visualize_all: { + kibana: [ + { + feature: { + visualize: ['all'], + }, + spaces: ['*'], + }, + ], + }, + global_dashboard_all: { + kibana: [ + { + feature: { + dashboard: ['all'], + }, + spaces: ['*'], + }, + ], + }, + global_maps_all: { + kibana: [ + { + feature: { + maps: ['all'], + }, + spaces: ['*'], + }, + ], + }, + + global_maps_read: { + kibana: [ + { + feature: { + maps: ['read'], + }, + spaces: ['*'], + }, + ], + }, + + geoshape_data_reader: { + elasticsearch: { + indices: [ + { + names: ['geo_shapes*'], + privileges: ['read', 'view_index_metadata'], + }, + ], + }, + }, + antimeridian_points_reader: { + elasticsearch: { + indices: [ + { + names: ['antimeridian_points*'], + privileges: ['read', 'view_index_metadata'], + }, + ], + }, + }, + antimeridian_shapes_reader: { + elasticsearch: { + indices: [ + { + names: ['antimeridian_shapes*'], + privileges: ['read', 'view_index_metadata'], + }, + ], + }, + }, + + meta_for_geoshape_data_reader: { + elasticsearch: { + indices: [ + { + names: ['meta_for_geo_shapes*'], + privileges: ['read', 'view_index_metadata'], + }, + ], + }, + }, + + geoconnections_data_reader: { + elasticsearch: { + indices: [ + { + names: ['connections*'], + privileges: ['read', 'view_index_metadata'], + }, + ], + }, + }, + + test_logs_data_reader: { + elasticsearch: { + indices: [ + { + names: ['test_data_stream'], + privileges: ['read', 'view_index_metadata'], + }, + ], + }, + }, + + geoall_data_writer: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: [ + 'create', + 'read', + 'view_index_metadata', + 'monitor', + 'create_index', + 'manage', + ], + }, + ], + }, + }, + + global_index_pattern_management_all: { + kibana: [ + { + feature: { + indexPatterns: ['all'], + }, + spaces: ['*'], + }, + ], + }, + + global_devtools_read: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['read', 'all'], + }, + ], + }, + kibana: [ + { + feature: { + dev_tools: ['read'], + }, + spaces: ['*'], + }, + ], + }, + + global_upgrade_assistant_role: { + elasticsearch: { + cluster: ['manage'], + }, + kibana: [ + { + feature: { + discover: ['read'], + }, + spaces: ['*'], + }, + ], + }, + + // using this role even for remote clusters + global_ccr_role: { + elasticsearch: { + cluster: ['manage', 'manage_ccr'], + }, + kibana: [ + { + base: ['all'], + spaces: ['*'], + }, + ], + }, + manage_rollups_role: { + elasticsearch: { + cluster: ['manage', 'manage_rollup'], + indices: [ + { + names: ['*'], + privileges: ['read', 'delete', 'create_index', 'view_index_metadata'], + }, + ], + }, + kibana: [ + { + feature: { + discover: ['read'], + }, + spaces: ['*'], + }, + ], + }, + + test_rollup_reader: { + elasticsearch: { + indices: [ + { + names: ['rollup-*', 'regular-index*'], + privileges: ['read', 'view_index_metadata'], + }, + ], + }, + }, + + // Kibana feature privilege isn't specific to advancedSetting. It can be anything. https://github.com/elastic/kibana/issues/35965 + test_api_keys: { + elasticsearch: { + cluster: ['manage_security', 'manage_api_key'], + }, + kibana: [ + { + feature: { + advancedSettings: ['read'], + }, + spaces: ['default'], + }, + ], + }, + + manage_security: { + elasticsearch: { + cluster: ['manage_security'], + }, + }, + + cluster_security_manager: { + elasticsearch: { + cluster: ['manage_security'], + }, + kibana: [ + { + feature: { + advancedSettings: ['read'], + }, + spaces: ['*'], + }, + ], + }, + + ccr_user: { + elasticsearch: { + cluster: ['manage', 'manage_ccr'], + }, + }, + // There is an issue open for follower_index_user permissions not working correctly + // in kibana. + // https://github.com/elastic/kibana/issues/143720 + // follower_index_user: { + // elasticsearch: { + // cluster: ['monitor', 'manage', 'manage_ccr', 'transport_client', 'read_ccr', 'all'], + // indices: [ + // { + // names: ['*'], + // privileges: [ + // 'write', + // 'monitor', + // 'manage_follow_index', + // 'manage_leader_index', + // 'read', + // 'view_index_metadata', + // ], + // }, + // ], + // }, + // kibana: [ + // { + // base: ['all'], + // spaces: ['*'], + // }, + // ], + // }, + + manage_ilm: { + elasticsearch: { + cluster: ['manage_ilm'], + }, + kibana: [ + { + feature: { + advancedSettings: ['read'], + }, + spaces: ['default'], + }, + ], + }, + + read_ilm: { + elasticsearch: { + cluster: ['read_ilm'], + }, + kibana: [ + { + feature: { + advancedSettings: ['read'], + }, + spaces: ['default'], + }, + ], + }, + + index_management_user: { + elasticsearch: { + cluster: ['monitor', 'manage_index_templates', 'manage_enrich'], + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + advancedSettings: ['read'], + }, + spaces: ['*'], + }, + ], + }, + // https://www.elastic.co/guide/en/elasticsearch/reference/master/snapshots-register-repository.html#snapshot-repo-prereqs + snapshot_restore_user: { + elasticsearch: { + cluster: [ + 'monitor', + 'manage_slm', + 'cluster:admin/snapshot', + 'cluster:admin/repository', + 'manage_index_templates', + ], + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + advancedSettings: ['read'], + }, + spaces: ['*'], + }, + ], + }, + + ingest_pipelines_user: { + elasticsearch: { + cluster: ['manage_pipeline', 'cluster:monitor/nodes/info'], + }, + kibana: [ + { + feature: { + advancedSettings: ['read'], + }, + spaces: ['*'], + }, + ], + }, + + manage_processors_user: { + elasticsearch: { + cluster: ['manage'], + }, + kibana: [ + { + feature: { + advancedSettings: ['read'], + }, + spaces: ['*'], + }, + ], + }, + + license_management_user: { + elasticsearch: { + cluster: ['manage'], + }, + }, + + logstash_read_user: { + elasticsearch: { + cluster: ['manage_logstash_pipelines'], + }, + }, + + remote_clusters_user: { + elasticsearch: { + cluster: ['manage'], + }, + }, + + global_alerts_logs_all_else_read: { + kibana: [ + { + feature: { + apm: ['read'], + logs: ['all'], + infrastructure: ['read'], + }, + spaces: ['*'], + }, + ], + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + }, + + slo_all: { + kibana: [ + { + feature: { + slo: ['all'], + }, + spaces: ['*'], + }, + ], + elasticsearch: { + cluster: ['all'], + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + }, + slo_read_only: { + kibana: [ + { + feature: { + slo: ['read'], + }, + spaces: ['*'], + }, + ], + elasticsearch: { + cluster: ['all'], + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + }, + }, + defaultRoles: ['superuser'], + }, + }; +} diff --git a/x-pack/platform/test/functional/config.edge.ts b/x-pack/platform/test/functional/config.edge.ts new file mode 100644 index 000000000000..82d5e7c0ae9f --- /dev/null +++ b/x-pack/platform/test/functional/config.edge.ts @@ -0,0 +1,24 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const firefoxConfig = await readConfigFile(require.resolve('./config.firefox.ts')); + + return { + ...firefoxConfig.getAll(), + + browser: { + type: 'msedge', + }, + + junit: { + reportName: 'MS Chromium Edge XPack UI Functional Tests', + }, + }; +} diff --git a/x-pack/platform/test/functional/config.firefox.ts b/x-pack/platform/test/functional/config.firefox.ts new file mode 100644 index 000000000000..a499016ff588 --- /dev/null +++ b/x-pack/platform/test/functional/config.firefox.ts @@ -0,0 +1,31 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const chromeConfig = await readConfigFile(require.resolve('./config.base.ts')); + + return { + ...chromeConfig.getAll(), + + testFiles: [], + + browser: { + type: 'firefox', + }, + + suiteTags: { + include: ['includeFirefox'], + exclude: ['skipFirefox'], + }, + + junit: { + reportName: 'Firefox XPack UI Functional Tests', + }, + }; +} diff --git a/x-pack/platform/test/functional/config_security_basic.ts b/x-pack/platform/test/functional/config_security_basic.ts new file mode 100644 index 000000000000..faff4e79869c --- /dev/null +++ b/x-pack/platform/test/functional/config_security_basic.ts @@ -0,0 +1,74 @@ +/* + * 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. + */ + +/* eslint-disable import/no-default-export */ + +import { resolve } from 'path'; + +import { ScoutTestRunConfigCategory } from '@kbn/scout-info'; +import { FtrConfigProviderContext } from '@kbn/test'; +import { services } from './services'; +import { pageObjects } from './page_objects'; + +// the default export of config files must be a config provider +// that returns an object with the projects config values +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const kibanaCommonConfig = await readConfigFile( + require.resolve('@kbn/test-suites-src/common/config') + ); + const kibanaFunctionalConfig = await readConfigFile( + require.resolve('@kbn/test-suites-src/functional/config.base') + ); + + return { + testConfigCategory: ScoutTestRunConfigCategory.UI_TEST, + // list paths to the files that contain your plugins tests + testFiles: [], + + services, + pageObjects, + + servers: kibanaFunctionalConfig.get('servers'), + + esTestCluster: { + license: 'basic', + from: 'snapshot', + serverArgs: [], + }, + + kbnTestServer: { + ...kibanaCommonConfig.get('kbnTestServer'), + serverArgs: [ + ...kibanaCommonConfig.get('kbnTestServer.serverArgs'), + '--server.uuid=5b2de169-2785-441b-ae8c-186a1936b17d', + '--xpack.security.encryptionKey="wuGNaIhoMpk5sO4UBxgr3NyW1sFcLgIf"', // server restarts should not invalidate active sessions + ], + }, + uiSettings: { + defaults: { + 'accessibility:disableAnimations': true, + 'dateFormat:tz': 'UTC', + }, + }, + // the apps section defines the urls that + // `PageObjects.common.navigateTo(appKey)` will use. + // Merge urls for your plugin with the urls defined in + // Kibana's config in order to use this helper + apps: { + ...kibanaFunctionalConfig.get('apps'), + }, + + // choose where screenshots should be saved + screenshots: { + directory: resolve(__dirname, 'screenshots'), + }, + + junit: { + reportName: 'Chrome X-Pack UI Functional Tests (Security Basic)', + }, + }; +} diff --git a/x-pack/platform/test/functional/ftr_provider_context.ts b/x-pack/platform/test/functional/ftr_provider_context.ts new file mode 100644 index 000000000000..e757164fa1de --- /dev/null +++ b/x-pack/platform/test/functional/ftr_provider_context.ts @@ -0,0 +1,14 @@ +/* + * 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 { GenericFtrProviderContext, GenericFtrService } from '@kbn/test'; + +import { pageObjects } from './page_objects'; +import { services } from './services'; + +export type FtrProviderContext = GenericFtrProviderContext; +export class FtrService extends GenericFtrService {} diff --git a/x-pack/platform/test/functional/page_objects/index.ts b/x-pack/platform/test/functional/page_objects/index.ts new file mode 100644 index 000000000000..635e299fdd06 --- /dev/null +++ b/x-pack/platform/test/functional/page_objects/index.ts @@ -0,0 +1,14 @@ +/* + * 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 { pageObjects as kibanaFunctionalPageObjects } from '@kbn/test-suites-src/functional/page_objects'; + +// just like services, PageObjects are defined as a map of +// names to Providers. Merge in Kibana's or pick specific ones +export const pageObjects = { + ...kibanaFunctionalPageObjects, +}; diff --git a/x-pack/platform/test/functional/services/index.ts b/x-pack/platform/test/functional/services/index.ts new file mode 100644 index 000000000000..fd6bd5c182f0 --- /dev/null +++ b/x-pack/platform/test/functional/services/index.ts @@ -0,0 +1,21 @@ +/* + * 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 { services as kibanaFunctionalServices } from '@kbn/test-suites-src/functional/services'; +import { services as kibanaApiIntegrationServices } from '@kbn/test-suites-src/api_integration/services'; +import { services as kibanaXPackApiIntegrationServices } from '../../api_integration/services'; + +// define the name and providers for services that should be +// available to your tests. If you don't specify anything here +// only the built-in services will be available +export const services = { + ...kibanaFunctionalServices, + supertest: kibanaApiIntegrationServices.supertest, + supertestWithoutAuth: kibanaXPackApiIntegrationServices.supertestWithoutAuth, + esSupertest: kibanaApiIntegrationServices.esSupertest, + dataViewApi: kibanaXPackApiIntegrationServices.dataViewApi, +};