diff --git a/.buildkite/ftr_oblt_serverless_configs.yml b/.buildkite/ftr_oblt_serverless_configs.yml index 0cb51e7870352..0970e108c7b73 100644 --- a/.buildkite/ftr_oblt_serverless_configs.yml +++ b/.buildkite/ftr_oblt_serverless_configs.yml @@ -1,28 +1,28 @@ disabled: # Base config files, only necessary to inform config finding script - - x-pack/test_serverless/functional/test_suites/observability/cypress/oblt_config.base.ts + - x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/oblt_config.base.ts - x-pack/platform/test/serverless/functional/config.oblt.base.ts - x-pack/platform/test/serverless/functional/config.logs_essentials.base.ts # Cypress configs, for now these are still run manually - - x-pack/test_serverless/functional/test_suites/observability/cypress/config_headless.ts - - x-pack/test_serverless/functional/test_suites/observability/cypress/config_runner.ts + - x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/config_headless.ts + - x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/config_runner.ts # Observability AI Assistant local-only tests - x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.serverless.config.ts defaultQueue: 'n2-4-spot' enabled: - - x-pack/test_serverless/api_integration/test_suites/observability/config.ts - - x-pack/test_serverless/api_integration/test_suites/observability/config.logs_essentials.ts - - x-pack/test_serverless/api_integration/test_suites/observability/config.feature_flags.ts + - x-pack/solutions/observability/test/serverless/api_integration/configs/config.ts + - x-pack/solutions/observability/test/serverless/api_integration/configs/config.logs_essentials.ts + - x-pack/solutions/observability/test/serverless/api_integration/configs/config.feature_flags.ts - x-pack/platform/test/serverless/api_integration/configs/observability/config.group1.ts - x-pack/platform/test/serverless/api_integration/configs/observability/config.logs_essentials.group1.ts - - x-pack/test_serverless/api_integration/test_suites/observability/fleet/config.ts - - x-pack/test_serverless/functional/test_suites/observability/config.ts - - x-pack/test_serverless/functional/test_suites/observability/config.logs_essentials.ts + - x-pack/solutions/observability/test/serverless/api_integration/test_suites/fleet/config.ts + - x-pack/solutions/observability/test/serverless/functional/configs/config.ts + - x-pack/solutions/observability/test/serverless/functional/configs/config.logs_essentials.ts - x-pack/platform/test/serverless/functional/configs/observability/config.examples.ts - - x-pack/test_serverless/functional/test_suites/observability/config.feature_flags.ts + - x-pack/solutions/observability/test/serverless/functional/configs/config.feature_flags.ts - x-pack/platform/test/serverless/functional/configs/observability/config.saved_objects_management.ts - x-pack/platform/test/serverless/functional/configs/observability/config.context_awareness.ts - x-pack/platform/test/serverless/functional/configs/observability/config.config_compat_mode.ts @@ -39,8 +39,8 @@ enabled: - x-pack/platform/test/serverless/functional/configs/observability/config.group11.ts - x-pack/platform/test/serverless/functional/configs/observability/config.group12.ts - x-pack/platform/test/serverless/functional/configs/observability/config.logs_essentials.group1.ts - - x-pack/test_serverless/functional/test_suites/observability/config.screenshots.ts - - x-pack/test_serverless/functional/test_suites/observability/config.telemetry.ts + - x-pack/solutions/observability/test/serverless/functional/configs/config.screenshots.ts + - x-pack/solutions/observability/test/serverless/functional/configs/config.telemetry.ts # serverless config files that run deployment-agnostic tests - x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.serverless.config.ts - x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant.serverless.config.ts diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e3ac05d52b26e..3c98054ce7bfd 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1388,11 +1388,16 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions # Observability UI -/x-pack/test_serverless/api_integration/test_suites/observability/config.ts @elastic/observability-ui @elastic/appex-qa -/x-pack/test_serverless/api_integration/test_suites/observability/index.ts @elastic/observability-ui -/x-pack/test_serverless/api_integration/test_suites/observability/config.logs_essentials.ts @elastic/observability-ui @elastic/appex-qa -/x-pack/test_serverless/api_integration/test_suites/observability/index.logs_essentials.ts @elastic/observability-ui -/x-pack/test_serverless/api_integration/test_suites/observability/logs_essentials_only @elastic/observability-ui +/x-pack/solutions/observability/test/serverless/api_integration/ftr_provider_context.d.ts @elastic/observability-ui +/x-pack/solutions/observability/test/serverless/api_integration/services/ @elastic/observability-ui +/x-pack/solutions/observability/test/serverless/api_integration/configs/config.ts @elastic/observability-ui @elastic/appex-qa +/x-pack/solutions/observability/test/serverless/api_integration/configs/index.ts @elastic/observability-ui +/x-pack/solutions/observability/test/serverless/api_integration/configs/config.logs_essentials.ts @elastic/observability-ui @elastic/appex-qa +/x-pack/solutions/observability/test/serverless/api_integration/configs/index.logs_essentials.ts @elastic/observability-ui +/x-pack/solutions/observability/test/serverless/api_integration/test_suites/logs_essentials_only @elastic/observability-ui +/x-pack/solutions/observability/test/serverless/functional/services/ @elastic/observability-ui +/x-pack/solutions/observability/test/serverless/functional/page_objects/ @elastic/observability-ui +/x-pack/solutions/observability/test/serverless/functional/ftr_provider_context.d.ts @elastic/observability-ui /x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.logs_essentials.index.ts @elastic/observability-ui /x-pack/platform/test/api_integration_deployment_agnostic/configs/serverless/oblt.logs_essentials.serverless.config.ts @elastic/observability-ui /x-pack/solutions/observability/test/kibana.jsonc @elastic/observability-ui @@ -1475,7 +1480,7 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions /x-pack/solutions/observability/plugins/infra/server/services @elastic/obs-ux-infra_services-team /x-pack/solutions/observability/plugins/infra/server/usage @elastic/obs-ux-infra_services-team /x-pack/solutions/observability/plugins/infra/server/utils @elastic/obs-ux-infra_services-team -/x-pack/test_serverless/functional/test_suites/observability/infra @elastic/obs-ux-infra_services-team +/x-pack/solutions/observability/test/serverless/functional/test_suites/infra @elastic/obs-ux-infra_services-team /x-pack/solutions/observability/plugins/observability/public/pages/overview @elastic/obs-ux-infra_services-team # Assigned to this team since it mostly uses infra/APM components /src/platform/plugins/shared/unified_doc_viewer/public/components/observability/traces @elastic/obs-ux-infra_services-team /src/platform/plugins/shared/unified_doc_viewer/public/components/observability/attributes @elastic/obs-ux-infra_services-team @@ -1538,7 +1543,7 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions /x-pack/solutions/observability/plugins/infra/server/lib/alerting @elastic/obs-ux-management-team /x-pack/test_serverless/**/test_suites/observability/custom_threshold_rule/ @elastic/obs-ux-management-team /x-pack/test_serverless/**/test_suites/observability/slos/ @elastic/obs-ux-management-team -/x-pack/test_serverless/api_integration/test_suites/observability/es_query_rule @elastic/obs-ux-management-team +/x-pack/solutions/observability/test/serverless/api_integration/test_suites/es_query_rule @elastic/obs-ux-management-team /x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/ @elastic/obs-ux-management-team /x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/ @elastic/obs-ux-management-team /x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/alerting_api @elastic/obs-ux-management-team @@ -1583,7 +1588,7 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions /src/dev/build/tasks/bundle_fleet_packages.ts @elastic/fleet @elastic/kibana-operations /x-pack/platform/plugins/shared/fleet/server/services/elastic_agent_manifest.ts @elastic/fleet @elastic/obs-cloudnative-monitoring /x-pack/test_serverless/**/test_suites/**/fleet/ @elastic/fleet -/x-pack/platform/test/serverless/**/test_suites/fleet/ @elastic/fleet +/x-pack/**/test/serverless/**/test_suites/fleet/ @elastic/fleet /x-pack/platform/test/serverless/api_integration/services/default_fleet_setup.ts @elastic/fleet # APM @@ -1595,7 +1600,7 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions /src/apm.js @elastic/kibana-core @vigneshshanmugam /src/platform/packages/shared/kbn-utility-types/src/dot.ts @dgieselaar /src/platform/packages/shared/kbn-utility-types/src/dot_test.ts @dgieselaar -/x-pack/test_serverless/api_integration/test_suites/observability/apm_api_integration/ @elastic/obs-ux-infra_services-team +/x-pack/solutions/observability/test/serverless/api_integration/test_suites/apm_api_integration/ @elastic/obs-ux-infra_services-team /x-pack/solutions/observability/test/apm_api_integration/ @elastic/obs-ux-infra_services-team #CC# /src/plugins/apm_oss/ @elastic/apm-ui #CC# /x-pack/plugins/observability_solution/observability/ @elastic/apm-ui @@ -1613,36 +1618,36 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions /x-pack/solutions/observability/test/api_integration/apis/synthetics @elastic/obs-ux-management-team /x-pack/solutions/observability/test/alerting_api_integration/observability/synthetics_rule.ts @elastic/obs-ux-management-team /x-pack/solutions/observability/test/alerting_api_integration/observability/index.ts @elastic/obs-ux-management-team -/x-pack/test_serverless/api_integration/test_suites/observability/synthetics @elastic/obs-ux-management-team +/x-pack/solutions/observability/test/serverless/api_integration/test_suites/synthetics @elastic/obs-ux-management-team # Observability-ui folder level permissions (need to be before individual files inside the folder) -/x-pack/test_serverless/functional/test_suites/observability @elastic/observability-ui +/x-pack/solutions/observability/test/serverless/functional/test_suites @elastic/observability-ui /src/platform/test/functional/apps/discover/observability @elastic/observability-ui # obs-ux-logs-team /x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality @elastic/obs-ux-logs-team -/x-pack/test_serverless/functional/test_suites/observability/config.* @elastic/obs-ux-logs-team -/x-pack/test_serverless/functional/test_suites/observability/landing_page.ts @elastic/obs-ux-logs-team -/x-pack/test_serverless/functional/test_suites/observability/navigation.ts @elastic/obs-ux-logs-team +/x-pack/solutions/observability/test/serverless/functional/configs/config.* @elastic/obs-ux-logs-team +/x-pack/solutions/observability/test/serverless/functional/test_suites/landing_page.ts @elastic/obs-ux-logs-team +/x-pack/solutions/observability/test/serverless/functional/test_suites/navigation.ts @elastic/obs-ux-logs-team /x-pack/test/functional/page_objects/dataset_quality.ts @elastic/obs-ux-logs-team /x-pack/solutions/observability/test/functional/page_objects/dataset_quality.ts @elastic/obs-ux-logs-team -/x-pack/test_serverless/functional/test_suites/observability/index* @elastic/obs-ux-logs-team -/x-pack/test_serverless/functional/test_suites/observability/cypress @elastic/obs-ux-logs-team +/x-pack/solutions/observability/test/serverless/functional/configs/index* @elastic/obs-ux-logs-team +/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress @elastic/obs-ux-logs-team /x-pack/solutions/observability/test/functional/services/infra_source_configuration_form.ts @elastic/obs-ux-infra_services-team /x-pack/solutions/observability/test/functional/services/logs_ui @elastic/obs-ux-logs-team /x-pack/test/functional/page_objects/observability_logs_explorer.ts @elastic/obs-ux-logs-team /x-pack/solutions/observability/test/functional/page_objects/observability_logs_explorer.ts @elastic/obs-ux-logs-team /src/platform/test/functional/services/selectable.ts @elastic/obs-ux-logs-team /x-pack/solutions/observability/test/observability_onboarding_api_integration @elastic/obs-ux-logs-team -/x-pack/test_serverless/api_integration/test_suites/observability/index.feature_flags.ts @elastic/obs-ux-logs-team +/x-pack/solutions/observability/test/serverless/api_integration/configs/index.feature_flags.ts @elastic/obs-ux-logs-team /x-pack/solutions/observability/test/api_integration/apis/logs_ui @elastic/obs-ux-logs-team /x-pack/solutions/observability/test/dataset_quality_api_integration @elastic/obs-ux-logs-team -/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration @elastic/obs-ux-logs-team +/x-pack/solutions/observability/test/serverless/api_integration/test_suites/dataset_quality_api_integration @elastic/obs-ux-logs-team /x-pack/test/functional/apps/observability_logs_explorer @elastic/obs-ux-logs-team -/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer @elastic/obs-ux-logs-team +/x-pack/solutions/observability/test/serverless/functional/test_suites/observability_logs_explorer @elastic/obs-ux-logs-team /x-pack/solutions/observability/test/functional/apps/dataset_quality @elastic/obs-ux-logs-team -/x-pack/test_serverless/functional/test_suites/observability/dataset_quality @elastic/obs-ux-logs-team -/x-pack/test_serverless/functional/test_suites/observability/discover @elastic/obs-ux-logs-team @elastic/kibana-data-discovery +/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality @elastic/obs-ux-logs-team +/x-pack/solutions/observability/test/serverless/functional/test_suites/discover @elastic/obs-ux-logs-team @elastic/kibana-data-discovery /src/platform/plugins/shared/unified_doc_viewer/public/components/doc_viewer_logs_overview @elastic/obs-ux-logs-team /x-pack/solutions/observability/test/api_integration/apis/logs_shared @elastic/obs-ux-logs-team /src/platform/test/functional/apps/discover/observability/embeddable @elastic/obs-ux-logs-team @@ -1652,7 +1657,7 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions /x-pack/solutions/observability/test/functional/config.firefox.ts @elastic/obs-ux-logs-team # Observability-ui -/x-pack/test_serverless/api_integration/test_suites/observability/index.ts @elastic/observability-ui +/x-pack/solutions/observability/test/serverless/api_integration/configs/index.ts @elastic/observability-ui /x-pack/solutions/observability/test/functional_solution_sidenav/ @elastic/observability-ui /x-pack/solutions/observability/test/functional/page_objects/observability_page.ts @elastic/observability-ui /x-pack/test_serverless/**/test_suites/observability/config.ts @elastic/observability-ui @@ -2145,7 +2150,7 @@ x-pack/platform/plugins/private/cloud_integrations/cloud_full_story/server/confi /x-pack/platform/test/api_integration/apis/cloud @elastic/kibana-security # Assigned per https://github.com/elastic/kibana/pull/198444 /src/platform/test/plugin_functional/snapshots/baseline/hardening @elastic/kibana-security # Assigned per https://github.com/elastic/kibana/pull/190716 /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/solutions/observability/test/serverless/functional/test_suites/role_management @elastic/kibana-security /x-pack/platform/test/functional/config_security_basic.ts @elastic/kibana-security /x-pack/platform/test/functional/page_objects/user_profile_page.ts @elastic/kibana-security /x-pack/platform/test/functional/page_objects/space_selector_page.ts @elastic/kibana-security @@ -2198,14 +2203,14 @@ x-pack/platform/plugins/private/cloud_integrations/cloud_full_story/server/confi /x-pack/platform/test/saved_object_api_integration/ @elastic/kibana-security /x-pack/test_serverless/**/test_suites/common/platform_security/ @elastic/kibana-security /x-pack/test_serverless/**/test_suites/search/platform_security/ @elastic/kibana-security -/x-pack/platform/test/serverless/**/test_suites/platform_security/ @elastic/kibana-security +/x-pack/**/test/serverless/**/test_suites/platform_security/ @elastic/kibana-security /x-pack/test_serverless/**/test_suites/observability/platform_security/ @elastic/kibana-security /src/core/packages/http/server-internal/src/cdn_config/ @elastic/kibana-security @elastic/kibana-core /x-pack/test_serverless/functional/test_suites/security/config.ts @elastic/kibana-security @elastic/appex-qa /x-pack/test_serverless/functional/test_suites/security/config.mki_only.ts @elastic/kibana-security @elastic/appex-qa /x-pack/test_serverless/functional/test_suites/security/index.mki_only.ts @elastic/kibana-security @elastic/appex-qa @elastic/kibana-cloud-security-posture /x-pack/test_serverless/functional/test_suites/security/config.feature_flags.ts @elastic/kibana-security -/x-pack/test_serverless/api_integration/test_suites/observability/config.feature_flags.ts @elastic/kibana-security +/x-pack/solutions/observability/test/serverless/api_integration/configs/config.feature_flags.ts @elastic/kibana-security /x-pack/platform/test/serverless/functional/test_suites/spaces/multiple_spaces_enabled.ts @elastic/kibana-security /x-pack/platform/test/serverless/functional/page_objects/svl_management_page.ts @elastic/kibana-security @@ -2219,8 +2224,8 @@ x-pack/platform/plugins/private/cloud_integrations/cloud_full_story/server/confi /x-pack/platform/test/fixtures/es_archives/task_manager* @elastic/response-ops # Assigned per https://github.com/elastic/kibana/blob/assign-response-ops/x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/kibana.jsonc#L4 /x-pack/platform/test/plugin_api_perf @elastic/response-ops # Assigned per https://github.com/elastic/kibana/blob/assign-response-ops/x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/kibana.jsonc#L4 /x-pack/platform/test/functional/page_objects/maintenance_windows_page.ts @elastic/response-ops -/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/index.ts @elastic/response-ops -/x-pack/test_serverless/functional/test_suites/observability/rules/rules_list.ts @elastic/response-ops +/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/index.ts @elastic/response-ops +/x-pack/solutions/observability/test/serverless/functional/test_suites/rules/rules_list.ts @elastic/response-ops /x-pack/platform/test/functional_with_es_ssl/config.base.ts @elastic/response-ops # Assigned per https://github.com/elastic/kibana/pull/197070 /x-pack/platform/test/functional_with_es_ssl/lib/alert_api_actions.ts @elastic/response-ops /x-pack/platform/test/functional_with_es_ssl/lib/get_test_data.ts @elastic/response-ops @@ -2248,7 +2253,7 @@ x-pack/platform/plugins/private/cloud_integrations/cloud_full_story/server/confi /x-pack/platform/test/accessibility/apps/group3/rules_connectors.ts @elastic/response-ops /x-pack/platform/test/serverless/functional/page_objects/svl_triggers_actions_ui_page.ts @elastic/response-ops /x-pack/platform/test/serverless/functional/page_objects/svl_rule_details_ui_page.ts @elastic/response-ops -/x-pack/test_serverless/functional/page_objects/svl_oblt_overview_page.ts @elastic/response-ops +/x-pack/solutions/observability/test/serverless/functional/page_objects/svl_oblt_overview_page.ts @elastic/response-ops /x-pack/platform/test/alerting_api_integration/ @elastic/response-ops /x-pack/solutions/observability/test/alerting_api_integration/observability @elastic/obs-ux-management-team /x-pack/platform/test/plugin_api_integration/test_suites/task_manager/ @elastic/response-ops @@ -2264,15 +2269,15 @@ x-pack/platform/plugins/private/cloud_integrations/cloud_full_story/server/confi /x-pack/platform/test/api_integration/apis/cases/ @elastic/kibana-cases /x-pack/solutions/observability/test/api_integration/apis/cases/ @elastic/kibana-cases /x-pack/solutions/security/test/api_integration/apis/cases/ @elastic/kibana-cases -/x-pack/test_serverless/functional/test_suites/observability/cases @elastic/kibana-cases +/x-pack/solutions/observability/test/serverless/functional/test_suites/cases @elastic/kibana-cases /x-pack/solutions/search/test/serverless/functional/test_suites/cases/ @elastic/kibana-cases /x-pack/test_serverless/functional/test_suites/security/ftr/cases/ @elastic/kibana-cases /x-pack/solutions/search/test/serverless/api_integration/cases/ @elastic/kibana-cases -/x-pack/test_serverless/api_integration/test_suites/observability/cases/ @elastic/kibana-cases +/x-pack/solutions/observability/test/serverless/api_integration/test_suites/cases/ @elastic/kibana-cases /x-pack/test_serverless/api_integration/test_suites/security/cases/ @elastic/kibana-cases /x-pack/solutions/search/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs @elastic/response-ops /x-pack/test_serverless/functional/test_suites/security/screenshot_creation/response_ops_docs @elastic/response-ops -/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs @elastic/response-ops +/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs @elastic/response-ops /x-pack/platform/test/serverless/api_integration/test_suites/alerting/ @elastic/response-ops /x-pack/platform/test/fixtures/es_archives/action_task_params @elastic/response-ops /x-pack/platform/test/fixtures/es_archives/actions @elastic/response-ops diff --git a/x-pack/platform/plugins/shared/dataset_quality/README.md b/x-pack/platform/plugins/shared/dataset_quality/README.md index 4233cdb22be17..b2d5d0891e6a2 100755 --- a/x-pack/platform/plugins/shared/dataset_quality/README.md +++ b/x-pack/platform/plugins/shared/dataset_quality/README.md @@ -117,17 +117,17 @@ yarn test:ftr:runner --config ./x-pack/solutions/observability/test/functional/a ##### Server ``` -yarn test:ftr:server --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts +yarn test:ftr:server --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts ``` ##### Runner ``` -yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/dataset_quality/index.ts +yarn test:ftr:runner --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts --include ./x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/index.ts ``` ##### Running Individual Tests ``` -yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/dataset_quality/$1 +yarn test:ftr:runner --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts --include ./x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/$1 ``` diff --git a/x-pack/platform/plugins/shared/fleet/README.md b/x-pack/platform/plugins/shared/fleet/README.md index 2f48a0d748373..d1c7e9832ddcd 100644 --- a/x-pack/platform/plugins/shared/fleet/README.md +++ b/x-pack/platform/plugins/shared/fleet/README.md @@ -213,8 +213,8 @@ FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:runner --config x-pack/test_ser Observability: ```sh -FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:server --config x-pack/test_serverless/api_integration/test_suites/observability/fleet/config.ts -FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:runner --config x-pack/test_serverless/api_integration/test_suites/observability/fleet/config.ts +FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:server --config x-pack/solutions/observability/test/serverless/api_integration/test_suites/fleet/config.ts +FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:runner --config x-pack/solutions/observability/test/serverless/api_integration/test_suites/fleet/config.ts ``` #### Cypress tests diff --git a/x-pack/platform/test/serverless/shared/lib/cases/helpers.ts b/x-pack/platform/test/serverless/shared/lib/cases/helpers.ts new file mode 100644 index 0000000000000..71df12e44d78a --- /dev/null +++ b/x-pack/platform/test/serverless/shared/lib/cases/helpers.ts @@ -0,0 +1,80 @@ +/* + * 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 { SECURITY_SOLUTION_OWNER } from '@kbn/cases-plugin/common'; +import { AppDeepLinkId } from '@kbn/core-chrome-browser'; +import { FtrProviderContext } from '../../../functional/ftr_provider_context'; + +export const createOneCaseBeforeDeleteAllAfter = ( + getPageObject: FtrProviderContext['getPageObject'], + getService: FtrProviderContext['getService'], + owner: string +) => { + const svlCases = getService('svlCases'); + + before(async () => { + await createAndNavigateToCase(getPageObject, getService, owner); + }); + + after(async () => { + await svlCases.api.deleteAllCaseItems(); + }); +}; + +export const createOneCaseBeforeEachDeleteAllAfterEach = ( + getPageObject: FtrProviderContext['getPageObject'], + getService: FtrProviderContext['getService'], + owner: string +) => { + const svlCases = getService('svlCases'); + + beforeEach(async () => { + await createAndNavigateToCase(getPageObject, getService, owner); + }); + + afterEach(async () => { + await svlCases.api.deleteAllCaseItems(); + }); +}; + +export const createAndNavigateToCase = async ( + getPageObject: FtrProviderContext['getPageObject'], + getService: FtrProviderContext['getService'], + owner: string +) => { + const cases = getService('cases'); + + const header = getPageObject('header'); + + await navigateToCasesApp(getPageObject, getService, owner); + + const theCase = await cases.api.createCase({ owner }); + await cases.casesTable.waitForCasesToBeListed(); + await cases.casesTable.goToFirstListedCase(); + await header.waitUntilLoadingHasFinished(); + + return theCase; +}; + +export const navigateToCasesApp = async ( + getPageObject: FtrProviderContext['getPageObject'], + getService: FtrProviderContext['getService'], + owner: string +) => { + const common = getPageObject('common'); + const svlCommonNavigation = getPageObject('svlCommonNavigation'); + + await common.navigateToApp('landingPage'); + + if (owner === SECURITY_SOLUTION_OWNER) { + await svlCommonNavigation.sidenav.clickLink({ + deepLinkId: 'securitySolutionUI:cases' as AppDeepLinkId, + }); + } else { + await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'observability-overview:cases' }); + } +}; diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/utils/index.ts b/x-pack/platform/test/serverless/shared/lib/cases/index.ts similarity index 82% rename from x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/utils/index.ts rename to x-pack/platform/test/serverless/shared/lib/cases/index.ts index 1558d4efc8133..6c315f929b9bb 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/utils/index.ts +++ b/x-pack/platform/test/serverless/shared/lib/cases/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { expectToReject } from './expect_to_reject'; +export * from './helpers'; diff --git a/x-pack/platform/test/tsconfig.json b/x-pack/platform/test/tsconfig.json index 646230f105cb2..483eaa4d77db8 100644 --- a/x-pack/platform/test/tsconfig.json +++ b/x-pack/platform/test/tsconfig.json @@ -164,6 +164,7 @@ "@kbn/console-plugin", "@kbn/serverless-common-settings", "@kbn/core-saved-objects-import-export-server-internal", + "@kbn/core-chrome-browser", "@kbn/licensing-types", "@kbn/product-intercept-plugin", ] diff --git a/x-pack/solutions/observability/plugins/apm/dev_docs/testing.md b/x-pack/solutions/observability/plugins/apm/dev_docs/testing.md index e326be95b8e75..691cbf40fddc8 100644 --- a/x-pack/solutions/observability/plugins/apm/dev_docs/testing.md +++ b/x-pack/solutions/observability/plugins/apm/dev_docs/testing.md @@ -190,17 +190,17 @@ diff --git a/x-pack/solutions/observability/plugins/apm/scripts/test/README.md b #### Start server and run tests (single process) ``` -node scripts/functional_tests.js --config x-pack/test_serverless/api_integration/test_suites/observability/config.ts +node scripts/functional_tests.js --config x-pack/solutions/observability/test/serverless/api_integration/configs/config.ts ``` #### Start server and run tests (separate processes) ```sh # Start server -node scripts/functional_tests_server.js --config x-pack/test_serverless/api_integration/test_suites/observability/config.ts +node scripts/functional_tests_server.js --config x-pack/solutions/observability/test/serverless/api_integration/configs/config.ts # Run tests -node scripts/functional_test_runner --config=x-pack/test_serverless/api_integration/test_suites/observability/config.ts +node scripts/functional_test_runner --config=x-pack/solutions/observability/test/serverless/api_integration/configs/config.ts ``` ## Storybook diff --git a/x-pack/solutions/observability/plugins/observability_logs_explorer/README.md b/x-pack/solutions/observability/plugins/observability_logs_explorer/README.md index 0b82c656da245..05de85a716e70 100644 --- a/x-pack/solutions/observability/plugins/observability_logs_explorer/README.md +++ b/x-pack/solutions/observability/plugins/observability_logs_explorer/README.md @@ -7,16 +7,19 @@ This plugin provides an app based on the `LogsExplorer` component from the `logs ### Stateful #### FTR Server + ``` yarn test:ftr:server --config ./x-pack/test/functional/apps/observability_logs_explorer/config.ts ``` #### FTR Runner + ``` yarn test:ftr:runner --config ./x-pack/test/functional/apps/observability_logs_explorer/config.ts --include ./x-pack/test/functional/apps/observability_logs_explorer/index.ts ``` #### Running Individual Tests + ``` yarn test:ftr:runner --config ./x-pack/test/functional/apps/observability_logs_explorer/config.ts --include ./x-pack/test/functional/apps/observability_logs_explorer/$1 ``` @@ -24,17 +27,21 @@ yarn test:ftr:runner --config ./x-pack/test/functional/apps/observability_logs_e ### Serverless #### Server + ``` -yarn test:ftr:server --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts +yarn test:ftr:server --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts ``` #### Runner + ``` -yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/index.ts +yarn test:ftr:runner --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts --include ./x-pack/solutions/observability/test/serverless/functional/test_suites/observability_logs_explorer/index.ts ``` + #### Running Individual Tests + ``` -yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/$1 +yarn test:ftr:runner --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts --include ./x-pack/solutions/observability/test/serverless/functional/test_suites/observability_logs_explorer/$1 ``` ### Using dockerized package registry @@ -50,16 +57,19 @@ export set FLEET_PACKAGE_REGISTRY_PORT=12345 To unset the variable, and run the tests against the real endpoint again, execute ``` -unset FLEET_PACKAGE_REGISTRY_PORT +unset FLEET_PACKAGE_REGISTRY_PORT ``` ## Checktypes #### Logs explorer + ``` node scripts/type_check.js --project x-pack/solutions/observability/plugins/logs_explorer/tsconfig.json ``` + #### Observability Logs explorer + ``` node scripts/type_check.js --project x-pack/solutions/observability/plugins/observability_logs_explorer/tsconfig.json ``` @@ -67,11 +77,13 @@ node scripts/type_check.js --project x-pack/solutions/observability/plugins/obse ### Generating Data using Synthtrace #### Logs Data only + ``` node scripts/synthtrace simple_logs.ts --clean [--live] ``` #### Logs and Metrics Data + ``` node scripts/synthtrace logs_and_metrics.ts --clean [--live] ``` @@ -84,4 +96,4 @@ The limit is done to protect us in case we add some dependency that heavily impa ``` node scripts/build_kibana_platform_plugins --focus logsExplorer --update-limits -``` \ No newline at end of file +``` diff --git a/x-pack/solutions/observability/plugins/observability_onboarding/README.md b/x-pack/solutions/observability/plugins/observability_onboarding/README.md index b35be2256835c..6728571934941 100644 --- a/x-pack/solutions/observability/plugins/observability_onboarding/README.md +++ b/x-pack/solutions/observability/plugins/observability_onboarding/README.md @@ -78,16 +78,16 @@ yarn test:ftr:runner --config ./x-pack/solutions/observability/test/observabilit ```sh # start server -yarn test:ftr:server --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts +yarn test:ftr:server --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts # run tests -yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/onboarding/index.ts +yarn test:ftr:runner --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts --include ./x-pack/solutions/observability/test/serverless/functional/test_suites/onboarding/index.ts ``` ##### Running Individual Tests ```sh -yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/onboarding/index.ts/$1 +yarn test:ftr:runner --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts --include ./x-pack/solutions/observability/test/serverless/functional/test_suites/onboarding/index.ts/$1 ``` ### Playwright tests (Scout) diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/config.feature_flags.ts b/x-pack/solutions/observability/test/serverless/api_integration/configs/config.feature_flags.ts similarity index 82% rename from x-pack/test_serverless/api_integration/test_suites/observability/config.feature_flags.ts rename to x-pack/solutions/observability/test/serverless/api_integration/configs/config.feature_flags.ts index 29f64e3cdaa5b..172b8812815d0 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/config.feature_flags.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/configs/config.feature_flags.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { createTestConfig } from '../../config.base'; -import { services } from './apm_api_integration/common/services'; +import { createTestConfig } from '@kbn/test-suites-xpack-platform/serverless/api_integration/config.base'; +import { services } from '../test_suites/apm_api_integration/common/services'; /** * Make sure to create a MKI deployment with custom Kibana image, that includes feature flags arguments diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/config.logs_essentials.ts b/x-pack/solutions/observability/test/serverless/api_integration/configs/config.logs_essentials.ts similarity index 83% rename from x-pack/test_serverless/api_integration/test_suites/observability/config.logs_essentials.ts rename to x-pack/solutions/observability/test/serverless/api_integration/configs/config.logs_essentials.ts index 32f0f8a6ddbef..be1a85417a4a4 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/config.logs_essentials.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/configs/config.logs_essentials.ts @@ -5,9 +5,9 @@ * 2.0. */ import { KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils'; -import { createTestConfig } from '../../config.base'; -import { services as apmServices } from './apm_api_integration/common/services'; -import { services as datasetQualityServices } from './dataset_quality_api_integration/common/services'; +import { createTestConfig } from '@kbn/test-suites-xpack-platform/serverless/api_integration/config.base'; +import { services as apmServices } from '../test_suites/apm_api_integration/common/services'; +import { services as datasetQualityServices } from '../test_suites/dataset_quality_api_integration/common/services'; export default createTestConfig({ serverlessProject: 'oblt', diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/config.ts b/x-pack/solutions/observability/test/serverless/api_integration/configs/config.ts similarity index 79% rename from x-pack/test_serverless/api_integration/test_suites/observability/config.ts rename to x-pack/solutions/observability/test/serverless/api_integration/configs/config.ts index e3c76c523f1a0..6a54ad061a529 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/config.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/configs/config.ts @@ -5,9 +5,9 @@ * 2.0. */ import { KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils'; -import { createTestConfig } from '../../config.base'; -import { services as apmServices } from './apm_api_integration/common/services'; -import { services as datasetQualityServices } from './dataset_quality_api_integration/common/services'; +import { createTestConfig } from '@kbn/test-suites-xpack-platform/serverless/api_integration/config.base'; +import { services as apmServices } from '../test_suites/apm_api_integration/common/services'; +import { services as datasetQualityServices } from '../test_suites/dataset_quality_api_integration/common/services'; export default createTestConfig({ serverlessProject: 'oblt', diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/index.feature_flags.ts b/x-pack/solutions/observability/test/serverless/api_integration/configs/index.feature_flags.ts similarity index 85% rename from x-pack/test_serverless/api_integration/test_suites/observability/index.feature_flags.ts rename to x-pack/solutions/observability/test/serverless/api_integration/configs/index.feature_flags.ts index 6371c9b6feb8d..18c3a3dbbc206 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/index.feature_flags.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/configs/index.feature_flags.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('Serverless observability API - feature flags', function () {}); diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/index.logs_essentials.ts b/x-pack/solutions/observability/test/serverless/api_integration/configs/index.logs_essentials.ts similarity index 75% rename from x-pack/test_serverless/api_integration/test_suites/observability/index.logs_essentials.ts rename to x-pack/solutions/observability/test/serverless/api_integration/configs/index.logs_essentials.ts index b5cb1abe1a3dd..aa251cf91466d 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/index.logs_essentials.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/configs/index.logs_essentials.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('Serverless observability logs essentials API', function () { this.tags(['esGate']); - loadTestFile(require.resolve('./logs_essentials_only')); + loadTestFile(require.resolve('../test_suites/logs_essentials_only')); }); } diff --git a/x-pack/solutions/observability/test/serverless/api_integration/configs/index.ts b/x-pack/solutions/observability/test/serverless/api_integration/configs/index.ts new file mode 100644 index 0000000000000..98a805df2cbc2 --- /dev/null +++ b/x-pack/solutions/observability/test/serverless/api_integration/configs/index.ts @@ -0,0 +1,20 @@ +/* + * 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'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('Serverless observability API', function () { + this.tags(['esGate']); + + loadTestFile(require.resolve('../test_suites/apm_api_integration/feature_flags.ts')); + loadTestFile(require.resolve('../test_suites/cases')); + loadTestFile(require.resolve('../test_suites/synthetics')); + loadTestFile(require.resolve('../test_suites/dataset_quality_api_integration')); + loadTestFile(require.resolve('../test_suites/platform_security')); + }); +} diff --git a/x-pack/solutions/observability/test/serverless/api_integration/ftr_provider_context.d.ts b/x-pack/solutions/observability/test/serverless/api_integration/ftr_provider_context.d.ts new file mode 100644 index 0000000000000..aa56557c09df8 --- /dev/null +++ b/x-pack/solutions/observability/test/serverless/api_integration/ftr_provider_context.d.ts @@ -0,0 +1,12 @@ +/* + * 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 } from '@kbn/test'; + +import { services } from './services'; + +export type FtrProviderContext = GenericFtrProviderContext; diff --git a/x-pack/solutions/observability/test/serverless/api_integration/services/index.ts b/x-pack/solutions/observability/test/serverless/api_integration/services/index.ts new file mode 100644 index 0000000000000..a950df1e639f8 --- /dev/null +++ b/x-pack/solutions/observability/test/serverless/api_integration/services/index.ts @@ -0,0 +1,29 @@ +/* + * 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 } from '@kbn/test'; +import { services as svlPlatformServices } from '@kbn/test-suites-xpack-platform/serverless/api_integration/services'; + +export const services = { + ...svlPlatformServices, + // Observability Solution serverless FTR services +}; + +export type InheritedFtrProviderContext = GenericFtrProviderContext; + +export type InheritedServices = InheritedFtrProviderContext extends GenericFtrProviderContext< + infer TServices, + {} +> + ? TServices + : {}; + +export type { + SupertestWithRoleScopeType, + RoleCredentials, + InternalRequestHeader, +} from '@kbn/test-suites-xpack-platform/serverless/shared/services'; diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/apm_api_integration/common/apm_api_supertest.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/apm_api_integration/common/apm_api_supertest.ts similarity index 95% rename from x-pack/test_serverless/api_integration/test_suites/observability/apm_api_integration/common/apm_api_supertest.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/apm_api_integration/common/apm_api_supertest.ts index 3b05b5d08d29d..23e9319340e53 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/apm_api_integration/common/apm_api_supertest.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/apm_api_integration/common/apm_api_supertest.ts @@ -14,8 +14,11 @@ import type { import { Config, kbnTestConfig, kibanaTestSuperuserServerless } from '@kbn/test'; import type { APIEndpoint } from '@kbn/apm-plugin/server'; import { formatRequest } from '@kbn/server-route-repository'; -import type { InternalRequestHeader, RoleCredentials } from '../../../../../shared/services'; -import { InheritedFtrProviderContext } from '../../../../services'; +import type { + InternalRequestHeader, + InheritedFtrProviderContext, + RoleCredentials, +} from '../../../services'; export function createApmApiClient(st: supertest.Agent) { return async ( diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/apm_api_integration/common/services.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/apm_api_integration/common/services.ts similarity index 96% rename from x-pack/test_serverless/api_integration/test_suites/observability/apm_api_integration/common/services.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/apm_api_integration/common/services.ts index b97ba737b3ab3..156d6600caded 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/apm_api_integration/common/services.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/apm_api_integration/common/services.ts @@ -11,7 +11,7 @@ import { InheritedServices, InheritedFtrProviderContext, services as inheritedServices, -} from '../../../../services'; +} from '../../../services'; export type APMServices = InheritedServices & { apmApiClient: (context: InheritedFtrProviderContext) => Promise; diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/apm_api_integration/feature_flags.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/apm_api_integration/feature_flags.ts similarity index 99% rename from x-pack/test_serverless/api_integration/test_suites/observability/apm_api_integration/feature_flags.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/apm_api_integration/feature_flags.ts index 15af0d68d8db7..ec4f803d88ad0 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/apm_api_integration/feature_flags.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/apm_api_integration/feature_flags.ts @@ -6,7 +6,7 @@ */ import expect from 'expect'; -import type { InternalRequestHeader, RoleCredentials } from '../../../../shared/services'; +import type { InternalRequestHeader, RoleCredentials } from '../../services'; import { APMFtrContextProvider } from './common/services'; import { ApmApiClient } from './common/apm_api_supertest'; diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/cases/find_cases.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/cases/find_cases.ts similarity index 94% rename from x-pack/test_serverless/api_integration/test_suites/observability/cases/find_cases.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/cases/find_cases.ts index 130462651ae50..62d601ef484de 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/cases/find_cases.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/cases/find_cases.ts @@ -7,8 +7,8 @@ import { CasePostRequest } from '@kbn/cases-plugin/common/types/api'; import expect from '@kbn/expect'; -import type { RoleCredentials } from '../../../../shared/services'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import type { RoleCredentials } from '../../services'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getService }: FtrProviderContext): void => { const svlCases = getService('svlCases'); diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/cases/get_case.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/cases/get_case.ts similarity index 92% rename from x-pack/test_serverless/api_integration/test_suites/observability/cases/get_case.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/cases/get_case.ts index 46df79c14dc35..611400102ff12 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/cases/get_case.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/cases/get_case.ts @@ -6,8 +6,8 @@ */ import expect from '@kbn/expect'; -import type { RoleCredentials } from '../../../../shared/services'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import type { RoleCredentials } from '../../services'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getService }: FtrProviderContext): void => { const svlCases = getService('svlCases'); diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/cases/index.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/cases/index.ts similarity index 88% rename from x-pack/test_serverless/api_integration/test_suites/observability/cases/index.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/cases/index.ts index 97e56b4220124..a83e2feef62dd 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/cases/index.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/cases/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('Cases', function () { diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/cases/post_case.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/cases/post_case.ts similarity index 93% rename from x-pack/test_serverless/api_integration/test_suites/observability/cases/post_case.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/cases/post_case.ts index e38791613d1f2..93c807b325341 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/cases/post_case.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/cases/post_case.ts @@ -7,8 +7,8 @@ import expect from '@kbn/expect'; import { ConnectorTypes } from '@kbn/cases-plugin/common/types/domain'; -import type { RoleCredentials } from '../../../../shared/services'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import type { RoleCredentials } from '../../services'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getService }: FtrProviderContext): void => { const svlCases = getService('svlCases'); diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/common/dataset_quality_api_supertest.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/dataset_quality_api_integration/common/dataset_quality_api_supertest.ts similarity index 96% rename from x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/common/dataset_quality_api_supertest.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/dataset_quality_api_integration/common/dataset_quality_api_supertest.ts index bd081646b7a33..16e50639c0e79 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/common/dataset_quality_api_supertest.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/dataset_quality_api_integration/common/dataset_quality_api_supertest.ts @@ -11,8 +11,11 @@ import type { APIClientRequestParamsOf, APIReturnType } from '@kbn/dataset-quali import { Config, kbnTestConfig, kibanaTestSuperuserServerless } from '@kbn/test'; import type { APIEndpoint } from '@kbn/dataset-quality-plugin/server/routes'; import { formatRequest } from '@kbn/server-route-repository'; -import { InternalRequestHeader, RoleCredentials } from '../../../../../shared/services'; -import { InheritedFtrProviderContext } from '../../../../services'; +import { + InternalRequestHeader, + RoleCredentials, + InheritedFtrProviderContext, +} from '../../../services'; export function createDatasetQualityApiClient(st: supertest.Agent) { return async ( diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/common/services.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/dataset_quality_api_integration/common/services.ts similarity index 97% rename from x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/common/services.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/dataset_quality_api_integration/common/services.ts index dc5d9b77e7157..0710b49256a62 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/common/services.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/dataset_quality_api_integration/common/services.ts @@ -15,7 +15,7 @@ import { InheritedServices, InheritedFtrProviderContext, services as inheritedServices, -} from '../../../../services'; +} from '../../../services'; export type DatasetQualityServices = InheritedServices & { datasetQualityApiClient: ( diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/data_stream_details.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/dataset_quality_api_integration/data_stream_details.ts similarity index 99% rename from x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/data_stream_details.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/dataset_quality_api_integration/data_stream_details.ts index 27ee47d3e4110..c70d25266fafc 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/data_stream_details.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/dataset_quality_api_integration/data_stream_details.ts @@ -7,7 +7,7 @@ import { log, timerange } from '@kbn/apm-synthtrace-client'; import expect from '@kbn/expect'; -import type { InternalRequestHeader, RoleCredentials } from '../../../../shared/services'; +import type { InternalRequestHeader, RoleCredentials } from '../../services'; import { DatasetQualityApiClient } from './common/dataset_quality_api_supertest'; import { DatasetQualityFtrContextProvider } from './common/services'; diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/index.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/dataset_quality_api_integration/index.ts similarity index 86% rename from x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/index.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/dataset_quality_api_integration/index.ts index 680bb76432b3a..94c113099c19c 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/index.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/dataset_quality_api_integration/index.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('Dataset Quality', function () { diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/fleet/config.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/fleet/config.ts similarity index 74% rename from x-pack/test_serverless/api_integration/test_suites/observability/fleet/config.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/fleet/config.ts index fcc55d3fae75a..5274655a005a5 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/fleet/config.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/fleet/config.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { kbnServerArgs } from '../../../services/default_fleet_setup'; -import { createTestConfig } from '../../../config.base'; +import { kbnServerArgs } from '@kbn/test-suites-xpack-platform/serverless/api_integration/services/default_fleet_setup'; +import { createTestConfig } from '@kbn/test-suites-xpack-platform/serverless/api_integration/config.base'; import { services } from '../apm_api_integration/common/services'; export default createTestConfig({ diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/fleet/fleet.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/fleet/fleet.ts similarity index 95% rename from x-pack/test_serverless/api_integration/test_suites/observability/fleet/fleet.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/fleet/fleet.ts index 6c1272751f959..92f3efce91819 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/fleet/fleet.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/fleet/fleet.ts @@ -9,9 +9,9 @@ import expect from 'expect'; import { expectDefaultElasticsearchOutput, expectDefaultFleetServer, -} from '../../../services/default_fleet_setup'; -import type { InternalRequestHeader, RoleCredentials } from '../../../../shared/services'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +} from '@kbn/test-suites-xpack-platform/serverless/api_integration/services/default_fleet_setup'; +import type { InternalRequestHeader, RoleCredentials } from '../../services'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function (ctx: FtrProviderContext) { const svlCommonApi = ctx.getService('svlCommonApi'); diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/logs_essentials_only/connector_and_rules.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/logs_essentials_only/connector_and_rules.ts similarity index 97% rename from x-pack/test_serverless/api_integration/test_suites/observability/logs_essentials_only/connector_and_rules.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/logs_essentials_only/connector_and_rules.ts index 4f50f85545f0a..bd750a0304e9d 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/logs_essentials_only/connector_and_rules.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/logs_essentials_only/connector_and_rules.ts @@ -6,8 +6,8 @@ */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; -import { SupertestWithRoleScopeType } from '../../../../shared/services'; +import { FtrProviderContext } from '../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../services'; export default function ({ getService }: FtrProviderContext) { const roleScopedSupertest = getService('roleScopedSupertest'); diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/logs_essentials_only/disabled_apis.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/logs_essentials_only/disabled_apis.ts similarity index 87% rename from x-pack/test_serverless/api_integration/test_suites/observability/logs_essentials_only/disabled_apis.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/logs_essentials_only/disabled_apis.ts index 645a5328a71d8..f87ca7c1c393a 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/logs_essentials_only/disabled_apis.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/logs_essentials_only/disabled_apis.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; -import { SupertestWithRoleScopeType } from '../../../../shared/services'; +import { FtrProviderContext } from '../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../services'; export default function ({ getService }: FtrProviderContext) { const roleScopedSupertest = getService('roleScopedSupertest'); diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/logs_essentials_only/index.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/logs_essentials_only/index.ts similarity index 88% rename from x-pack/test_serverless/api_integration/test_suites/observability/logs_essentials_only/index.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/logs_essentials_only/index.ts index 903e8f32b3f91..77d0914c63171 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/logs_essentials_only/index.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/logs_essentials_only/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('logs essentials only', function () { diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/logs_essentials_only/streams.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/logs_essentials_only/streams.ts similarity index 93% rename from x-pack/test_serverless/api_integration/test_suites/observability/logs_essentials_only/streams.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/logs_essentials_only/streams.ts index 7de80075ea09b..0c104439e48fb 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/logs_essentials_only/streams.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/logs_essentials_only/streams.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; -import { SupertestWithRoleScopeType } from '../../../../shared/services'; +import { FtrProviderContext } from '../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../services'; export default function ({ getService }: FtrProviderContext) { const roleScopedSupertest = getService('roleScopedSupertest'); diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/platform_security/authorization.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/platform_security/authorization.ts similarity index 99% rename from x-pack/test_serverless/api_integration/test_suites/observability/platform_security/authorization.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/platform_security/authorization.ts index 68a3897715d31..3f180d9bfa9ff 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/platform_security/authorization.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/platform_security/authorization.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const svlCommonApi = getService('svlCommonApi'); diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/platform_security/index.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/platform_security/index.ts similarity index 86% rename from x-pack/test_serverless/api_integration/test_suites/observability/platform_security/index.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/platform_security/index.ts index 5271f15b683f1..98cf495a677bf 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/platform_security/index.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/platform_security/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('Platform security APIs', function () { diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/synthetics/index.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/synthetics/index.ts similarity index 90% rename from x-pack/test_serverless/api_integration/test_suites/observability/synthetics/index.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/synthetics/index.ts index 02067aeef1b1f..2c95421421373 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/synthetics/index.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/synthetics/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, loadTestFile }: FtrProviderContext) { const esDeleteAllIndices = getService('esDeleteAllIndices'); diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/synthetics/synthetics_enablement.ts b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/synthetics/synthetics_enablement.ts similarity index 99% rename from x-pack/test_serverless/api_integration/test_suites/observability/synthetics/synthetics_enablement.ts rename to x-pack/solutions/observability/test/serverless/api_integration/test_suites/synthetics/synthetics_enablement.ts index 7e8fcc343db75..ea677692c605d 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/synthetics/synthetics_enablement.ts +++ b/x-pack/solutions/observability/test/serverless/api_integration/test_suites/synthetics/synthetics_enablement.ts @@ -7,7 +7,7 @@ import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; interface CommonRequestHeader { 'kbn-xsrf': string; diff --git a/x-pack/test_serverless/functional/test_suites/observability/config.feature_flags.ts b/x-pack/solutions/observability/test/serverless/functional/configs/config.feature_flags.ts similarity index 82% rename from x-pack/test_serverless/functional/test_suites/observability/config.feature_flags.ts rename to x-pack/solutions/observability/test/serverless/functional/configs/config.feature_flags.ts index e87f5112e7a71..dba8c819a1f71 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/config.feature_flags.ts +++ b/x-pack/solutions/observability/test/serverless/functional/configs/config.feature_flags.ts @@ -5,7 +5,9 @@ * 2.0. */ -import { createTestConfig } from '../../config.base'; +import { createTestConfig } from '@kbn/test-suites-xpack-platform/serverless/functional/config.base'; +import { services } from '../services'; +import { pageObjects } from '../page_objects'; /** * Make sure to create a MKI deployment with custom Kibana image, that includes feature flags arguments @@ -13,6 +15,8 @@ import { createTestConfig } from '../../config.base'; */ export default createTestConfig({ serverlessProject: 'oblt', + services, + pageObjects, junit: { reportName: 'Serverless Observability Feature Flags Functional Tests', }, diff --git a/x-pack/test_serverless/functional/test_suites/observability/config.logs_essentials.ts b/x-pack/solutions/observability/test/serverless/functional/configs/config.logs_essentials.ts similarity index 85% rename from x-pack/test_serverless/functional/test_suites/observability/config.logs_essentials.ts rename to x-pack/solutions/observability/test/serverless/functional/configs/config.logs_essentials.ts index 84e39a5257e6c..2319c784f1047 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/config.logs_essentials.ts +++ b/x-pack/solutions/observability/test/serverless/functional/configs/config.logs_essentials.ts @@ -5,10 +5,14 @@ * 2.0. */ import { KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils'; -import { createTestConfig } from '../../config.base'; +import { createTestConfig } from '@kbn/test-suites-xpack-platform/serverless/functional/config.base'; +import { services } from '../services'; +import { pageObjects } from '../page_objects'; export default createTestConfig({ serverlessProject: 'oblt', + services, + pageObjects, testFiles: [require.resolve('./index.logs_essentials.ts')], junit: { reportName: 'Serverless Observability Logs Essentials Functional Tests', diff --git a/x-pack/test_serverless/functional/test_suites/observability/config.screenshots.ts b/x-pack/solutions/observability/test/serverless/functional/configs/config.screenshots.ts similarity index 71% rename from x-pack/test_serverless/functional/test_suites/observability/config.screenshots.ts rename to x-pack/solutions/observability/test/serverless/functional/configs/config.screenshots.ts index 82f6aa99ad319..945147ef70572 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/config.screenshots.ts +++ b/x-pack/solutions/observability/test/serverless/functional/configs/config.screenshots.ts @@ -5,7 +5,9 @@ * 2.0. */ -import { createTestConfig } from '../../config.base'; +import { createTestConfig } from '@kbn/test-suites-xpack-platform/serverless/functional/config.base'; +import { services } from '../services'; +import { pageObjects } from '../page_objects'; const enabledActionTypes = [ '.cases-webhook', @@ -22,7 +24,9 @@ const enabledActionTypes = [ export default createTestConfig({ serverlessProject: 'oblt', - testFiles: [require.resolve('./screenshot_creation')], + services, + pageObjects, + testFiles: [require.resolve('../test_suites/screenshot_creation')], kbnServerArgs: [`--xpack.actions.enabledActionTypes=${JSON.stringify(enabledActionTypes)}`], junit: { reportName: 'Serverless Observability Screenshot Creation', diff --git a/x-pack/test_serverless/functional/test_suites/observability/config.telemetry.ts b/x-pack/solutions/observability/test/serverless/functional/configs/config.telemetry.ts similarity index 79% rename from x-pack/test_serverless/functional/test_suites/observability/config.telemetry.ts rename to x-pack/solutions/observability/test/serverless/functional/configs/config.telemetry.ts index 7188bc5f1d5b0..41bfac8909594 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/config.telemetry.ts +++ b/x-pack/solutions/observability/test/serverless/functional/configs/config.telemetry.ts @@ -8,9 +8,9 @@ import { resolve } from 'path'; import type { GenericFtrProviderContext } from '@kbn/test'; import { KibanaEBTUIProvider } from '@kbn/test-suites-src/analytics/services/kibana_ebt'; -import { services as inheritedServices } from '../../services'; -import { pageObjects } from '../../page_objects'; -import { createTestConfig } from '../../config.base'; +import { createTestConfig } from '@kbn/test-suites-xpack-platform/serverless/functional/config.base'; +import { pageObjects } from '../page_objects'; +import { services as inheritedServices } from '../services'; type ObservabilityTelemetryServices = typeof inheritedServices & { kibana_ebt_ui: typeof KibanaEBTUIProvider; @@ -34,13 +34,14 @@ export default createTestConfig({ }, suiteTags: { exclude: ['skipSvlOblt'] }, services, + pageObjects, // include settings from project controller esServerArgs: [], kbnServerArgs: [ `--plugin-path=${resolve( __dirname, - '../../../../../src/platform/test/analytics/plugins/analytics_ftr_helpers' + '../../../../../../../src/platform/test/analytics/plugins/analytics_ftr_helpers' )}`, ], }); diff --git a/x-pack/test_serverless/functional/test_suites/observability/config.ts b/x-pack/solutions/observability/test/serverless/functional/configs/config.ts similarity index 82% rename from x-pack/test_serverless/functional/test_suites/observability/config.ts rename to x-pack/solutions/observability/test/serverless/functional/configs/config.ts index 0fe72bfc7ae0f..65f760a6765f8 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/config.ts +++ b/x-pack/solutions/observability/test/serverless/functional/configs/config.ts @@ -5,10 +5,14 @@ * 2.0. */ import { KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils'; -import { createTestConfig } from '../../config.base'; +import { createTestConfig } from '@kbn/test-suites-xpack-platform/serverless/functional/config.base'; +import { pageObjects } from '../page_objects'; +import { services } from '../services'; export default createTestConfig({ serverlessProject: 'oblt', + services, + pageObjects, testFiles: [require.resolve('.')], junit: { reportName: 'Serverless Observability Functional Tests', diff --git a/x-pack/test_serverless/functional/test_suites/observability/index.feature_flags.ts b/x-pack/solutions/observability/test/serverless/functional/configs/index.feature_flags.ts similarity index 68% rename from x-pack/test_serverless/functional/test_suites/observability/index.feature_flags.ts rename to x-pack/solutions/observability/test/serverless/functional/configs/index.feature_flags.ts index 6e65129c469a1..c9b3357ebf486 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/index.feature_flags.ts +++ b/x-pack/solutions/observability/test/serverless/functional/configs/index.feature_flags.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('serverless observability UI - feature flags', function () { - loadTestFile(require.resolve('./infra')); - loadTestFile(require.resolve('./streams')); + loadTestFile(require.resolve('../test_suites/infra')); + loadTestFile(require.resolve('../test_suites/streams')); }); } diff --git a/x-pack/test_serverless/functional/test_suites/observability/index.logs_essentials.ts b/x-pack/solutions/observability/test/serverless/functional/configs/index.logs_essentials.ts similarity index 67% rename from x-pack/test_serverless/functional/test_suites/observability/index.logs_essentials.ts rename to x-pack/solutions/observability/test/serverless/functional/configs/index.logs_essentials.ts index 7ba82929abca5..a229dcd123b32 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/index.logs_essentials.ts +++ b/x-pack/solutions/observability/test/serverless/functional/configs/index.logs_essentials.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('serverless observability logs essentials UI', function () { this.tags(['esGate']); - loadTestFile(require.resolve('./logs_essentials_only')); - loadTestFile(require.resolve('./discover/logs')); + loadTestFile(require.resolve('../test_suites/logs_essentials_only')); + loadTestFile(require.resolve('../test_suites/discover/logs')); }); } diff --git a/x-pack/test_serverless/functional/test_suites/observability/index.telemetry.ts b/x-pack/solutions/observability/test/serverless/functional/configs/index.telemetry.ts similarity index 85% rename from x-pack/test_serverless/functional/test_suites/observability/index.telemetry.ts rename to x-pack/solutions/observability/test/serverless/functional/configs/index.telemetry.ts index 0639465db60e1..fa5c73c5fc570 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/index.telemetry.ts +++ b/x-pack/solutions/observability/test/serverless/functional/configs/index.telemetry.ts @@ -11,6 +11,6 @@ export default function ({ loadTestFile }: ObservabilityTelemetryFtrProviderCont describe('serverless observability UI - telemetry', function () { this.tags(['skipMKI', 'esGate']); - loadTestFile(require.resolve('./discover/context_awareness/telemetry')); + loadTestFile(require.resolve('../test_suites/discover/context_awareness/telemetry')); }); } diff --git a/x-pack/solutions/observability/test/serverless/functional/configs/index.ts b/x-pack/solutions/observability/test/serverless/functional/configs/index.ts new file mode 100644 index 0000000000000..521c0e1250cbf --- /dev/null +++ b/x-pack/solutions/observability/test/serverless/functional/configs/index.ts @@ -0,0 +1,29 @@ +/* + * 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'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('serverless observability UI', function () { + this.tags(['esGate']); + + loadTestFile(require.resolve('../test_suites/navigation')); + loadTestFile(require.resolve('../test_suites/dataset_quality')); + loadTestFile(require.resolve('../test_suites/discover/context_awareness')); + loadTestFile(require.resolve('../test_suites/discover/logs')); + loadTestFile(require.resolve('../test_suites/discover/embeddables')); + loadTestFile(require.resolve('../test_suites/onboarding')); + loadTestFile(require.resolve('../test_suites/rules/rules_list')); + loadTestFile(require.resolve('../test_suites/rules/custom_threshold_consumer')); + loadTestFile(require.resolve('../test_suites/rules/es_query_consumer')); + loadTestFile(require.resolve('../test_suites/role_management')); + loadTestFile(require.resolve('../test_suites/cases')); + loadTestFile(require.resolve('../test_suites/advanced_settings')); + loadTestFile(require.resolve('../test_suites/ml')); + loadTestFile(require.resolve('../test_suites/privileges')); + }); +} diff --git a/x-pack/solutions/observability/test/serverless/functional/ftr_provider_context.d.ts b/x-pack/solutions/observability/test/serverless/functional/ftr_provider_context.d.ts new file mode 100644 index 0000000000000..6092c6668a3dc --- /dev/null +++ b/x-pack/solutions/observability/test/serverless/functional/ftr_provider_context.d.ts @@ -0,0 +1,13 @@ +/* + * 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 } from '@kbn/test'; + +import { services } from './services'; +import { pageObjects } from './page_objects'; + +export type FtrProviderContext = GenericFtrProviderContext; diff --git a/x-pack/solutions/observability/test/serverless/functional/page_objects/index.ts b/x-pack/solutions/observability/test/serverless/functional/page_objects/index.ts new file mode 100644 index 0000000000000..26b5f265a4ec5 --- /dev/null +++ b/x-pack/solutions/observability/test/serverless/functional/page_objects/index.ts @@ -0,0 +1,26 @@ +/* + * 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 svlPlatformPageObjects } from '@kbn/test-suites-xpack-platform/serverless/functional/page_objects'; +import { SvlObltOverviewPageProvider } from './svl_oblt_overview_page'; +import { ObservabilityLogsExplorerPageObject } from '../../../functional/page_objects/observability_logs_explorer'; +import { DatasetQualityPageObject } from '../../../functional/page_objects/dataset_quality'; +import { AssetDetailsProvider } from '../../../functional/page_objects/asset_details'; +import { InfraHostsViewProvider } from '../../../functional/page_objects/infra_hosts_view'; +import { InfraHomePageProvider } from '../../../functional/page_objects/infra_home_page'; + +export const pageObjects = { + ...svlPlatformPageObjects, + // Observability Solution stateful FTR page objects + assetDetails: AssetDetailsProvider, + datasetQuality: DatasetQualityPageObject, + infraHostsView: InfraHostsViewProvider, + infraHome: InfraHomePageProvider, + observabilityLogsExplorer: ObservabilityLogsExplorerPageObject, + // Observability Solution serverless FTR page objects + svlObltOverviewPage: SvlObltOverviewPageProvider, +}; diff --git a/x-pack/test_serverless/functional/page_objects/svl_oblt_overview_page.ts b/x-pack/solutions/observability/test/serverless/functional/page_objects/svl_oblt_overview_page.ts similarity index 100% rename from x-pack/test_serverless/functional/page_objects/svl_oblt_overview_page.ts rename to x-pack/solutions/observability/test/serverless/functional/page_objects/svl_oblt_overview_page.ts diff --git a/x-pack/solutions/observability/test/serverless/functional/services/index.ts b/x-pack/solutions/observability/test/serverless/functional/services/index.ts new file mode 100644 index 0000000000000..ecde5442889a5 --- /dev/null +++ b/x-pack/solutions/observability/test/serverless/functional/services/index.ts @@ -0,0 +1,23 @@ +/* + * 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 svlPlatformServices } from '@kbn/test-suites-xpack-platform/serverless/functional/services'; +import { services as platformServices } from '@kbn/test-suites-xpack-platform/functional/services'; +import { SvlObltNavigationServiceProvider } from './svl_oblt_navigation'; + +export const services = { + ...svlPlatformServices, + ml: platformServices.ml, + // Observability Solution serverless FTR services + svlObltNavigation: SvlObltNavigationServiceProvider, +}; + +export type { + SupertestWithRoleScopeType, + RoleCredentials, + InternalRequestHeader, +} from '@kbn/test-suites-xpack-platform/serverless/shared/services'; diff --git a/x-pack/test_serverless/functional/services/svl_oblt_navigation.ts b/x-pack/solutions/observability/test/serverless/functional/services/svl_oblt_navigation.ts similarity index 100% rename from x-pack/test_serverless/functional/services/svl_oblt_navigation.ts rename to x-pack/solutions/observability/test/serverless/functional/services/svl_oblt_navigation.ts diff --git a/x-pack/test_serverless/functional/test_suites/observability/advanced_settings.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/advanced_settings.ts similarity index 96% rename from x-pack/test_serverless/functional/test_suites/observability/advanced_settings.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/advanced_settings.ts index 01331bbfc4e4f..cf66d7fb6cc2a 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/advanced_settings.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/advanced_settings.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { OBSERVABILITY_PROJECT_SETTINGS } from '@kbn/serverless-observability-settings'; import { isEditorFieldSetting } from '@kbn/test-suites-xpack-platform/serverless/functional/test_suites/management/advanced_settings'; -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/cases/attachment_framework.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/cases/attachment_framework.ts similarity index 98% rename from x-pack/test_serverless/functional/test_suites/observability/cases/attachment_framework.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cases/attachment_framework.ts index 13b20eff891e4..4ef69412aa8ef 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/cases/attachment_framework.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/cases/attachment_framework.ts @@ -6,7 +6,7 @@ */ import { expect } from 'expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; const ADD_TO_CASE_DATA_TEST_SUBJ = 'embeddablePanelAction-embeddable_addToExistingCase'; diff --git a/x-pack/test_serverless/functional/test_suites/observability/cases/configure.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/cases/configure.ts similarity index 99% rename from x-pack/test_serverless/functional/test_suites/observability/cases/configure.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cases/configure.ts index 193b7e55bd9ae..7a83aea4ab5ea 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/cases/configure.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/cases/configure.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObject, getService }: FtrProviderContext) => { const common = getPageObject('common'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/cases/create_case_form.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/cases/create_case_form.ts similarity index 96% rename from x-pack/test_serverless/functional/test_suites/observability/cases/create_case_form.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cases/create_case_form.ts index 7f393c4457d79..c81aecb2ef63a 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/cases/create_case_form.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/cases/create_case_form.ts @@ -9,8 +9,8 @@ import expect from '@kbn/expect'; import { v4 as uuidv4 } from 'uuid'; import { CaseSeverity, CustomFieldTypes } from '@kbn/cases-plugin/common/types/domain'; import { OBSERVABILITY_OWNER } from '@kbn/cases-plugin/common'; -import { FtrProviderContext } from '../../../ftr_provider_context'; -import { navigateToCasesApp } from '../../../../shared/lib/cases'; +import { navigateToCasesApp } from '@kbn/test-suites-xpack-platform/serverless/shared/lib/cases'; +import { FtrProviderContext } from '../../ftr_provider_context'; const owner = OBSERVABILITY_OWNER; diff --git a/x-pack/test_serverless/functional/test_suites/observability/cases/empty.txt b/x-pack/solutions/observability/test/serverless/functional/test_suites/cases/empty.txt similarity index 100% rename from x-pack/test_serverless/functional/test_suites/observability/cases/empty.txt rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cases/empty.txt diff --git a/x-pack/test_serverless/functional/test_suites/observability/cases/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/cases/index.ts similarity index 90% rename from x-pack/test_serverless/functional/test_suites/observability/cases/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cases/index.ts index 801166c562b45..9243c40f3a086 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/cases/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/cases/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('Serverless Observability Cases', function () { diff --git a/x-pack/test_serverless/functional/test_suites/observability/cases/list_view.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/cases/list_view.ts similarity index 99% rename from x-pack/test_serverless/functional/test_suites/observability/cases/list_view.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cases/list_view.ts index 64d28534e8a90..d3e8d6ed3e0ab 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/cases/list_view.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/cases/list_view.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { CaseSeverity, CaseStatuses } from '@kbn/cases-plugin/common/types/domain'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObject, getService }: FtrProviderContext) => { const header = getPageObject('header'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/cases/view_case.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/cases/view_case.ts similarity index 99% rename from x-pack/test_serverless/functional/test_suites/observability/cases/view_case.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cases/view_case.ts index 9556bfa552b80..303794a839b8d 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/cases/view_case.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/cases/view_case.ts @@ -14,11 +14,11 @@ import { } from '@kbn/cases-plugin/common/types/domain'; import { OBSERVABILITY_OWNER } from '@kbn/cases-plugin/common'; -import { FtrProviderContext } from '../../../ftr_provider_context'; import { createOneCaseBeforeDeleteAllAfter, createAndNavigateToCase, -} from '../../../../shared/lib/cases/helpers'; +} from '@kbn/test-suites-xpack-platform/serverless/shared/lib/cases/helpers'; +import { FtrProviderContext } from '../../ftr_provider_context'; const owner = OBSERVABILITY_OWNER; diff --git a/x-pack/test_serverless/functional/test_suites/observability/cypress/.eslintrc.json b/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/.eslintrc.json similarity index 100% rename from x-pack/test_serverless/functional/test_suites/observability/cypress/.eslintrc.json rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/.eslintrc.json diff --git a/x-pack/test_serverless/functional/test_suites/observability/cypress/config_headless.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/config_headless.ts similarity index 100% rename from x-pack/test_serverless/functional/test_suites/observability/cypress/config_headless.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/config_headless.ts diff --git a/x-pack/test_serverless/functional/test_suites/observability/cypress/config_runner.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/config_runner.ts similarity index 100% rename from x-pack/test_serverless/functional/test_suites/observability/cypress/config_runner.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/config_runner.ts diff --git a/x-pack/test_serverless/functional/test_suites/observability/cypress/cypress.config.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/cypress.config.ts similarity index 100% rename from x-pack/test_serverless/functional/test_suites/observability/cypress/cypress.config.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/cypress.config.ts diff --git a/x-pack/test_serverless/functional/test_suites/observability/cypress/e2e/navigation.cy.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/e2e/navigation.cy.ts similarity index 100% rename from x-pack/test_serverless/functional/test_suites/observability/cypress/e2e/navigation.cy.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/e2e/navigation.cy.ts diff --git a/x-pack/test_serverless/functional/test_suites/observability/cypress/e2e/observability_onboarding/home.cy.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/e2e/observability_onboarding/home.cy.ts similarity index 100% rename from x-pack/test_serverless/functional/test_suites/observability/cypress/e2e/observability_onboarding/home.cy.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/e2e/observability_onboarding/home.cy.ts diff --git a/x-pack/test_serverless/functional/test_suites/observability/cypress/oblt_config.base.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/oblt_config.base.ts similarity index 91% rename from x-pack/test_serverless/functional/test_suites/observability/cypress/oblt_config.base.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/oblt_config.base.ts index 5508b8cd1a618..bc33712979a12 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/cypress/oblt_config.base.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/oblt_config.base.ts @@ -9,7 +9,7 @@ import { FtrConfigProviderContext } from '@kbn/test'; export default async function ({ readConfigFile }: FtrConfigProviderContext) { const svlSharedConfig = await readConfigFile( - require.resolve('../../../../shared/config.base.ts') + require.resolve('@kbn/test-suites-xpack-platform/serverless/shared/config.base') ); return { diff --git a/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/package.json b/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/package.json new file mode 100644 index 0000000000000..74ae1d7de334b --- /dev/null +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/package.json @@ -0,0 +1,13 @@ +{ + "author": "Elastic", + "name": "@kbn/serverless-observability", + "version": "1.0.0", + "private": true, + "license": "Elastic License 2.0", + "scripts": { + "cypress:open": "node ../../../../../../../../node_modules/.bin/cypress open --config-file ./cypress.config.ts", + "cypress:run": "node ../../../../../../../../node_modules/.bin/cypress run --browser chrome --config-file ./cypress.config.ts", + "cypress:serverless:open": "node ../../../../../../../../scripts/functional_tests --config ./config_runner.ts", + "cypress:serverless:run": "node ../../../../../../../../scripts/functional_tests --config ./config_server.ts" + } +} \ No newline at end of file diff --git a/x-pack/test_serverless/functional/test_suites/observability/cypress/runner.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/runner.ts similarity index 87% rename from x-pack/test_serverless/functional/test_suites/observability/cypress/runner.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/runner.ts index 58895831b8a60..f42edbecbe3ef 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/cypress/runner.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/runner.ts @@ -8,9 +8,9 @@ import { resolve } from 'path'; import { withProcRunner } from '@kbn/dev-proc-runner'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; -export type { FtrProviderContext } from '../../../ftr_provider_context'; +export type { FtrProviderContext } from '../../ftr_provider_context'; export async function ObservabilityCypressTestRunner( { getService }: FtrProviderContext, diff --git a/x-pack/test_serverless/functional/test_suites/observability/cypress/support/commands.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/support/commands.ts similarity index 95% rename from x-pack/test_serverless/functional/test_suites/observability/cypress/support/commands.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/support/commands.ts index 38279b0c8d636..19251feee2c09 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/cypress/support/commands.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/support/commands.ts @@ -7,8 +7,8 @@ import 'cypress-axe'; import 'cypress-real-events/support'; import URL from 'url'; -import { request } from '@kbn/security-solution-plugin/public/management/cypress/tasks/common'; import { LoginState } from '@kbn/security-plugin/common/login_state'; +import { request } from '@kbn/cypress-test-helper/src/api'; Cypress.Commands.add('loginAsElasticUser', () => { const username = Cypress.env('username'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/cypress/support/e2e.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/support/e2e.ts similarity index 100% rename from x-pack/test_serverless/functional/test_suites/observability/cypress/support/e2e.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/support/e2e.ts diff --git a/x-pack/test_serverless/functional/test_suites/observability/cypress/support/types.d.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/support/types.d.ts similarity index 100% rename from x-pack/test_serverless/functional/test_suites/observability/cypress/support/types.d.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/support/types.d.ts diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/custom_mappings/custom_integration_mappings.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/custom_mappings/custom_integration_mappings.ts similarity index 100% rename from x-pack/test_serverless/functional/test_suites/observability/dataset_quality/custom_mappings/custom_integration_mappings.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/custom_mappings/custom_integration_mappings.ts diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/custom_mappings/custom_synth_mappings.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/custom_mappings/custom_synth_mappings.ts similarity index 100% rename from x-pack/test_serverless/functional/test_suites/observability/dataset_quality/custom_mappings/custom_synth_mappings.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/custom_mappings/custom_synth_mappings.ts diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/data/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/data/index.ts similarity index 100% rename from x-pack/test_serverless/functional/test_suites/observability/dataset_quality/data/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/data/index.ts diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/data/logs_data.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/data/logs_data.ts similarity index 100% rename from x-pack/test_serverless/functional/test_suites/observability/dataset_quality/data/logs_data.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/data/logs_data.ts diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_details.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/dataset_quality_details.ts similarity index 99% rename from x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_details.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/dataset_quality_details.ts index c043414b0336f..a5ce9923dd0fc 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_details.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/dataset_quality_details.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import originalExpect from 'expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; import { datasetNames, getInitialTestLogs, diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_privileges.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/dataset_quality_privileges.ts similarity index 95% rename from x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_privileges.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/dataset_quality_privileges.ts index 37115f558f656..b10388717e304 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_privileges.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/dataset_quality_privileges.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; import { getInitialTestLogs } from './data'; export default function ({ getService, getPageObjects }: FtrProviderContext) { diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_summary.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/dataset_quality_summary.ts similarity index 97% rename from x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_summary.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/dataset_quality_summary.ts index 3f1daa48e8afe..f7bd386fd506a 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_summary.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/dataset_quality_summary.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; import { datasetNames, getInitialTestLogs, getLogsForDataset } from './data'; export default function ({ getService, getPageObjects }: FtrProviderContext) { diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/dataset_quality_table.ts similarity index 98% rename from x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/dataset_quality_table.ts index 874765f80db96..657b44a9dfc8c 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/dataset_quality_table.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import originalExpect from 'expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; import { datasetNames, defaultNamespace, diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table_filters.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/dataset_quality_table_filters.ts similarity index 99% rename from x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table_filters.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/dataset_quality_table_filters.ts index 68d55b2be399d..8ad0e8fda6be5 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table_filters.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/dataset_quality_table_filters.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; import { datasetNames, getInitialTestLogs, getLogsForDataset, productionNamespace } from './data'; export default function ({ getService, getPageObjects }: FtrProviderContext) { diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/degraded_field_flyout.ts similarity index 99% rename from x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/degraded_field_flyout.ts index e776646d26ec5..6d65e9b1dc7a7 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/degraded_field_flyout.ts @@ -16,7 +16,7 @@ import { defaultNamespace, getInitialTestLogs, } from './data'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; import { logsSynthMappings } from './custom_mappings/custom_synth_mappings'; import { logsNginxMappings } from './custom_mappings/custom_integration_mappings'; diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/home.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/home.ts similarity index 96% rename from x-pack/test_serverless/functional/test_suites/observability/dataset_quality/home.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/home.ts index 177c3074c3b6a..67f1218515e40 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/home.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/home.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; import { getInitialTestLogs } from './data'; export default function ({ getPageObjects, getService }: FtrProviderContext) { diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/index.ts similarity index 92% rename from x-pack/test_serverless/functional/test_suites/observability/dataset_quality/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/index.ts index 5a481ac61c757..c47473a549cb0 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('Dataset Quality', function () { diff --git a/x-pack/test_serverless/functional/test_suites/observability/discover/const.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/const.ts similarity index 100% rename from x-pack/test_serverless/functional/test_suites/observability/discover/const.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/discover/const.ts diff --git a/x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/_get_app_menu.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/_get_app_menu.ts similarity index 98% rename from x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/_get_app_menu.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/_get_app_menu.ts index 457fb4d762477..22ab917710416 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/_get_app_menu.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/_get_app_menu.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import kbnRison from '@kbn/rison'; -import type { FtrProviderContext } from '../../../../ftr_provider_context'; +import type { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const { common, svlCommonPage } = getPageObjects([ diff --git a/x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/_get_cell_renderers.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/_get_cell_renderers.ts similarity index 99% rename from x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/_get_cell_renderers.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/_get_cell_renderers.ts index c5bfd74dcaf55..37a57c0698ce3 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/_get_cell_renderers.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/_get_cell_renderers.ts @@ -8,7 +8,7 @@ import kbnRison from '@kbn/rison'; import expect from '@kbn/expect'; import type { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services'; -import type { FtrProviderContext } from '../../../../ftr_provider_context'; +import type { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects([ diff --git a/x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/_get_doc_viewer.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/_get_doc_viewer.ts similarity index 98% rename from x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/_get_doc_viewer.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/_get_doc_viewer.ts index c38c7e3e497d4..0b4b35b850bdd 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/_get_doc_viewer.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/_get_doc_viewer.ts @@ -6,7 +6,7 @@ */ import kbnRison from '@kbn/rison'; -import type { FtrProviderContext } from '../../../../ftr_provider_context'; +import type { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['common', 'discover', 'svlCommonPage', 'header']); diff --git a/x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/_get_pagination_config.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/_get_pagination_config.ts similarity index 98% rename from x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/_get_pagination_config.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/_get_pagination_config.ts index fc1330c23ff64..cd9df206e9519 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/_get_pagination_config.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/_get_pagination_config.ts @@ -6,7 +6,7 @@ */ import kbnRison from '@kbn/rison'; -import type { FtrProviderContext } from '../../../../ftr_provider_context'; +import type { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['common', 'discover', 'svlCommonPage']); diff --git a/x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/_get_row_indicator_provider.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/_get_row_indicator_provider.ts similarity index 98% rename from x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/_get_row_indicator_provider.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/_get_row_indicator_provider.ts index 17941ff6f88e0..8dff63b336e23 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/_get_row_indicator_provider.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/_get_row_indicator_provider.ts @@ -7,7 +7,7 @@ import kbnRison from '@kbn/rison'; import expect from '@kbn/expect'; -import type { FtrProviderContext } from '../../../../ftr_provider_context'; +import type { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects([ diff --git a/x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/index.ts similarity index 96% rename from x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/index.ts index 779033d4b0f8a..d2f2cad1d0350 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { FtrProviderContext } from '../../../../ftr_provider_context'; +import type { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects, loadTestFile }: FtrProviderContext) { const esArchiver = getService('esArchiver'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/telemetry/_telemetry.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/telemetry/_telemetry.ts similarity index 99% rename from x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/telemetry/_telemetry.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/telemetry/_telemetry.ts index 68f4369aa40f5..428bcc580be9a 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/telemetry/_telemetry.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/telemetry/_telemetry.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import type { ObservabilityTelemetryFtrProviderContext } from '../../../config.telemetry'; +import type { ObservabilityTelemetryFtrProviderContext } from '../../../../configs/config.telemetry'; export default function ({ getService, getPageObjects }: ObservabilityTelemetryFtrProviderContext) { const { common, discover, unifiedFieldList, dashboard, header, timePicker, svlCommonPage } = diff --git a/x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/telemetry/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/telemetry/index.ts similarity index 97% rename from x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/telemetry/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/telemetry/index.ts index 3bf772c39f5b1..d72bc51954d87 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/discover/context_awareness/telemetry/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/telemetry/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { ObservabilityTelemetryFtrProviderContext } from '../../../config.telemetry'; +import type { ObservabilityTelemetryFtrProviderContext } from '../../../../configs/config.telemetry'; export default function ({ getService, diff --git a/x-pack/test_serverless/functional/test_suites/observability/discover/embeddables/_get_doc_viewer.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/embeddables/_get_doc_viewer.ts similarity index 99% rename from x-pack/test_serverless/functional/test_suites/observability/discover/embeddables/_get_doc_viewer.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/discover/embeddables/_get_doc_viewer.ts index 898d03d6e2167..1bb01d6fa5570 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/discover/embeddables/_get_doc_viewer.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/embeddables/_get_doc_viewer.ts @@ -7,7 +7,7 @@ import moment from 'moment/moment'; import { log, timerange } from '@kbn/apm-synthtrace-client'; -import type { FtrProviderContext } from '../../../../ftr_provider_context'; +import type { FtrProviderContext } from '../../../ftr_provider_context'; import { MORE_THAN_1024_CHARS, STACKTRACE_MESSAGE } from '../const'; export default function ({ getService, getPageObjects }: FtrProviderContext) { diff --git a/x-pack/test_serverless/functional/test_suites/observability/discover/logs/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/embeddables/index.ts similarity index 86% rename from x-pack/test_serverless/functional/test_suites/observability/discover/logs/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/discover/embeddables/index.ts index 4f5a585cd9f28..e0d18b29f158f 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/discover/logs/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/embeddables/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { FtrProviderContext } from '../../../../ftr_provider_context'; +import type { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('discover/observabilitySolution/logs', function () { diff --git a/x-pack/test_serverless/functional/test_suites/observability/discover/logs/_get_doc_viewer.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/logs/_get_doc_viewer.ts similarity index 99% rename from x-pack/test_serverless/functional/test_suites/observability/discover/logs/_get_doc_viewer.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/discover/logs/_get_doc_viewer.ts index 18b1c6f46f414..66a8dbdb38cd9 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/discover/logs/_get_doc_viewer.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/logs/_get_doc_viewer.ts @@ -7,7 +7,7 @@ import moment from 'moment/moment'; import { log, timerange } from '@kbn/apm-synthtrace-client'; -import type { FtrProviderContext } from '../../../../ftr_provider_context'; +import type { FtrProviderContext } from '../../../ftr_provider_context'; import { MORE_THAN_1024_CHARS, STACKTRACE_MESSAGE } from '../const'; export default function ({ getService, getPageObjects }: FtrProviderContext) { diff --git a/x-pack/test_serverless/functional/test_suites/observability/discover/embeddables/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/logs/index.ts similarity index 86% rename from x-pack/test_serverless/functional/test_suites/observability/discover/embeddables/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/discover/logs/index.ts index 4f5a585cd9f28..e0d18b29f158f 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/discover/embeddables/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/discover/logs/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { FtrProviderContext } from '../../../../ftr_provider_context'; +import type { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('discover/observabilitySolution/logs', function () { diff --git a/x-pack/test_serverless/functional/test_suites/observability/infra/constants.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/infra/constants.ts similarity index 100% rename from x-pack/test_serverless/functional/test_suites/observability/infra/constants.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/infra/constants.ts diff --git a/x-pack/test_serverless/functional/test_suites/observability/infra/hosts_page.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/infra/hosts_page.ts similarity index 98% rename from x-pack/test_serverless/functional/test_suites/observability/infra/hosts_page.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/infra/hosts_page.ts index 0ff36a849da58..b7dddc3dc5b72 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/infra/hosts_page.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/infra/hosts_page.ts @@ -8,7 +8,7 @@ import moment from 'moment'; import expect from '@kbn/expect'; import type { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services'; -import type { FtrProviderContext } from '../../../ftr_provider_context'; +import type { FtrProviderContext } from '../../ftr_provider_context'; import { HOSTS_VIEW_PATH } from './constants'; import { DATES, DATE_PICKER_FORMAT } from './constants'; diff --git a/x-pack/test_serverless/functional/test_suites/observability/infra/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/infra/index.ts similarity index 89% rename from x-pack/test_serverless/functional/test_suites/observability/infra/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/infra/index.ts index 914f7760f900e..4fc3aaf13d62b 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/infra/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/infra/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('Observability Infra', function () { diff --git a/x-pack/test_serverless/functional/test_suites/observability/infra/infra.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/infra/infra.ts similarity index 98% rename from x-pack/test_serverless/functional/test_suites/observability/infra/infra.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/infra/infra.ts index d49118cc1fc43..b600e9022dfad 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/infra/infra.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/infra/infra.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import type { FtrProviderContext } from '../../../ftr_provider_context'; +import type { FtrProviderContext } from '../../ftr_provider_context'; import { DATES, INVENTORY_PATH, METRICS_EXPLORER_PATH } from './constants'; const DATE_WITH_DATA = DATES.metricsAndLogs.hosts.withData; diff --git a/x-pack/test_serverless/functional/test_suites/observability/infra/navigation.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/infra/navigation.ts similarity index 94% rename from x-pack/test_serverless/functional/test_suites/observability/infra/navigation.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/infra/navigation.ts index 30fde726fe38f..90c2b2cc84558 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/infra/navigation.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/infra/navigation.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { const svlObltNavigation = getService('svlObltNavigation'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/infra/node_details.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/infra/node_details.ts similarity index 97% rename from x-pack/test_serverless/functional/test_suites/observability/infra/node_details.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/infra/node_details.ts index 559d525021b3d..17b00fbfeebb7 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/infra/node_details.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/infra/node_details.ts @@ -7,7 +7,7 @@ import moment from 'moment'; import expect from '@kbn/expect'; -import type { FtrProviderContext } from '../../../ftr_provider_context'; +import type { FtrProviderContext } from '../../ftr_provider_context'; import { DATES, NODE_DETAILS_PATH, DATE_PICKER_FORMAT } from './constants'; const START_HOST_KUBERNETES_SECTION_DATE = moment.utc( diff --git a/x-pack/test_serverless/functional/test_suites/observability/logs_essentials_only/dataset_quality/dataset_quality_table_filters.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/logs_essentials_only/dataset_quality/dataset_quality_table_filters.ts similarity index 95% rename from x-pack/test_serverless/functional/test_suites/observability/logs_essentials_only/dataset_quality/dataset_quality_table_filters.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/logs_essentials_only/dataset_quality/dataset_quality_table_filters.ts index 6fb807053f2b3..b0604492391d8 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/logs_essentials_only/dataset_quality/dataset_quality_table_filters.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/logs_essentials_only/dataset_quality/dataset_quality_table_filters.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../../ftr_provider_context'; +import { FtrProviderContext } from '../../../ftr_provider_context'; import { getInitialTestLogs } from '../../dataset_quality/data'; export default function ({ getService, getPageObjects }: FtrProviderContext) { diff --git a/x-pack/test_serverless/functional/test_suites/observability/logs_essentials_only/dataset_quality/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/logs_essentials_only/dataset_quality/index.ts similarity index 86% rename from x-pack/test_serverless/functional/test_suites/observability/logs_essentials_only/dataset_quality/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/logs_essentials_only/dataset_quality/index.ts index 9ff0120588b16..635d2c2de8935 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/logs_essentials_only/dataset_quality/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/logs_essentials_only/dataset_quality/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../../ftr_provider_context'; +import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('Dataset Quality', function () { diff --git a/x-pack/test_serverless/functional/test_suites/observability/logs_essentials_only/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/logs_essentials_only/index.ts similarity index 88% rename from x-pack/test_serverless/functional/test_suites/observability/logs_essentials_only/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/logs_essentials_only/index.ts index 3ef88de1ae64b..409256cfd3db5 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/logs_essentials_only/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/logs_essentials_only/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('logs essentials only', function () { diff --git a/x-pack/test_serverless/functional/test_suites/observability/logs_essentials_only/navigation.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/logs_essentials_only/navigation.ts similarity index 95% rename from x-pack/test_serverless/functional/test_suites/observability/logs_essentials_only/navigation.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/logs_essentials_only/navigation.ts index dd918e40a4394..62de0a1dd35d2 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/logs_essentials_only/navigation.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/logs_essentials_only/navigation.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getPageObject, getService }: FtrProviderContext) { const svlObltNavigation = getService('svlObltNavigation'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/logs_essentials_only/privileges.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/logs_essentials_only/privileges.ts similarity index 97% rename from x-pack/test_serverless/functional/test_suites/observability/logs_essentials_only/privileges.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/logs_essentials_only/privileges.ts index e97c8f6bd1731..a776907730e64 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/logs_essentials_only/privileges.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/logs_essentials_only/privileges.ts @@ -5,7 +5,7 @@ * 2.0. */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getPageObject, getPageObjects, getService }: FtrProviderContext) { const pageObjects = getPageObjects([ diff --git a/x-pack/test_serverless/functional/test_suites/observability/ml/anomaly_detection_jobs_list.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/ml/anomaly_detection_jobs_list.ts similarity index 98% rename from x-pack/test_serverless/functional/test_suites/observability/ml/anomaly_detection_jobs_list.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/ml/anomaly_detection_jobs_list.ts index bc2af2ed02d4b..e2019b5612bd2 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/ml/anomaly_detection_jobs_list.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/ml/anomaly_detection_jobs_list.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const ml = getService('ml'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/ml/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/ml/index.ts similarity index 92% rename from x-pack/test_serverless/functional/test_suites/observability/ml/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/ml/index.ts index 6a9b475f479b5..969d9f14d3262 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/ml/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/ml/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('Observability ML', function () { diff --git a/x-pack/test_serverless/functional/test_suites/observability/ml/memory_usage.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/ml/memory_usage.ts similarity index 95% rename from x-pack/test_serverless/functional/test_suites/observability/ml/memory_usage.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/ml/memory_usage.ts index 82cd0d43d5f07..7cd824502673c 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/ml/memory_usage.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/ml/memory_usage.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const ml = getService('ml'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/ml/notifications.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/ml/notifications.ts similarity index 94% rename from x-pack/test_serverless/functional/test_suites/observability/ml/notifications.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/ml/notifications.ts index a2e5070469864..5d24d24e26294 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/ml/notifications.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/ml/notifications.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const ml = getService('ml'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/ml/search_bar_features.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/ml/search_bar_features.ts similarity index 96% rename from x-pack/test_serverless/functional/test_suites/observability/ml/search_bar_features.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/ml/search_bar_features.ts index 682d76f561062..9fd3c80206424 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/ml/search_bar_features.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/ml/search_bar_features.ts @@ -5,9 +5,9 @@ * 2.0. */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; -export default function ({ getPageObjects, getService }: FtrProviderContext) { +export default function ({ getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['header', 'svlCommonPage', 'svlCommonNavigation']); const allLabels = { viewer: [ diff --git a/x-pack/test_serverless/functional/test_suites/observability/navigation.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/navigation.ts similarity index 99% rename from x-pack/test_serverless/functional/test_suites/observability/navigation.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/navigation.ts index ea64e8b8e855a..649ad88733740 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/navigation.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/navigation.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../ftr_provider_context'; export default function ({ getPageObject, getService }: FtrProviderContext) { const svlObltNavigation = getService('svlObltNavigation'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/onboarding/auto_detect.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/onboarding/auto_detect.ts similarity index 98% rename from x-pack/test_serverless/functional/test_suites/observability/onboarding/auto_detect.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/onboarding/auto_detect.ts index d18ec05c8d822..fa50dbce96d7f 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/onboarding/auto_detect.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/onboarding/auto_detect.ts @@ -8,7 +8,7 @@ import expect from 'expect'; import { generateLongId, log, timerange } from '@kbn/apm-synthtrace-client'; import moment from 'moment'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getPageObjects, getService }: FtrProviderContext) { const PageObjects = getPageObjects(['common', 'svlCommonPage']); diff --git a/x-pack/test_serverless/functional/test_suites/observability/onboarding/firehose.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/onboarding/firehose.ts similarity index 98% rename from x-pack/test_serverless/functional/test_suites/observability/onboarding/firehose.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/onboarding/firehose.ts index 3421db3a862de..af6eb87853f36 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/onboarding/firehose.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/onboarding/firehose.ts @@ -8,7 +8,7 @@ import expect from 'expect'; import { log, timerange } from '@kbn/apm-synthtrace-client'; import moment from 'moment'; -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; const CF_COMMAND_REGEXP = /aws cloudformation create-stack --stack-name (\S+) --template-url \S+ --parameters ParameterKey=FirehoseStreamName,ParameterValue=(\S+) .+? --capabilities CAPABILITY_IAM/; diff --git a/x-pack/test_serverless/functional/test_suites/observability/onboarding/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/onboarding/index.ts similarity index 87% rename from x-pack/test_serverless/functional/test_suites/observability/onboarding/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/onboarding/index.ts index 3debbc8ab622a..c94d3e7811a60 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/onboarding/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/onboarding/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('Onboarding', function () { diff --git a/x-pack/test_serverless/functional/test_suites/observability/privileges.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/privileges.ts similarity index 94% rename from x-pack/test_serverless/functional/test_suites/observability/privileges.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/privileges.ts index 2b0ae696b57b2..7cc7043feb4ab 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/privileges.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/privileges.ts @@ -5,9 +5,9 @@ * 2.0. */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../ftr_provider_context'; -export default function ({ getPageObject, getPageObjects, getService }: FtrProviderContext) { +export default function ({ getPageObjects, getService }: FtrProviderContext) { const pageObjects = getPageObjects([ 'common', 'svlCommonPage', diff --git a/x-pack/test_serverless/functional/test_suites/observability/role_management/custom_role_access.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/role_management/custom_role_access.ts similarity index 96% rename from x-pack/test_serverless/functional/test_suites/observability/role_management/custom_role_access.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/role_management/custom_role_access.ts index 1c6988a0efb71..1f6e4daa3029a 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/role_management/custom_role_access.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/role_management/custom_role_access.ts @@ -6,8 +6,8 @@ */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; -import { RoleCredentials } from '../../../../shared/services'; +import { FtrProviderContext } from '../../ftr_provider_context'; +import { RoleCredentials } from '../../services'; export default function ({ getPageObjects, getService }: FtrProviderContext) { const pageObjects = getPageObjects(['svlCommonPage', 'timePicker', 'common', 'header']); diff --git a/x-pack/test_serverless/functional/test_suites/observability/role_management/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/role_management/index.ts similarity index 86% rename from x-pack/test_serverless/functional/test_suites/observability/role_management/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/role_management/index.ts index 063f1c8c8cc2c..3182ec4288c68 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/role_management/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/role_management/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('Role Management', function () { diff --git a/x-pack/test_serverless/functional/test_suites/observability/rules/custom_threshold_consumer.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/rules/custom_threshold_consumer.ts similarity index 97% rename from x-pack/test_serverless/functional/test_suites/observability/rules/custom_threshold_consumer.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/rules/custom_threshold_consumer.ts index a8eb588764ab0..8eae7326c60b9 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/rules/custom_threshold_consumer.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/rules/custom_threshold_consumer.ts @@ -6,8 +6,8 @@ */ import { v4 as uuidv4 } from 'uuid'; import { expect } from 'expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; -import { RoleCredentials } from '../../../../shared/services'; +import { FtrProviderContext } from '../../ftr_provider_context'; +import { RoleCredentials } from '../../services'; export default ({ getPageObject, getService }: FtrProviderContext) => { const svlCommonPage = getPageObject('svlCommonPage'); @@ -66,13 +66,14 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { before(async () => { await kibanaServer.savedObjects.cleanStandardList(); + roleAuthc = await samlAuth.createM2mApiKeyWithRoleScope('admin'); // re-create the default data view in case it has been cleaned up by another test await dataViewApi.create({ + roleAuthc, id: 'default_all_data_id', name: 'default:all-data', title: '*,-.*', }); - roleAuthc = await svlUserManager.createM2mApiKeyWithRoleScope('admin'); }); afterEach(async () => { diff --git a/x-pack/test_serverless/functional/test_suites/observability/rules/es_query_consumer.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/rules/es_query_consumer.ts similarity index 98% rename from x-pack/test_serverless/functional/test_suites/observability/rules/es_query_consumer.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/rules/es_query_consumer.ts index a42b3dab7789c..d4b6fb6387d13 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/rules/es_query_consumer.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/rules/es_query_consumer.ts @@ -6,8 +6,8 @@ */ import { v4 as uuidv4 } from 'uuid'; import { expect } from 'expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; -import { RoleCredentials } from '../../../../shared/services'; +import { FtrProviderContext } from '../../ftr_provider_context'; +import { RoleCredentials } from '../../services'; export default ({ getPageObject, getService }: FtrProviderContext) => { const svlCommonPage = getPageObject('svlCommonPage'); @@ -68,6 +68,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { await kibanaServer.savedObjects.cleanStandardList(); // re-create the default data view in case it has been cleaned up by another test await dataViewApi.create({ + roleAuthc, id: 'default_all_data_id', name: 'default:all-data', title: '*,-.*', diff --git a/x-pack/test_serverless/functional/test_suites/observability/rules/rules_list.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/rules/rules_list.ts similarity index 99% rename from x-pack/test_serverless/functional/test_suites/observability/rules/rules_list.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/rules/rules_list.ts index e1a2aa7c58bdc..89a2d89b7852a 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/rules/rules_list.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/rules/rules_list.ts @@ -6,8 +6,8 @@ */ import { expect } from 'expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; -import { RoleCredentials } from '../../../../shared/services'; +import { FtrProviderContext } from '../../ftr_provider_context'; +import { RoleCredentials } from '../../services'; export default ({ getPageObject, getService }: FtrProviderContext) => { const svlCommonPage = getPageObject('svlCommonPage'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/index.ts similarity index 87% rename from x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/index.ts index 8710906ab6408..92051d1112009 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('Screenshots - serverless observability UI', function () { diff --git a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/cases/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/cases/index.ts similarity index 89% rename from x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/cases/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/cases/index.ts index 4313b1ee1e6f3..1d8fd58be6192 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/cases/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/cases/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../../../ftr_provider_context'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ loadTestFile, getService }: FtrProviderContext) { const browser = getService('browser'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/cases/list_view.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/cases/list_view.ts similarity index 92% rename from x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/cases/list_view.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/cases/list_view.ts index 040a299a8f439..8dbc69299b9ca 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/cases/list_view.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/cases/list_view.ts @@ -6,9 +6,9 @@ */ import { OBSERVABILITY_OWNER } from '@kbn/cases-plugin/common'; -import type { RoleCredentials } from '../../../../../../shared/services'; -import { FtrProviderContext } from '../../../../../ftr_provider_context'; -import { navigateToCasesApp } from '../../../../../../shared/lib/cases'; +import { navigateToCasesApp } from '@kbn/test-suites-xpack-platform/serverless/shared/lib/cases'; +import type { RoleCredentials } from '../../../../services'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ getPageObject, getPageObjects, getService }: FtrProviderContext) { const cases = getService('cases'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/cases/settings.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/cases/settings.ts similarity index 94% rename from x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/cases/settings.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/cases/settings.ts index 0a4b391902720..6d128f599a7c7 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/cases/settings.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/cases/settings.ts @@ -6,8 +6,8 @@ */ import { OBSERVABILITY_OWNER } from '@kbn/cases-plugin/common'; -import { FtrProviderContext } from '../../../../../ftr_provider_context'; -import { navigateToCasesApp } from '../../../../../../shared/lib/cases'; +import { navigateToCasesApp } from '@kbn/test-suites-xpack-platform/serverless/shared/lib/cases'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ getPageObject, getPageObjects, getService }: FtrProviderContext) { const retry = getService('retry'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/cases/testfile.png b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/cases/testfile.png similarity index 100% rename from x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/cases/testfile.png rename to x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/cases/testfile.png diff --git a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/connectors/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/connectors/index.ts similarity index 91% rename from x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/connectors/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/connectors/index.ts index 2136348a0a86a..e3f84533cd795 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/connectors/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/connectors/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../../../ftr_provider_context'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ loadTestFile, getService }: FtrProviderContext) { const actions = getService('actions'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/connectors/server_log_connector.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/connectors/server_log_connector.ts similarity index 95% rename from x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/connectors/server_log_connector.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/connectors/server_log_connector.ts index 5bf728695d122..b5626fdf186cc 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/connectors/server_log_connector.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/connectors/server_log_connector.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../../../ftr_provider_context'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const svlCommonScreenshots = getService('svlCommonScreenshots'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/index.ts similarity index 93% rename from x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/index.ts index a8da8791a972a..b6fee513c67a5 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../../ftr_provider_context'; +import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, loadTestFile }: FtrProviderContext) { const browser = getService('browser'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/maintenance_windows/create_window.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/maintenance_windows/create_window.ts similarity index 96% rename from x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/maintenance_windows/create_window.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/maintenance_windows/create_window.ts index 4dc1971cc8245..7d7291ea1ed13 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/maintenance_windows/create_window.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/maintenance_windows/create_window.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../../../ftr_provider_context'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ getPageObjects, getService }: FtrProviderContext) { const pageObjects = getPageObjects(['common', 'header', 'svlCommonPage']); diff --git a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/maintenance_windows/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/maintenance_windows/index.ts similarity index 88% rename from x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/maintenance_windows/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/maintenance_windows/index.ts index f7c95d53f0206..9821ff6c83800 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/maintenance_windows/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/screenshot_creation/response_ops_docs/maintenance_windows/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../../../ftr_provider_context'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ loadTestFile, getService }: FtrProviderContext) { const browser = getService('browser'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/streams/index.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/streams/index.ts similarity index 86% rename from x-pack/test_serverless/functional/test_suites/observability/streams/index.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/streams/index.ts index 5339e8d7a2c87..da4edeac69cda 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/streams/index.ts +++ b/x-pack/solutions/observability/test/serverless/functional/test_suites/streams/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('Observability Streams', function () { diff --git a/x-pack/test_serverless/functional/test_suites/observability/streams/read_privilege.ts b/x-pack/solutions/observability/test/serverless/functional/test_suites/streams/read_privilege.ts similarity index 100% rename from x-pack/test_serverless/functional/test_suites/observability/streams/read_privilege.ts rename to x-pack/solutions/observability/test/serverless/functional/test_suites/streams/read_privilege.ts diff --git a/x-pack/solutions/observability/test/tsconfig.json b/x-pack/solutions/observability/test/tsconfig.json index a99cbbe8d064a..c367604e4b236 100644 --- a/x-pack/solutions/observability/test/tsconfig.json +++ b/x-pack/solutions/observability/test/tsconfig.json @@ -7,7 +7,11 @@ "cheerio", "@emotion/react/types/css-prop", "@kbn/ambient-ui-types", - "@kbn/ambient-ftr-types" + "@kbn/ambient-ftr-types", + "cypress", + "cypress-file-upload", + "cypress-real-events", + "cypress-recurse" ], "resolveJsonModule": true, }, @@ -86,5 +90,10 @@ "@kbn/observability-ai-assistant-app-plugin", "@kbn/dev-utils", "@kbn/data-quality-plugin", + "@kbn/serverless-observability-settings", + "@kbn/cypress-config", + "@kbn/dev-proc-runner", + "@kbn/cypress-test-helper", + "@kbn/streams-schema", ] } diff --git a/x-pack/test_serverless/api_integration/services/index.ts b/x-pack/test_serverless/api_integration/services/index.ts index 67c583a844bc6..9f3532c451ffd 100644 --- a/x-pack/test_serverless/api_integration/services/index.ts +++ b/x-pack/test_serverless/api_integration/services/index.ts @@ -11,7 +11,6 @@ import { services as svlSharedServices } from '../../shared/services'; import { SamlToolsProvider } from './saml_tools'; import { SvlCasesServiceProvider } from './svl_cases'; -import { SloApiProvider } from './slo_api'; import { TransformProvider } from './transform'; import { SvlEnrichPoliciesApi } from './index_management/svl_enrich_policies.api'; @@ -25,7 +24,6 @@ import { SvlComponentTemplateHelpers } from './index_management/svl_component_te import { SvlTemplatesHelpers } from './index_management/svl_templates.helpers'; import { SvlTemplatesApi } from './index_management/svl_templates.api'; import { SvlMappingsApi } from './index_management/svl_mappings.api'; -import { SynthtraceClientProvider } from './synthtrace'; import { SvlClusterNodesApi } from './index_management/svl_cluster_nodes.api'; export const services = { @@ -36,9 +34,7 @@ export const services = { ...svlSharedServices, samlTools: SamlToolsProvider, svlCases: SvlCasesServiceProvider, - sloApi: SloApiProvider, transform: TransformProvider, - synthtrace: SynthtraceClientProvider, svlEnrichPoliciesApi: SvlEnrichPoliciesApi, svlSettingsApi: SvlSettingsApi, svlIndicesApi: SvlIndicesApi, diff --git a/x-pack/test_serverless/api_integration/services/slo_api.ts b/x-pack/test_serverless/api_integration/services/slo_api.ts deleted file mode 100644 index b969f56ca4a8c..0000000000000 --- a/x-pack/test_serverless/api_integration/services/slo_api.ts +++ /dev/null @@ -1,209 +0,0 @@ -/* - * 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 { - fetchHistoricalSummaryParamsSchema, - FetchHistoricalSummaryResponse, -} from '@kbn/slo-schema'; -import * as t from 'io-ts'; -import type { RoleCredentials } from '../../shared/services'; -import { FtrProviderContext } from '../ftr_provider_context'; - -type DurationUnit = 'm' | 'h' | 'd' | 'w' | 'M'; - -interface Duration { - value: number; - unit: DurationUnit; -} - -interface WindowSchema { - id: string; - burnRateThreshold: number; - maxBurnRateThreshold: number; - longWindow: Duration; - shortWindow: Duration; - actionGroup: string; -} - -interface Dependency { - ruleId: string; - actionGroupsToSuppressOn: string[]; -} - -export interface SloBurnRateRuleParams { - sloId: string; - windows: WindowSchema[]; - dependencies?: Dependency[]; -} - -interface SloParams { - id?: string; - name: string; - description: string; - indicator: { - type: 'sli.kql.custom'; - params: { - index: string; - good: string; - total: string; - timestampField: string; - }; - }; - timeWindow: { - duration: string; - type: string; - }; - budgetingMethod: string; - objective: { - target: number; - }; - groupBy: string; -} - -type FetchHistoricalSummaryParams = t.OutputOf< - typeof fetchHistoricalSummaryParamsSchema.props.body ->; - -export function SloApiProvider({ getService }: FtrProviderContext) { - const es = getService('es'); - const supertest = getService('supertest'); - const svlCommonApi = getService('svlCommonApi'); - const retry = getService('retry'); - const requestTimeout = 30 * 1000; - const retryTimeout = 180 * 1000; - - return { - async create(slo: SloParams, roleAuthc: RoleCredentials) { - const { body } = await supertest - .post(`/api/observability/slos`) - .set(svlCommonApi.getInternalRequestHeader()) - .set(roleAuthc.apiKeyHeader) - .send(slo); - - return body; - }, - - async delete({ sloId, roleAuthc }: { sloId: string; roleAuthc: RoleCredentials }) { - const response = await supertest - .delete(`/api/observability/slos/${sloId}`) - .set(svlCommonApi.getInternalRequestHeader()) - .set(roleAuthc.apiKeyHeader); - return response; - }, - - async fetchHistoricalSummary( - params: FetchHistoricalSummaryParams, - roleAuthc: RoleCredentials - ): Promise { - const { body } = await supertest - .post(`/internal/observability/slos/_historical_summary`) - .set(svlCommonApi.getInternalRequestHeader()) - .set(roleAuthc.apiKeyHeader) - .send(params); - - return body; - }, - - async waitForSloToBeDeleted({ - sloId, - roleAuthc, - }: { - sloId: string; - roleAuthc: RoleCredentials; - }) { - if (!sloId) { - throw new Error(`sloId is undefined`); - } - return await retry.tryForTime(retryTimeout, async () => { - const response = await supertest - .delete(`/api/observability/slos/${sloId}`) - .set(svlCommonApi.getInternalRequestHeader()) - .set(roleAuthc.apiKeyHeader) - .timeout(requestTimeout); - if (!response.ok) { - throw new Error(`slodId [${sloId}] was not deleted`); - } - return response; - }); - }, - - async waitForSloCreated({ sloId, roleAuthc }: { sloId: string; roleAuthc: RoleCredentials }) { - if (!sloId) { - throw new Error(`'sloId is undefined`); - } - return await retry.tryForTime(retryTimeout, async () => { - const response = await supertest - .get(`/api/observability/slos/${sloId}`) - .set(svlCommonApi.getInternalRequestHeader()) - .set(roleAuthc.apiKeyHeader) - .timeout(requestTimeout); - if (response.body.id === undefined) { - throw new Error(`No slo with id ${sloId} found`); - } - return response.body; - }); - }, - - async waitForSloSummaryTempIndexToExist(index: string) { - if (!index) { - throw new Error(`index is undefined`); - } - - return await retry.tryForTime(retryTimeout, async () => { - const indexExists = await es.indices.exists({ index, allow_no_indices: false }); - if (!indexExists) { - throw new Error(`index ${index} should exist`); - } - return indexExists; - }); - }, - - async getSloData({ sloId, indexName }: { sloId: string; indexName: string }) { - const response = await es.search({ - index: indexName, - query: { - bool: { - filter: [{ term: { 'slo.id': sloId } }], - }, - }, - }); - return response; - }, - async waitForSloData({ sloId, indexName }: { sloId: string; indexName: string }) { - return await retry.tryForTime(retryTimeout, async () => { - const response = await es.search({ - index: indexName, - query: { - bool: { - filter: [{ term: { 'slo.id': sloId } }], - }, - }, - }); - if (response.hits.hits.length === 0) { - throw new Error(`No hits found at index [${indexName}] for slo [${sloId}] `); - } - return response; - }); - }, - async deleteAllSLOs() { - const response = await supertest - .get(`/api/observability/slos/_definitions`) - .set(svlCommonApi.getInternalRequestHeader()) - .send() - .expect(200); - await Promise.all( - response.body.results.map(({ id }: { id: string }) => { - return supertest - .delete(`/api/observability/slos/${id}`) - .set(svlCommonApi.getInternalRequestHeader()) - .send() - .expect(204); - }) - ); - }, - }; -} diff --git a/x-pack/test_serverless/api_integration/services/synthtrace.ts b/x-pack/test_serverless/api_integration/services/synthtrace.ts deleted file mode 100644 index 6a9636f953cdd..0000000000000 --- a/x-pack/test_serverless/api_integration/services/synthtrace.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 { format, UrlObject } from 'url'; -import { - SynthtraceClientsManager, - SynthtraceClientTypes, - GetClientsReturn, - createLogger, - LogLevel, -} from '@kbn/apm-synthtrace'; -import { FtrProviderContext } from '../ftr_provider_context'; - -export function SynthtraceClientProvider({ getService }: FtrProviderContext) { - const esClient = getService('es'); - const config = getService('config'); - - const servers = config.get('servers'); - const kibanaServer = servers.kibana as UrlObject; - const kibanaServerUrlWithAuth = format(kibanaServer); - - return { - getClients( - synthtraceClients: TClient[] - ): GetClientsReturn { - const clientManager = new SynthtraceClientsManager({ - client: esClient, - logger: createLogger(LogLevel.info), - refreshAfterIndex: true, - }); - - const clients = clientManager.getClients({ - clients: synthtraceClients, - kibana: { - target: kibanaServerUrlWithAuth, - logger: createLogger(LogLevel.debug), - }, - }); - - return clients; - }, - }; -} diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/utils/expect_to_reject.ts b/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/utils/expect_to_reject.ts deleted file mode 100644 index ae352c31d71a2..0000000000000 --- a/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/utils/expect_to_reject.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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. - */ - -export async function expectToReject(fn: () => Promise): Promise { - let res: any; - try { - res = await fn(); - } catch (e) { - return e; - } - - throw new Error(`expectToReject resolved: "${JSON.stringify(res)}"`); -} diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/index.ts b/x-pack/test_serverless/api_integration/test_suites/observability/index.ts deleted file mode 100644 index d6f2230c79c0d..0000000000000 --- a/x-pack/test_serverless/api_integration/test_suites/observability/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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'; - -export default function ({ loadTestFile }: FtrProviderContext) { - describe('Serverless observability API', function () { - this.tags(['esGate']); - - loadTestFile(require.resolve('./apm_api_integration/feature_flags.ts')); - loadTestFile(require.resolve('./cases')); - loadTestFile(require.resolve('./synthetics')); - loadTestFile(require.resolve('./dataset_quality_api_integration')); - loadTestFile(require.resolve('./platform_security')); - }); -} diff --git a/x-pack/test_serverless/functional/page_objects/index.ts b/x-pack/test_serverless/functional/page_objects/index.ts index 1f79de93d2179..6a846c42514fb 100644 --- a/x-pack/test_serverless/functional/page_objects/index.ts +++ b/x-pack/test_serverless/functional/page_objects/index.ts @@ -16,7 +16,6 @@ import { SvlDataUsagePageProvider } from '@kbn/test-suites-xpack-platform/server import { SvlCustomRolesPageProvider } from '@kbn/test-suites-xpack-platform/serverless/functional/page_objects/svl_custom_roles_page'; import { SvlRuleDetailsPageProvider } from '@kbn/test-suites-xpack-platform/serverless/functional/page_objects/svl_rule_details_ui_page'; import { SvlTriggersActionsPageProvider } from '@kbn/test-suites-xpack-platform/serverless/functional/page_objects/svl_triggers_actions_ui_page'; -import { SvlObltOverviewPageProvider } from './svl_oblt_overview_page'; import { SvlSecLandingPageProvider } from './svl_sec_landing_page'; import { CspDashboardPageProvider } from './csp_dashboard_page'; import { AddCisIntegrationFormPageProvider } from './add_cis_integration_form_page'; @@ -27,7 +26,6 @@ export const pageObjects = { svlCommonPage: SvlCommonPageProvider, svlCommonNavigation: SvlCommonNavigationProvider, - svlObltOverviewPage: SvlObltOverviewPageProvider, svlSecLandingPage: SvlSecLandingPageProvider, svlTriggersActionsUI: SvlTriggersActionsPageProvider, svlRuleDetailsUI: SvlRuleDetailsPageProvider, diff --git a/x-pack/test_serverless/functional/services/index.ts b/x-pack/test_serverless/functional/services/index.ts index 037e404f8cd4c..5e66a9de48a56 100644 --- a/x-pack/test_serverless/functional/services/index.ts +++ b/x-pack/test_serverless/functional/services/index.ts @@ -14,7 +14,6 @@ import { ComboBoxService } from '@kbn/test-suites-src/functional/services/combo_ import { services as deploymentAgnosticFunctionalServices } from './deployment_agnostic_services'; import { services as svlSharedServices } from '../../shared/services'; import { SvlChatNavigationServiceProvider } from './svl_chat_navigation'; -import { SvlObltNavigationServiceProvider } from './svl_oblt_navigation'; import { SvlSecNavigationServiceProvider } from './svl_sec_navigation'; import { SvlCasesServiceProvider } from '../../api_integration/services/svl_cases'; import { services as SvlApiIntegrationSvcs } from '../../api_integration/services'; @@ -27,7 +26,6 @@ export const services = { ...svlSharedServices, svlChatNavigation: SvlChatNavigationServiceProvider, svlCommonNavigation: SvlCommonNavigationServiceProvider, - svlObltNavigation: SvlObltNavigationServiceProvider, svlSecNavigation: SvlSecNavigationServiceProvider, svlCommonScreenshots: SvlCommonScreenshotsProvider, svlCases: SvlCasesServiceProvider, diff --git a/x-pack/test_serverless/functional/test_suites/observability/cypress/package.json b/x-pack/test_serverless/functional/test_suites/observability/cypress/package.json deleted file mode 100644 index d50d6e5ab8a36..0000000000000 --- a/x-pack/test_serverless/functional/test_suites/observability/cypress/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "author": "Elastic", - "name": "@kbn/serverless-observability", - "version": "1.0.0", - "private": true, - "license": "Elastic License 2.0", - "scripts": { - "cypress:open": "node ../../../../../../node_modules/.bin/cypress open --config-file ./cypress.config.ts", - "cypress:run": "node ../../../../../../node_modules/.bin/cypress run --browser chrome --config-file ./cypress.config.ts", - "cypress:serverless:open": "node ../../../../../../scripts/functional_tests --config ./config_runner.ts", - "cypress:serverless:run": "node ../../../../../../scripts/functional_tests --config ./config_server.ts" - } -} \ No newline at end of file diff --git a/x-pack/test_serverless/functional/test_suites/observability/index.ts b/x-pack/test_serverless/functional/test_suites/observability/index.ts deleted file mode 100644 index 2319ffd97b514..0000000000000 --- a/x-pack/test_serverless/functional/test_suites/observability/index.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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'; - -export default function ({ loadTestFile }: FtrProviderContext) { - describe('serverless observability UI', function () { - this.tags(['esGate']); - - loadTestFile(require.resolve('./navigation')); - loadTestFile(require.resolve('./dataset_quality')); - loadTestFile(require.resolve('./discover/context_awareness')); - loadTestFile(require.resolve('./discover/logs')); - loadTestFile(require.resolve('./discover/embeddables')); - loadTestFile(require.resolve('./onboarding')); - loadTestFile(require.resolve('./rules/rules_list')); - loadTestFile(require.resolve('./rules/custom_threshold_consumer')); - loadTestFile(require.resolve('./rules/es_query_consumer')); - loadTestFile(require.resolve('./role_management')); - loadTestFile(require.resolve('./cases')); - loadTestFile(require.resolve('./advanced_settings')); - loadTestFile(require.resolve('./ml')); - loadTestFile(require.resolve('./privileges')); - }); -} diff --git a/x-pack/test_serverless/tsconfig.json b/x-pack/test_serverless/tsconfig.json index 37a50fdeb26b8..cdd87ba2aab73 100644 --- a/x-pack/test_serverless/tsconfig.json +++ b/x-pack/test_serverless/tsconfig.json @@ -27,42 +27,29 @@ "@kbn/expect", "@kbn/test", "@kbn/repo-info", - "@kbn/cypress-config", - "@kbn/dev-proc-runner", "@kbn/ftr-common-functional-services", "@kbn/apm-plugin", - "@kbn/server-route-repository", "@kbn/core-chrome-browser", - "@kbn/security-plugin", - "@kbn/security-solution-plugin/public/management/cypress", "@kbn/tooling-log", "@kbn/cases-plugin", "@kbn/core-http-common", "@kbn/rison", "@kbn/dev-utils", "@kbn/rison", - "@kbn/serverless-observability-settings", "@kbn/serverless-security-settings", "@kbn/cloud-security-posture-plugin", "@kbn/reporting-plugin", - "@kbn/apm-synthtrace", - "@kbn/apm-synthtrace-client", "@kbn/mock-idp-utils", "@kbn/index-management-plugin", "@kbn/transform-plugin", - "@kbn/slo-schema", - "@kbn/ftr-common-functional-ui-services", "@kbn/es", "@kbn/reporting-common", "@kbn/slo-plugin", - "@kbn/synthetics-plugin", - "@kbn/dataset-quality-plugin", "@kbn/search-types", "@kbn/test-suites-src", "@kbn/cloud-security-posture-common", "@kbn/scout-info", "@kbn/test-suites-xpack-platform", - "@kbn/streams-schema", "@kbn/infra-plugin", "@kbn/observability-plugin", "@kbn/response-ops-rule-params",