Repository navigation
[Index Management] Migrate pending serverless FTs - #283996
SoniaSanzV merged 2 commits into
Conversation
|
Pinging @elastic/kibana-management (Team:Kibana Management) |
|
/flaky scoutConfig:x-pack/platform/plugins/shared/index_management/test/scout/ui/playwright.config.ts:30 |
Flaky Test Runner✅ Build triggered - kibana-flaky-test-suite-runner#13724
|
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#13724[✅] x-pack/platform/plugins/shared/index_management/test/scout/ui/playwright.config.ts (--arch stateful --domain classic): 30/30 tests passed. |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
Test Failures
History
cc @SoniaSanzV |
Part of elastic#281244 ## Summary Migrates the last two serverless-only FTR files for `index_management` to Scout — `indices.ts` and `index_detail.ts` under `x-pack/platform/test/serverless/functional/test_suites/management/index_management/` — completing the FTR → Scout migration for this plugin, per the [FTR → Scout migration](elastic#263554). These two files were deliberately left out of elastic#283397 because they overlapped with the existing Scout coverage in `index_details_page.spec.ts` and `home_page.spec.ts`; this PR reconciles the remaining gaps and deletes the FTR files. - Adds `index_actions_context_menu.spec.ts`: manage-index context menu navigation (overview/settings/mappings tabs) and delete-index flow, plus a "can create an index" test that seeds through the UI wizard (`clickCreateIndexButton` → `setCreateIndexName` → `clickCreateIndexSaveButton`), restoring UI-wizard coverage that the rest of this migration batch narrowed to stateful-only by seeding via `esClient.indices.create` instead. - Widens `index_details_page.spec.ts` from `tags.stateful.classic` to a new `NOT_SVL_SEARCH` tag (stateful classic + serverless observability_complete + serverless security_complete), and adds a test asserting the mappings "Add field" button and settings "Edit settings" switch are enabled for a fresh index. - Adds `NOT_SVL_SEARCH` to `tags.ts`, mirroring the existing `SERVERLESS_ONLY` pattern — excludes Search serverless, which manages individual indices through its own `search_indices` app rather than Index Management. - Page object gains `manageIndex`, `changeManageIndexTab`, `deleteIndexFromContextMenu`, `confirmDeleteIndexModal`, and `indexDetailsPage.changeTab`/`mappingsAddFieldButton`/`editSettingsSwitch`. - Deletes `indices.ts`, `index_detail.ts`, their `index.ts` loader, and the reference in `test_suites/management/index.ts`. ### Test plan Scout flaky test runner ran with `/flaky scoutConfig:x-pack/platform/plugins/shared/index_management/test/scout/ui/playwright.config.ts:30` [kibana-flaky-test-suite-runner#13724](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/13724) Locally: 5 passed on stateful classic, 5 passed on serverless observability_complete, 5 passed on serverless security_complete. <details> <summary>Migration details</summary> ## Counts | Suite | Before | After | |---|---|---| | FTR serverless (`test_suites/management/index_management/{indices,index_detail}.ts`) | 11 tests (runs on serverless Observability + Security → 22 test-runs) | deleted | | Scout UI (`index_actions_context_menu.spec.ts` + `index_details_page.spec.ts`) | 1 test, stateful-only | **5 tests in 2 specs** | The 5 Scout tests run as: 5 on stateful classic, 5 on serverless observability_complete, 5 on serverless security_complete (15 test-runs total). 11 FTR tests become 5 Scout tests because: (a) each FTR file duplicated "renders the indices tab" and "can create an index" as its own precondition — these collapse into one explicit "can create an index" test instead of two near-identical assertions; (b) the three "navigates to X tab" tests collapse into one test with a `test.step` per tab; (c) "renders the indices tab" is absorbed as an implicit precondition of `navigateToIndexManagementTab('indices')` rather than a standalone assertion, matching the convention from elastic#283397. ## Serverless FTR → Scout | FTR test | Scout test | Tag | |---|---|---| | `indices.ts` › renders the indices tab | absorbed — precondition of `navigateToIndexManagementTab('indices')` | — | | `indices.ts` › can create an index | `index_actions_context_menu.spec.ts` › can create an index | agnostic (`NOT_SVL_SEARCH`) | | `indices.ts` › navigates to overview | `index_actions_context_menu.spec.ts` › navigates to overview, settings, and mappings tabs from the manage index menu (step: navigates to the overview tab) | agnostic | | `indices.ts` › navigates to settings tab | merged — same test, step: navigates to the settings tab | agnostic | | `indices.ts` › navigates to mappings tab | merged — same test, step: navigates to the mappings tab | agnostic | | `indices.ts` › can delete index | `index_actions_context_menu.spec.ts` › can delete an index from the manage index menu | agnostic | | `index_detail.ts` › renders the indices tab | absorbed — duplicate of `indices.ts`'s own precondition | — | | `index_detail.ts` › can create an index | merged — duplicate of `indices.ts`'s create-index test | agnostic | | `index_detail.ts` › index with no documents | `index_details_page.spec.ts` › Shows enabled mappings and settings actions for a fresh index (step: overview, mappings, and settings tabs exist) | agnostic | | `index_detail.ts` › can add mappings | merged — same test, step: mappings "Add field" button is enabled | agnostic | | `index_detail.ts` › can edit settings | merged — same test, step: settings "Edit settings" switch is enabled | agnostic | ## Deltas worth calling out **Coverage gained on serverless Observability/Security**: the "create an index via the UI wizard" flow (previously stateful-only, via `home_page.spec.ts`) and the "navigate overview/settings/mappings tabs from the manage index menu" flow are now explicitly exercised on serverless too — closing the gap left by seeding the rest of this migration batch via `esClient.indices.create` instead of the UI. **Dropped as standalone tests**: "renders the indices tab" (both files, duplicated) and `index_detail.ts`'s duplicate "can create an index" — these restated preconditions as assertions rather than testing independent behavior. </details>
Part of #281244 ## Summary - Migrates the remaining Index Management FTR API suites (stateful + serverless) to Scout, completing the work done in #283397 and #283996. - Adds `x-pack/platform/plugins/shared/index_management/test/scout/api/` with 25 specs across `cluster_nodes`, `component_templates/`, `data_streams/`, `enrich_policies/`, `index_templates/` and `indices/`. - Deletes the stateful FTR suite `x-pack/platform/test/api_integration/apis/management/index_management/**` and the serverless FTR suite + services `x-pack/platform/test/serverless/api_integration/{test_suites,services}/index_management/**`, plus their config/manifest registrations. - `data_streams`: merges the stateful suite with the serverless `ds_common`/`ds_serverless` mirrors into one `deploymentAgnostic` `data_streams.spec.ts`. The old `ds_mki.ts` security-project branch becomes its own `data_streams_mki_security.spec.ts`, tagged `serverless.security.complete` and skipped unless `config.isCloud` (the default retention it asserts only exists on real Cloud projects). This mirrors the old FTR's `ds_serverless.ts`/`ds_mki.ts` split rather than loosening the generic assertion — no environment is left with weaker coverage than before. - `data_streams` logsdb cluster-settings matrix splits by environment because the defaults differ: `data_streams_logsdb_settings.spec.ts` (stateful-only, 4 cases including `logsdb.prior_logs_usage`) and `data_streams_logsdb_settings_serverless.spec.ts` (`serverless.all`, 3 cases, no `prior_logs_usage`). The plain index-mode assertion (no cluster-settings mutation) is its own agnostic `data_streams_index_mode.spec.ts`. - `indices`: merged CRUD/list/details into one agnostic `indices.spec.ts` (env-specific expected key sets via `forDeployment`); close/open/flush/refresh/forcemerge/clear-cache move to `indices_actions.spec.ts`, stateful-only since those actions aren't exposed on serverless. - `index_templates`: split into `index_templates.spec.ts` (agnostic CRUD/simulate/error-parsing), `index_templates_index_mode.spec.ts` (agnostic), `index_templates_legacy.spec.ts` and `index_templates_ilm_policy.spec.ts` (both stateful-only, legacy templates and ILM don't exist on serverless), and a logsdb cluster-settings pair mirroring the `data_streams` split: `index_templates_logsdb_settings.spec.ts` (stateful-only, 4 cases with `prior_logs_usage`) plus `index_templates_logsdb_settings_serverless.spec.ts` (`serverless.all`, 3 cases, no `prior_logs_usage` — same default-flip as its data-streams equivalent). - `component_templates`: single agnostic spec; drops the old serverless file's verbatim-duplicate `Update #2` block. - `enrich_policies`: merged list/execute/delete into one agnostic spec, replacing the old fixed `setTimeout(2000)` + loose `[200, 429]` delete-status assertion with a real retry loop on the ES 409/429 execution-lock response. - `create_enrich_policy`: merged create + field/index/data-stream discovery into one agnostic spec — the data-stream discovery cases were previously stateful-only pending serverless verification; they're confirmed working and now run everywhere. - `cluster_nodes`: single agnostic spec asserting the 200+array (stateful) vs 410 (serverless) contract via `forDeployment`. - Implements the previously-deferred/blocked item (migration plan batch 4, #27): a disabled-data-enrichers indices test now lives in a new test area, `test/scout_disabled_data_enrichers/api/`, backed by a new Scout server config set `disabled_data_enrichers` (`src/platform/packages/shared/kbn-scout/src/servers/configs/config_sets/disabled_data_enrichers/stateful/classic.stateful.config.ts`) that boots Kibana with `--xpack.rollup.ui.enabled=false --xpack.ccr.ui.enabled=false --xpack.ilm.ui.enabled=false`, since no existing config set disabled those plugin UIs at boot time. ### Test plan Scout flaky test runner: - `/flaky scoutConfig:x-pack/platform/plugins/shared/index_management/test/scout/api/playwright.config.ts:30` [kibana-flaky-test-suite-runner#13780](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/13780) - `/flaky scoutConfig:x-pack/platform/plugins/shared/index_management/test/scout_disabled_data_enrichers/api/playwright.config.ts:30` [kibana-flaky-test-suite-runner#13781](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/13781) <details> <summary>Migration details</summary> ## Counts | Suite | Before | After | |---|---|---| | FTR stateful API (`test/api_integration/apis/management/index_management/`, 18 test files) | 97 tests | deleted | | FTR serverless API (`test/serverless/api_integration/test_suites/index_management/`, 12 test files) | 59 tests (incl. 2 verbatim-duplicate `Update #2` tests) | deleted | | FTR stateful `disabled_data_enrichers/indices.ts` | 1 test (own CI config entry) | deleted | | Scout API (`test/scout/api/tests/`, 25 specs) | new | 108 tests, tagged `deploymentAgnostic` / `stateful.classic` / `serverless.all` / `serverless.security.complete` | | Scout `scout_disabled_data_enrichers/api/tests/` (1 spec) | new | 1 test, `stateful.classic` | 156 FTR tests (97 stateful + 59 serverless) become 109 Scout tests total (108 + 1): most stateful/serverless mirror pairs collapse into a single `deploymentAgnostic` test that runs on both; the duplicated `Update #2` block (2 tests) and `create_index.ts`'s `can create an index` (a duplicate of `indices.ts`'s own create case) are dropped as duplicates with no coverage lost. ## Stateful API FTR → Scout | FTR test (file) | Scout test | Tag | |---|---|---| | should fetch the nodes plugins (`cluster_nodes.ts`) | `cluster_nodes.spec.ts` › fetches the nodes plugins | agnostic | | should return an array of component templates (`component_templates.ts`) | `component_templates.spec.ts` › returns an array of component templates | agnostic | | should return a single component template | › returns a single component template | agnostic | | should create a component template | › creates a component template | agnostic | | should create a component template with a frozen_after lifecycle | › creates a component template with a frozen_after lifecycle | agnostic | | should create a component template with only required fields | › creates a component template with only required fields | agnostic | | should not allow creation of a component template with the same name of an existing one | › rejects creating a component template that already exists | agnostic | | should allow an existing component template to be updated | › updates an existing component template | agnostic | | should not allow a non-existing component template to be updated | › rejects updating a component template that does not exist | agnostic | | should allow a deprecated component template to be updated | › updates a deprecated component template | agnostic | | should delete a component template | › deletes a component template | agnostic | | should delete multiple component templates | › deletes multiple component templates | agnostic | | should return an error for any component templates not sucessfully deleted | › reports the component templates it could not delete | agnostic | | should return no datastreams | › returns no data streams for an unused component template | agnostic | | should return datastreams | › returns the data streams of a component template | agnostic | | Allows to create an enrich policy (`create_enrich_policy.ts`) | `create_enrich_policy.spec.ts` › allows to create an enrich policy | agnostic | | Can retrieve fields from indices | › can retrieve fields from indices | agnostic | | Can retrieve matching indices | › can retrieve matching indices | agnostic | | Can retrieve matching data streams | › can retrieve matching data streams — previously stateful-only pending verification, now agnostic | agnostic | | can create an index (`create_index.ts`) | dropped as duplicate of `indices.ts`'s own create case | — | | throws 400 when index already created | `indices.spec.ts` › rejects creating an index that already exists | agnostic | | ILM data is fetched by the ILM data enricher (`data_enrichers/ilm.ts`) | `data_enrichers_ilm.spec.ts` › reports the ILM policy of a managed index | stateful | | ILM data is not empty even if the index unmanaged | › reports ILM data for an unmanaged index | stateful | | returns an array of data streams (`data_streams.ts`) | `data_streams.spec.ts` › lists the data streams (skipped on Security MKI, see `data_streams_mki_security.spec.ts`) | agnostic | | includes stats when provided the includeStats query parameter | › includes stats when asked for them (same skip) | agnostic | | returns a single data stream by ID | › returns a single data stream by name (same skip) | agnostic | | updates the data retention of a DS | › updates the data retention of a data stream | agnostic | | updates the data retention of multiple DS | › updates the data retention of multiple data streams | agnostic | | sets data retention to infinite | › sets the data retention to infinite | agnostic | | can disable lifecycle for a given policy | `data_streams_disable_lifecycle.spec.ts` › disables the lifecycle of a data stream | stateful | | updates the failure store configuration | `data_streams.spec.ts` › updates the failure store configuration | agnostic | | deletes multiple data streams | › deletes multiple data streams | agnostic | | Apply mapping from index template | › applies the mappings of the index template | agnostic | | Rollover datastreams | › rolls a data stream over | agnostic | | correctly returns index mode property based on index settings (`data_streams_index_mode.ts`) | `data_streams_index_mode.spec.ts` › same | agnostic | | returns … index mode if logsdb.enabled is … and prior_logs_usage is … (×4 loop) | `data_streams_logsdb_settings.spec.ts` › same (×4) | stateful | | doesn't send ILM, CCR and Rollups requests (`disabled_data_enrichers/indices.ts`) | `scout_disabled_data_enrichers/api/tests/indices.spec.ts` › same | stateful | | should list all policies (`enrich_policies.ts`) | `enrich_policies.spec.ts` › lists the enrich policies | agnostic | | should be able to execute a policy | › executes an enrich policy | agnostic | | should be able to delete a policy | › deletes an enrich policy | agnostic | | falls back to the cluster default failed data retention when no override is set (`failure_store_settings.ts`) | `failure_store_settings.spec.ts` › same | agnostic | | reflects the persistent cluster default failed data retention override | › same | agnostic | | returns index details (`index_details.ts`) | `indices.spec.ts` › returns the details of a single index | agnostic | | throws 404 when index doesn't exist | › returns 404 for an index that does not exist | agnostic | | returns counts per index and fills missing buckets with 0 (`index_doc_count.ts`) | `index_doc_count.spec.ts` › same | stateful | | returns counts for > 10 indices | › returns counts for more than 10 indices | stateful | | supports 255 character index names (20 indices) | › supports 255 character index names | stateful | | validates request body (indexNames must be non-empty) | › rejects an empty list of index names | stateful | | should create an index (`indices.ts`) | `indices.spec.ts` › creates an index with an index mode | agnostic | | should require index name to be provided | › rejects creating an index without a name | agnostic | | should create an index without index mode | › creates an index without an index mode | agnostic | | should clear the cache on a single index | `indices_actions.spec.ts` › clears the cache of an index | stateful | | should close an index | › closes an index | stateful | | should open an index | › opens an index | stateful | | should delete an index | `indices.spec.ts` › deletes an index | agnostic | | should require index or indices to be provided | › rejects a delete without an index name | agnostic | | should flush an index | `indices_actions.spec.ts` › flushes an index | stateful | | should refresh an index | › refreshes an index | stateful | | should force merge an index | › force merges an index | stateful | | should allow to define the number of segments | › force merges an index into a given number of segments | stateful | | should list all the indices with the expected properties and data enrichers | `indices.spec.ts` › lists the indices with the expected properties | agnostic | | should list all the indices … (reload) | › reloads the indices with the expected properties | agnostic | | should allow reloading only certain indices | › reloads only the requested indices | agnostic | | should get the index mappings (`mapping.ts`) | `mappings.spec.ts` › gets the index mappings | agnostic | | show update the index mappings | › updates the index mappings | agnostic | | should fetch an index settings (`settings.ts`) | `settings.spec.ts` › fetches an index settings | agnostic | | should update an index settings | › updates an index settings | agnostic | | reports no default repository when none is configured (`snapshot_repositories.ts`) | `snapshot_repositories.spec.ts` › same | stateful | | reports the configured default repository | › same | stateful | | should fetch the index stats (`stats.ts`) | `stats.spec.ts` › fetches the index stats | stateful | | should list all the index templates … (`templates.ts`, get all) | `index_templates.spec.ts` › lists the index templates with the expected parameters (split by template kind — see below) | agnostic | | should return an index template with the expected parameters (get one) | › returns an index template with the expected parameters | agnostic | | should return a legacy index template with the expected parameters (get one) | `index_templates_legacy.spec.ts` › returns a legacy index template with the expected parameters | stateful | | should round-trip a data stream template with a frozen_after lifecycle | `index_templates.spec.ts` › round-trips a data stream template with a frozen_after lifecycle — previously stateful-only, now agnostic | agnostic | | should return an index template with the expected parameters (with index mode) | `index_templates_index_mode.spec.ts` › returns an index template carrying its index mode | agnostic | | should return a legacy index template with the expected parameters (with index mode) | `index_templates_legacy.spec.ts` › returns a legacy index template carrying an index mode | stateful | | returns … index mode if logsdb.enabled is … and prior_logs_usage is … (×4 loop, `templates.ts`) | `index_templates_logsdb_settings.spec.ts` › same (×4) | stateful | | should create an index template | `index_templates.spec.ts` › creates an index template | agnostic | | should create a legacy index template | `index_templates_legacy.spec.ts` › creates a legacy index template | stateful | | should throw a 409 conflict when trying to create 2 templates with the same name | `index_templates.spec.ts` › rejects creating two templates with the same name | agnostic | | should validate the request payload | › validates the request payload | agnostic | | should parse the ES error and return the cause (create) | › parses the Elasticsearch error of a create and returns its cause | agnostic | | should update an index template | › updates an index template | agnostic | | should update a legacy index template | `index_templates_legacy.spec.ts` › updates a legacy index template | stateful | | should parse the ES error and return the cause (update) | `index_templates.spec.ts` › parses the Elasticsearch error of an update and returns its cause | agnostic | | should update a deprecated index template | › updates a deprecated index template | agnostic | | should delete an index template | › deletes an index template | agnostic | | should delete a legacy index template | `index_templates_legacy.spec.ts` › deletes a legacy index template | stateful | | should simulate an index template | `index_templates.spec.ts` › simulates an index template | agnostic | | should simulate an index template by name | › simulates an index template by name | agnostic | | should simulate an index template by name with a related data stream | › simulates an index template by name with a related data stream | agnostic | `index_templates_ilm_policy.spec.ts`'s two tests (`lists`/`returns an index template carrying its ILM policy`) formalize ILM-policy coverage that was folded into the `templates.ts` `get all`/`get one` fixture setup rather than asserted as its own case in FTR — kept stateful-only since ILM doesn't run on serverless. ## Serverless API FTR → Scout | FTR test (file) | Scout test | Tag | |---|---|---| | should NOT fetch the nodes plugins in serverless (`cluster_nodes.ts`) | merged into `cluster_nodes.spec.ts` (410/no-array branch) | agnostic | | should return an array of component templates (`index_component_templates.ts`) | merged into `component_templates.spec.ts` | agnostic | | should return a single component template | merged | agnostic | | should allow an existing component template to be updated (`Update #1`) | merged | agnostic | | should not allow a non-existing component template to be updated (`Update #1`) | merged | agnostic | | should allow an existing component template to be updated (`Update #2`) | dropped — verbatim duplicate of `Update #1` | — | | should not allow a non-existing component template to be updated (`Update #2`) | dropped — verbatim duplicate of `Update #1` | — | | should delete a component template | merged | agnostic | | should delete multiple component templates | merged | agnostic | | should return an error for any component templates not sucessfully deleted | merged | agnostic | | should return no datastreams | merged | agnostic | | should return datastreams | merged | agnostic | | Allows to create an enrich policy (`create_enrich_policies.ts`) | merged into `create_enrich_policy.spec.ts` | agnostic | | Can retrieve fields from indices | merged | agnostic | | Can retrieve matching indices | merged | agnostic | | returns … index mode if logsdb.enabled is … (×3 loop, `ds_common.ts`) | `data_streams_logsdb_settings_serverless.spec.ts` › same (×3, no `prior_logs_usage`) | serverless | | updates the data retention of a DS | merged into `data_streams.spec.ts` | agnostic | | sets data retention to infinite | merged | agnostic | | deletes multiple data streams | merged | agnostic | | Apply mapping from index template | merged | agnostic | | Rollover datastreams | merged | agnostic | | returns an array of data streams (`ds_serverless.ts`, metering shape) | merged into `data_streams.spec.ts` (env-conditional stats via `forDeployment`) | agnostic | | returns a single data stream by ID | merged | agnostic | | returns an array of data streams (`ds_mki.ts`, security-project branch) | `data_streams_mki_security.spec.ts` › lists the data streams | serverless security complete | | returns a single data stream by ID | `data_streams_mki_security.spec.ts` › returns a single data stream by name | serverless security complete | | should list all policies (`enrich_policies.ts`) | merged into `enrich_policies.spec.ts` | agnostic | | should be able to execute a policy | merged | agnostic | | should be able to delete a policy | merged | agnostic | | returns the cluster default failed data retention with the expected shape (`failure_store_settings.ts`) | merged into `failure_store_settings.spec.ts` | agnostic | | reflects the persistent cluster default failed data retention override | merged | agnostic | | should list all the index templates with the expected parameters (`index_templates.ts`, all) | merged into `index_templates.spec.ts` | agnostic | | should list all the index templates … (with index mode) | `index_templates_index_mode.spec.ts` › lists an index template carrying its index mode | agnostic | | should return an index template with the expected parameters (one) | merged into `index_templates.spec.ts` | agnostic | | returns … index mode if logsdb.enabled is … (×3 loop, with logs-*-* pattern) | `index_templates_logsdb_settings_serverless.spec.ts` › same (×3, no `prior_logs_usage`) | serverless | | should return an index template with the expected parameters (with index mode) | `index_templates_index_mode.spec.ts` › returns an index template carrying its index mode | agnostic | | should create an index template | merged into `index_templates.spec.ts` | agnostic | | should throw a 409 conflict when trying to create 2 templates with the same name | merged | agnostic | | should validate the request payload | merged | agnostic | | should parse the ES error and return the cause (create) | merged | agnostic | | should update an index template | merged | agnostic | | should parse the ES error and return the cause (update) | merged | agnostic | | should delete an index template | merged | agnostic | | should simulate an index template | merged | agnostic | | should list all the indices with the expected properties (`indices.ts`) | merged into `indices.spec.ts` (serverless expected-keys branch) | agnostic | | returns index details for the specified index name | merged | agnostic | | throws 404 for a non-existent index | merged | agnostic | | can create a new index | merged | agnostic | | fails to re-create the same index | merged | agnostic | | should list all the indices … (reload) | merged | agnostic | | should allow reloading only certain indices | merged | agnostic | | should delete an index | merged | agnostic | | should require index or indices to be provided | merged | agnostic | | should get the index mappings (`mappings.ts`) | merged into `mappings.spec.ts` | agnostic | | should fetch an index settings (`settings.ts`) | merged into `settings.spec.ts` | agnostic | | should update an index settings | merged | agnostic | ## Deltas worth calling out **Design decision, not a regression**: the Security-MKI project-level default retention (#241105) is asserted exclusively in `data_streams_mki_security.spec.ts` (Cloud-only, `serverless.security.complete`), while `data_streams.spec.ts` explicitly skips those same 3 assertions (`isMkiSecurity`) and defers to it. This is the same mutually-exclusive split the old FTR had (`ds_serverless.ts` generic assertions vs. `ds_mki.ts` security-project branch) — reimplemented rather than dropped or loosened. **Coverage gained on serverless**: `create_enrich_policy.spec.ts`'s data-stream discovery cases (`get_fields_from_indices`/`get_matching_data_streams`) and `index_templates.spec.ts`'s `frozen_after` lifecycle round-trip were stateful-only in FTR pending serverless verification; both are now `deploymentAgnostic`. `component_templates.spec.ts`'s whole Create block (4 tests) had no serverless FTR equivalent (`index_component_templates.ts` lacked a Create describe) and is now agnostic too. The serverless-only `logsdb.enabled` matrix for index templates (`SL-API/index_templates.ts`'s "with logs-*-* index pattern", 3 cases) also has a Scout home now — `index_templates_logsdb_settings_serverless.spec.ts` — mirroring `data_streams_logsdb_settings_serverless.spec.ts`'s pattern (unset `cluster.logsdb.enabled` defaults to `logsdb` on serverless, the opposite of stateful). **Dropped as duplicates (no coverage lost)**: `SL-API/index_component_templates.ts`'s `Update #2` describe block (verbatim copy of `Update #1`); `SF-API/create_index.ts`'s `can create an index` (duplicate of `indices.ts`'s own create case, folded per the documented migration-plan decision). </details> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Part of elastic#281244 ## Summary - Migrates the remaining Index Management FTR API suites (stateful + serverless) to Scout, completing the work done in elastic#283397 and elastic#283996. - Adds `x-pack/platform/plugins/shared/index_management/test/scout/api/` with 25 specs across `cluster_nodes`, `component_templates/`, `data_streams/`, `enrich_policies/`, `index_templates/` and `indices/`. - Deletes the stateful FTR suite `x-pack/platform/test/api_integration/apis/management/index_management/**` and the serverless FTR suite + services `x-pack/platform/test/serverless/api_integration/{test_suites,services}/index_management/**`, plus their config/manifest registrations. - `data_streams`: merges the stateful suite with the serverless `ds_common`/`ds_serverless` mirrors into one `deploymentAgnostic` `data_streams.spec.ts`. The old `ds_mki.ts` security-project branch becomes its own `data_streams_mki_security.spec.ts`, tagged `serverless.security.complete` and skipped unless `config.isCloud` (the default retention it asserts only exists on real Cloud projects). This mirrors the old FTR's `ds_serverless.ts`/`ds_mki.ts` split rather than loosening the generic assertion — no environment is left with weaker coverage than before. - `data_streams` logsdb cluster-settings matrix splits by environment because the defaults differ: `data_streams_logsdb_settings.spec.ts` (stateful-only, 4 cases including `logsdb.prior_logs_usage`) and `data_streams_logsdb_settings_serverless.spec.ts` (`serverless.all`, 3 cases, no `prior_logs_usage`). The plain index-mode assertion (no cluster-settings mutation) is its own agnostic `data_streams_index_mode.spec.ts`. - `indices`: merged CRUD/list/details into one agnostic `indices.spec.ts` (env-specific expected key sets via `forDeployment`); close/open/flush/refresh/forcemerge/clear-cache move to `indices_actions.spec.ts`, stateful-only since those actions aren't exposed on serverless. - `index_templates`: split into `index_templates.spec.ts` (agnostic CRUD/simulate/error-parsing), `index_templates_index_mode.spec.ts` (agnostic), `index_templates_legacy.spec.ts` and `index_templates_ilm_policy.spec.ts` (both stateful-only, legacy templates and ILM don't exist on serverless), and a logsdb cluster-settings pair mirroring the `data_streams` split: `index_templates_logsdb_settings.spec.ts` (stateful-only, 4 cases with `prior_logs_usage`) plus `index_templates_logsdb_settings_serverless.spec.ts` (`serverless.all`, 3 cases, no `prior_logs_usage` — same default-flip as its data-streams equivalent). - `component_templates`: single agnostic spec; drops the old serverless file's verbatim-duplicate `Update #2` block. - `enrich_policies`: merged list/execute/delete into one agnostic spec, replacing the old fixed `setTimeout(2000)` + loose `[200, 429]` delete-status assertion with a real retry loop on the ES 409/429 execution-lock response. - `create_enrich_policy`: merged create + field/index/data-stream discovery into one agnostic spec — the data-stream discovery cases were previously stateful-only pending serverless verification; they're confirmed working and now run everywhere. - `cluster_nodes`: single agnostic spec asserting the 200+array (stateful) vs 410 (serverless) contract via `forDeployment`. - Implements the previously-deferred/blocked item (migration plan batch 4, elastic#27): a disabled-data-enrichers indices test now lives in a new test area, `test/scout_disabled_data_enrichers/api/`, backed by a new Scout server config set `disabled_data_enrichers` (`src/platform/packages/shared/kbn-scout/src/servers/configs/config_sets/disabled_data_enrichers/stateful/classic.stateful.config.ts`) that boots Kibana with `--xpack.rollup.ui.enabled=false --xpack.ccr.ui.enabled=false --xpack.ilm.ui.enabled=false`, since no existing config set disabled those plugin UIs at boot time. ### Test plan Scout flaky test runner: - `/flaky scoutConfig:x-pack/platform/plugins/shared/index_management/test/scout/api/playwright.config.ts:30` [kibana-flaky-test-suite-runner#13780](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/13780) - `/flaky scoutConfig:x-pack/platform/plugins/shared/index_management/test/scout_disabled_data_enrichers/api/playwright.config.ts:30` [kibana-flaky-test-suite-runner#13781](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/13781) <details> <summary>Migration details</summary> ## Counts | Suite | Before | After | |---|---|---| | FTR stateful API (`test/api_integration/apis/management/index_management/`, 18 test files) | 97 tests | deleted | | FTR serverless API (`test/serverless/api_integration/test_suites/index_management/`, 12 test files) | 59 tests (incl. 2 verbatim-duplicate `Update #2` tests) | deleted | | FTR stateful `disabled_data_enrichers/indices.ts` | 1 test (own CI config entry) | deleted | | Scout API (`test/scout/api/tests/`, 25 specs) | new | 108 tests, tagged `deploymentAgnostic` / `stateful.classic` / `serverless.all` / `serverless.security.complete` | | Scout `scout_disabled_data_enrichers/api/tests/` (1 spec) | new | 1 test, `stateful.classic` | 156 FTR tests (97 stateful + 59 serverless) become 109 Scout tests total (108 + 1): most stateful/serverless mirror pairs collapse into a single `deploymentAgnostic` test that runs on both; the duplicated `Update #2` block (2 tests) and `create_index.ts`'s `can create an index` (a duplicate of `indices.ts`'s own create case) are dropped as duplicates with no coverage lost. ## Stateful API FTR → Scout | FTR test (file) | Scout test | Tag | |---|---|---| | should fetch the nodes plugins (`cluster_nodes.ts`) | `cluster_nodes.spec.ts` › fetches the nodes plugins | agnostic | | should return an array of component templates (`component_templates.ts`) | `component_templates.spec.ts` › returns an array of component templates | agnostic | | should return a single component template | › returns a single component template | agnostic | | should create a component template | › creates a component template | agnostic | | should create a component template with a frozen_after lifecycle | › creates a component template with a frozen_after lifecycle | agnostic | | should create a component template with only required fields | › creates a component template with only required fields | agnostic | | should not allow creation of a component template with the same name of an existing one | › rejects creating a component template that already exists | agnostic | | should allow an existing component template to be updated | › updates an existing component template | agnostic | | should not allow a non-existing component template to be updated | › rejects updating a component template that does not exist | agnostic | | should allow a deprecated component template to be updated | › updates a deprecated component template | agnostic | | should delete a component template | › deletes a component template | agnostic | | should delete multiple component templates | › deletes multiple component templates | agnostic | | should return an error for any component templates not sucessfully deleted | › reports the component templates it could not delete | agnostic | | should return no datastreams | › returns no data streams for an unused component template | agnostic | | should return datastreams | › returns the data streams of a component template | agnostic | | Allows to create an enrich policy (`create_enrich_policy.ts`) | `create_enrich_policy.spec.ts` › allows to create an enrich policy | agnostic | | Can retrieve fields from indices | › can retrieve fields from indices | agnostic | | Can retrieve matching indices | › can retrieve matching indices | agnostic | | Can retrieve matching data streams | › can retrieve matching data streams — previously stateful-only pending verification, now agnostic | agnostic | | can create an index (`create_index.ts`) | dropped as duplicate of `indices.ts`'s own create case | — | | throws 400 when index already created | `indices.spec.ts` › rejects creating an index that already exists | agnostic | | ILM data is fetched by the ILM data enricher (`data_enrichers/ilm.ts`) | `data_enrichers_ilm.spec.ts` › reports the ILM policy of a managed index | stateful | | ILM data is not empty even if the index unmanaged | › reports ILM data for an unmanaged index | stateful | | returns an array of data streams (`data_streams.ts`) | `data_streams.spec.ts` › lists the data streams (skipped on Security MKI, see `data_streams_mki_security.spec.ts`) | agnostic | | includes stats when provided the includeStats query parameter | › includes stats when asked for them (same skip) | agnostic | | returns a single data stream by ID | › returns a single data stream by name (same skip) | agnostic | | updates the data retention of a DS | › updates the data retention of a data stream | agnostic | | updates the data retention of multiple DS | › updates the data retention of multiple data streams | agnostic | | sets data retention to infinite | › sets the data retention to infinite | agnostic | | can disable lifecycle for a given policy | `data_streams_disable_lifecycle.spec.ts` › disables the lifecycle of a data stream | stateful | | updates the failure store configuration | `data_streams.spec.ts` › updates the failure store configuration | agnostic | | deletes multiple data streams | › deletes multiple data streams | agnostic | | Apply mapping from index template | › applies the mappings of the index template | agnostic | | Rollover datastreams | › rolls a data stream over | agnostic | | correctly returns index mode property based on index settings (`data_streams_index_mode.ts`) | `data_streams_index_mode.spec.ts` › same | agnostic | | returns … index mode if logsdb.enabled is … and prior_logs_usage is … (×4 loop) | `data_streams_logsdb_settings.spec.ts` › same (×4) | stateful | | doesn't send ILM, CCR and Rollups requests (`disabled_data_enrichers/indices.ts`) | `scout_disabled_data_enrichers/api/tests/indices.spec.ts` › same | stateful | | should list all policies (`enrich_policies.ts`) | `enrich_policies.spec.ts` › lists the enrich policies | agnostic | | should be able to execute a policy | › executes an enrich policy | agnostic | | should be able to delete a policy | › deletes an enrich policy | agnostic | | falls back to the cluster default failed data retention when no override is set (`failure_store_settings.ts`) | `failure_store_settings.spec.ts` › same | agnostic | | reflects the persistent cluster default failed data retention override | › same | agnostic | | returns index details (`index_details.ts`) | `indices.spec.ts` › returns the details of a single index | agnostic | | throws 404 when index doesn't exist | › returns 404 for an index that does not exist | agnostic | | returns counts per index and fills missing buckets with 0 (`index_doc_count.ts`) | `index_doc_count.spec.ts` › same | stateful | | returns counts for > 10 indices | › returns counts for more than 10 indices | stateful | | supports 255 character index names (20 indices) | › supports 255 character index names | stateful | | validates request body (indexNames must be non-empty) | › rejects an empty list of index names | stateful | | should create an index (`indices.ts`) | `indices.spec.ts` › creates an index with an index mode | agnostic | | should require index name to be provided | › rejects creating an index without a name | agnostic | | should create an index without index mode | › creates an index without an index mode | agnostic | | should clear the cache on a single index | `indices_actions.spec.ts` › clears the cache of an index | stateful | | should close an index | › closes an index | stateful | | should open an index | › opens an index | stateful | | should delete an index | `indices.spec.ts` › deletes an index | agnostic | | should require index or indices to be provided | › rejects a delete without an index name | agnostic | | should flush an index | `indices_actions.spec.ts` › flushes an index | stateful | | should refresh an index | › refreshes an index | stateful | | should force merge an index | › force merges an index | stateful | | should allow to define the number of segments | › force merges an index into a given number of segments | stateful | | should list all the indices with the expected properties and data enrichers | `indices.spec.ts` › lists the indices with the expected properties | agnostic | | should list all the indices … (reload) | › reloads the indices with the expected properties | agnostic | | should allow reloading only certain indices | › reloads only the requested indices | agnostic | | should get the index mappings (`mapping.ts`) | `mappings.spec.ts` › gets the index mappings | agnostic | | show update the index mappings | › updates the index mappings | agnostic | | should fetch an index settings (`settings.ts`) | `settings.spec.ts` › fetches an index settings | agnostic | | should update an index settings | › updates an index settings | agnostic | | reports no default repository when none is configured (`snapshot_repositories.ts`) | `snapshot_repositories.spec.ts` › same | stateful | | reports the configured default repository | › same | stateful | | should fetch the index stats (`stats.ts`) | `stats.spec.ts` › fetches the index stats | stateful | | should list all the index templates … (`templates.ts`, get all) | `index_templates.spec.ts` › lists the index templates with the expected parameters (split by template kind — see below) | agnostic | | should return an index template with the expected parameters (get one) | › returns an index template with the expected parameters | agnostic | | should return a legacy index template with the expected parameters (get one) | `index_templates_legacy.spec.ts` › returns a legacy index template with the expected parameters | stateful | | should round-trip a data stream template with a frozen_after lifecycle | `index_templates.spec.ts` › round-trips a data stream template with a frozen_after lifecycle — previously stateful-only, now agnostic | agnostic | | should return an index template with the expected parameters (with index mode) | `index_templates_index_mode.spec.ts` › returns an index template carrying its index mode | agnostic | | should return a legacy index template with the expected parameters (with index mode) | `index_templates_legacy.spec.ts` › returns a legacy index template carrying an index mode | stateful | | returns … index mode if logsdb.enabled is … and prior_logs_usage is … (×4 loop, `templates.ts`) | `index_templates_logsdb_settings.spec.ts` › same (×4) | stateful | | should create an index template | `index_templates.spec.ts` › creates an index template | agnostic | | should create a legacy index template | `index_templates_legacy.spec.ts` › creates a legacy index template | stateful | | should throw a 409 conflict when trying to create 2 templates with the same name | `index_templates.spec.ts` › rejects creating two templates with the same name | agnostic | | should validate the request payload | › validates the request payload | agnostic | | should parse the ES error and return the cause (create) | › parses the Elasticsearch error of a create and returns its cause | agnostic | | should update an index template | › updates an index template | agnostic | | should update a legacy index template | `index_templates_legacy.spec.ts` › updates a legacy index template | stateful | | should parse the ES error and return the cause (update) | `index_templates.spec.ts` › parses the Elasticsearch error of an update and returns its cause | agnostic | | should update a deprecated index template | › updates a deprecated index template | agnostic | | should delete an index template | › deletes an index template | agnostic | | should delete a legacy index template | `index_templates_legacy.spec.ts` › deletes a legacy index template | stateful | | should simulate an index template | `index_templates.spec.ts` › simulates an index template | agnostic | | should simulate an index template by name | › simulates an index template by name | agnostic | | should simulate an index template by name with a related data stream | › simulates an index template by name with a related data stream | agnostic | `index_templates_ilm_policy.spec.ts`'s two tests (`lists`/`returns an index template carrying its ILM policy`) formalize ILM-policy coverage that was folded into the `templates.ts` `get all`/`get one` fixture setup rather than asserted as its own case in FTR — kept stateful-only since ILM doesn't run on serverless. ## Serverless API FTR → Scout | FTR test (file) | Scout test | Tag | |---|---|---| | should NOT fetch the nodes plugins in serverless (`cluster_nodes.ts`) | merged into `cluster_nodes.spec.ts` (410/no-array branch) | agnostic | | should return an array of component templates (`index_component_templates.ts`) | merged into `component_templates.spec.ts` | agnostic | | should return a single component template | merged | agnostic | | should allow an existing component template to be updated (`Update #1`) | merged | agnostic | | should not allow a non-existing component template to be updated (`Update #1`) | merged | agnostic | | should allow an existing component template to be updated (`Update #2`) | dropped — verbatim duplicate of `Update #1` | — | | should not allow a non-existing component template to be updated (`Update #2`) | dropped — verbatim duplicate of `Update #1` | — | | should delete a component template | merged | agnostic | | should delete multiple component templates | merged | agnostic | | should return an error for any component templates not sucessfully deleted | merged | agnostic | | should return no datastreams | merged | agnostic | | should return datastreams | merged | agnostic | | Allows to create an enrich policy (`create_enrich_policies.ts`) | merged into `create_enrich_policy.spec.ts` | agnostic | | Can retrieve fields from indices | merged | agnostic | | Can retrieve matching indices | merged | agnostic | | returns … index mode if logsdb.enabled is … (×3 loop, `ds_common.ts`) | `data_streams_logsdb_settings_serverless.spec.ts` › same (×3, no `prior_logs_usage`) | serverless | | updates the data retention of a DS | merged into `data_streams.spec.ts` | agnostic | | sets data retention to infinite | merged | agnostic | | deletes multiple data streams | merged | agnostic | | Apply mapping from index template | merged | agnostic | | Rollover datastreams | merged | agnostic | | returns an array of data streams (`ds_serverless.ts`, metering shape) | merged into `data_streams.spec.ts` (env-conditional stats via `forDeployment`) | agnostic | | returns a single data stream by ID | merged | agnostic | | returns an array of data streams (`ds_mki.ts`, security-project branch) | `data_streams_mki_security.spec.ts` › lists the data streams | serverless security complete | | returns a single data stream by ID | `data_streams_mki_security.spec.ts` › returns a single data stream by name | serverless security complete | | should list all policies (`enrich_policies.ts`) | merged into `enrich_policies.spec.ts` | agnostic | | should be able to execute a policy | merged | agnostic | | should be able to delete a policy | merged | agnostic | | returns the cluster default failed data retention with the expected shape (`failure_store_settings.ts`) | merged into `failure_store_settings.spec.ts` | agnostic | | reflects the persistent cluster default failed data retention override | merged | agnostic | | should list all the index templates with the expected parameters (`index_templates.ts`, all) | merged into `index_templates.spec.ts` | agnostic | | should list all the index templates … (with index mode) | `index_templates_index_mode.spec.ts` › lists an index template carrying its index mode | agnostic | | should return an index template with the expected parameters (one) | merged into `index_templates.spec.ts` | agnostic | | returns … index mode if logsdb.enabled is … (×3 loop, with logs-*-* pattern) | `index_templates_logsdb_settings_serverless.spec.ts` › same (×3, no `prior_logs_usage`) | serverless | | should return an index template with the expected parameters (with index mode) | `index_templates_index_mode.spec.ts` › returns an index template carrying its index mode | agnostic | | should create an index template | merged into `index_templates.spec.ts` | agnostic | | should throw a 409 conflict when trying to create 2 templates with the same name | merged | agnostic | | should validate the request payload | merged | agnostic | | should parse the ES error and return the cause (create) | merged | agnostic | | should update an index template | merged | agnostic | | should parse the ES error and return the cause (update) | merged | agnostic | | should delete an index template | merged | agnostic | | should simulate an index template | merged | agnostic | | should list all the indices with the expected properties (`indices.ts`) | merged into `indices.spec.ts` (serverless expected-keys branch) | agnostic | | returns index details for the specified index name | merged | agnostic | | throws 404 for a non-existent index | merged | agnostic | | can create a new index | merged | agnostic | | fails to re-create the same index | merged | agnostic | | should list all the indices … (reload) | merged | agnostic | | should allow reloading only certain indices | merged | agnostic | | should delete an index | merged | agnostic | | should require index or indices to be provided | merged | agnostic | | should get the index mappings (`mappings.ts`) | merged into `mappings.spec.ts` | agnostic | | should fetch an index settings (`settings.ts`) | merged into `settings.spec.ts` | agnostic | | should update an index settings | merged | agnostic | ## Deltas worth calling out **Design decision, not a regression**: the Security-MKI project-level default retention (elastic#241105) is asserted exclusively in `data_streams_mki_security.spec.ts` (Cloud-only, `serverless.security.complete`), while `data_streams.spec.ts` explicitly skips those same 3 assertions (`isMkiSecurity`) and defers to it. This is the same mutually-exclusive split the old FTR had (`ds_serverless.ts` generic assertions vs. `ds_mki.ts` security-project branch) — reimplemented rather than dropped or loosened. **Coverage gained on serverless**: `create_enrich_policy.spec.ts`'s data-stream discovery cases (`get_fields_from_indices`/`get_matching_data_streams`) and `index_templates.spec.ts`'s `frozen_after` lifecycle round-trip were stateful-only in FTR pending serverless verification; both are now `deploymentAgnostic`. `component_templates.spec.ts`'s whole Create block (4 tests) had no serverless FTR equivalent (`index_component_templates.ts` lacked a Create describe) and is now agnostic too. The serverless-only `logsdb.enabled` matrix for index templates (`SL-API/index_templates.ts`'s "with logs-*-* index pattern", 3 cases) also has a Scout home now — `index_templates_logsdb_settings_serverless.spec.ts` — mirroring `data_streams_logsdb_settings_serverless.spec.ts`'s pattern (unset `cluster.logsdb.enabled` defaults to `logsdb` on serverless, the opposite of stateful). **Dropped as duplicates (no coverage lost)**: `SL-API/index_component_templates.ts`'s `Update #2` describe block (verbatim copy of `Update #1`); `SF-API/create_index.ts`'s `can create an index` (duplicate of `indices.ts`'s own create case, folded per the documented migration-plan decision). </details> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Part of elastic#281244 ## Summary Migrates the last two serverless-only FTR files for `index_management` to Scout — `indices.ts` and `index_detail.ts` under `x-pack/platform/test/serverless/functional/test_suites/management/index_management/` — completing the FTR → Scout migration for this plugin, per the [FTR → Scout migration](elastic#263554). These two files were deliberately left out of elastic#283397 because they overlapped with the existing Scout coverage in `index_details_page.spec.ts` and `home_page.spec.ts`; this PR reconciles the remaining gaps and deletes the FTR files. - Adds `index_actions_context_menu.spec.ts`: manage-index context menu navigation (overview/settings/mappings tabs) and delete-index flow, plus a "can create an index" test that seeds through the UI wizard (`clickCreateIndexButton` → `setCreateIndexName` → `clickCreateIndexSaveButton`), restoring UI-wizard coverage that the rest of this migration batch narrowed to stateful-only by seeding via `esClient.indices.create` instead. - Widens `index_details_page.spec.ts` from `tags.stateful.classic` to a new `NOT_SVL_SEARCH` tag (stateful classic + serverless observability_complete + serverless security_complete), and adds a test asserting the mappings "Add field" button and settings "Edit settings" switch are enabled for a fresh index. - Adds `NOT_SVL_SEARCH` to `tags.ts`, mirroring the existing `SERVERLESS_ONLY` pattern — excludes Search serverless, which manages individual indices through its own `search_indices` app rather than Index Management. - Page object gains `manageIndex`, `changeManageIndexTab`, `deleteIndexFromContextMenu`, `confirmDeleteIndexModal`, and `indexDetailsPage.changeTab`/`mappingsAddFieldButton`/`editSettingsSwitch`. - Deletes `indices.ts`, `index_detail.ts`, their `index.ts` loader, and the reference in `test_suites/management/index.ts`. ### Test plan Scout flaky test runner ran with `/flaky scoutConfig:x-pack/platform/plugins/shared/index_management/test/scout/ui/playwright.config.ts:30` [kibana-flaky-test-suite-runner#13724](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/13724) Locally: 5 passed on stateful classic, 5 passed on serverless observability_complete, 5 passed on serverless security_complete. <details> <summary>Migration details</summary> ## Counts | Suite | Before | After | |---|---|---| | FTR serverless (`test_suites/management/index_management/{indices,index_detail}.ts`) | 11 tests (runs on serverless Observability + Security → 22 test-runs) | deleted | | Scout UI (`index_actions_context_menu.spec.ts` + `index_details_page.spec.ts`) | 1 test, stateful-only | **5 tests in 2 specs** | The 5 Scout tests run as: 5 on stateful classic, 5 on serverless observability_complete, 5 on serverless security_complete (15 test-runs total). 11 FTR tests become 5 Scout tests because: (a) each FTR file duplicated "renders the indices tab" and "can create an index" as its own precondition — these collapse into one explicit "can create an index" test instead of two near-identical assertions; (b) the three "navigates to X tab" tests collapse into one test with a `test.step` per tab; (c) "renders the indices tab" is absorbed as an implicit precondition of `navigateToIndexManagementTab('indices')` rather than a standalone assertion, matching the convention from elastic#283397. ## Serverless FTR → Scout | FTR test | Scout test | Tag | |---|---|---| | `indices.ts` › renders the indices tab | absorbed — precondition of `navigateToIndexManagementTab('indices')` | — | | `indices.ts` › can create an index | `index_actions_context_menu.spec.ts` › can create an index | agnostic (`NOT_SVL_SEARCH`) | | `indices.ts` › navigates to overview | `index_actions_context_menu.spec.ts` › navigates to overview, settings, and mappings tabs from the manage index menu (step: navigates to the overview tab) | agnostic | | `indices.ts` › navigates to settings tab | merged — same test, step: navigates to the settings tab | agnostic | | `indices.ts` › navigates to mappings tab | merged — same test, step: navigates to the mappings tab | agnostic | | `indices.ts` › can delete index | `index_actions_context_menu.spec.ts` › can delete an index from the manage index menu | agnostic | | `index_detail.ts` › renders the indices tab | absorbed — duplicate of `indices.ts`'s own precondition | — | | `index_detail.ts` › can create an index | merged — duplicate of `indices.ts`'s create-index test | agnostic | | `index_detail.ts` › index with no documents | `index_details_page.spec.ts` › Shows enabled mappings and settings actions for a fresh index (step: overview, mappings, and settings tabs exist) | agnostic | | `index_detail.ts` › can add mappings | merged — same test, step: mappings "Add field" button is enabled | agnostic | | `index_detail.ts` › can edit settings | merged — same test, step: settings "Edit settings" switch is enabled | agnostic | ## Deltas worth calling out **Coverage gained on serverless Observability/Security**: the "create an index via the UI wizard" flow (previously stateful-only, via `home_page.spec.ts`) and the "navigate overview/settings/mappings tabs from the manage index menu" flow are now explicitly exercised on serverless too — closing the gap left by seeding the rest of this migration batch via `esClient.indices.create` instead of the UI. **Dropped as standalone tests**: "renders the indices tab" (both files, duplicated) and `index_detail.ts`'s duplicate "can create an index" — these restated preconditions as assertions rather than testing independent behavior. </details>
Part of elastic#281244 ## Summary - Migrates the remaining Index Management FTR API suites (stateful + serverless) to Scout, completing the work done in elastic#283397 and elastic#283996. - Adds `x-pack/platform/plugins/shared/index_management/test/scout/api/` with 25 specs across `cluster_nodes`, `component_templates/`, `data_streams/`, `enrich_policies/`, `index_templates/` and `indices/`. - Deletes the stateful FTR suite `x-pack/platform/test/api_integration/apis/management/index_management/**` and the serverless FTR suite + services `x-pack/platform/test/serverless/api_integration/{test_suites,services}/index_management/**`, plus their config/manifest registrations. - `data_streams`: merges the stateful suite with the serverless `ds_common`/`ds_serverless` mirrors into one `deploymentAgnostic` `data_streams.spec.ts`. The old `ds_mki.ts` security-project branch becomes its own `data_streams_mki_security.spec.ts`, tagged `serverless.security.complete` and skipped unless `config.isCloud` (the default retention it asserts only exists on real Cloud projects). This mirrors the old FTR's `ds_serverless.ts`/`ds_mki.ts` split rather than loosening the generic assertion — no environment is left with weaker coverage than before. - `data_streams` logsdb cluster-settings matrix splits by environment because the defaults differ: `data_streams_logsdb_settings.spec.ts` (stateful-only, 4 cases including `logsdb.prior_logs_usage`) and `data_streams_logsdb_settings_serverless.spec.ts` (`serverless.all`, 3 cases, no `prior_logs_usage`). The plain index-mode assertion (no cluster-settings mutation) is its own agnostic `data_streams_index_mode.spec.ts`. - `indices`: merged CRUD/list/details into one agnostic `indices.spec.ts` (env-specific expected key sets via `forDeployment`); close/open/flush/refresh/forcemerge/clear-cache move to `indices_actions.spec.ts`, stateful-only since those actions aren't exposed on serverless. - `index_templates`: split into `index_templates.spec.ts` (agnostic CRUD/simulate/error-parsing), `index_templates_index_mode.spec.ts` (agnostic), `index_templates_legacy.spec.ts` and `index_templates_ilm_policy.spec.ts` (both stateful-only, legacy templates and ILM don't exist on serverless), and a logsdb cluster-settings pair mirroring the `data_streams` split: `index_templates_logsdb_settings.spec.ts` (stateful-only, 4 cases with `prior_logs_usage`) plus `index_templates_logsdb_settings_serverless.spec.ts` (`serverless.all`, 3 cases, no `prior_logs_usage` — same default-flip as its data-streams equivalent). - `component_templates`: single agnostic spec; drops the old serverless file's verbatim-duplicate `Update #2` block. - `enrich_policies`: merged list/execute/delete into one agnostic spec, replacing the old fixed `setTimeout(2000)` + loose `[200, 429]` delete-status assertion with a real retry loop on the ES 409/429 execution-lock response. - `create_enrich_policy`: merged create + field/index/data-stream discovery into one agnostic spec — the data-stream discovery cases were previously stateful-only pending serverless verification; they're confirmed working and now run everywhere. - `cluster_nodes`: single agnostic spec asserting the 200+array (stateful) vs 410 (serverless) contract via `forDeployment`. - Implements the previously-deferred/blocked item (migration plan batch 4, elastic#27): a disabled-data-enrichers indices test now lives in a new test area, `test/scout_disabled_data_enrichers/api/`, backed by a new Scout server config set `disabled_data_enrichers` (`src/platform/packages/shared/kbn-scout/src/servers/configs/config_sets/disabled_data_enrichers/stateful/classic.stateful.config.ts`) that boots Kibana with `--xpack.rollup.ui.enabled=false --xpack.ccr.ui.enabled=false --xpack.ilm.ui.enabled=false`, since no existing config set disabled those plugin UIs at boot time. ### Test plan Scout flaky test runner: - `/flaky scoutConfig:x-pack/platform/plugins/shared/index_management/test/scout/api/playwright.config.ts:30` [kibana-flaky-test-suite-runner#13780](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/13780) - `/flaky scoutConfig:x-pack/platform/plugins/shared/index_management/test/scout_disabled_data_enrichers/api/playwright.config.ts:30` [kibana-flaky-test-suite-runner#13781](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/13781) <details> <summary>Migration details</summary> ## Counts | Suite | Before | After | |---|---|---| | FTR stateful API (`test/api_integration/apis/management/index_management/`, 18 test files) | 97 tests | deleted | | FTR serverless API (`test/serverless/api_integration/test_suites/index_management/`, 12 test files) | 59 tests (incl. 2 verbatim-duplicate `Update #2` tests) | deleted | | FTR stateful `disabled_data_enrichers/indices.ts` | 1 test (own CI config entry) | deleted | | Scout API (`test/scout/api/tests/`, 25 specs) | new | 108 tests, tagged `deploymentAgnostic` / `stateful.classic` / `serverless.all` / `serverless.security.complete` | | Scout `scout_disabled_data_enrichers/api/tests/` (1 spec) | new | 1 test, `stateful.classic` | 156 FTR tests (97 stateful + 59 serverless) become 109 Scout tests total (108 + 1): most stateful/serverless mirror pairs collapse into a single `deploymentAgnostic` test that runs on both; the duplicated `Update #2` block (2 tests) and `create_index.ts`'s `can create an index` (a duplicate of `indices.ts`'s own create case) are dropped as duplicates with no coverage lost. ## Stateful API FTR → Scout | FTR test (file) | Scout test | Tag | |---|---|---| | should fetch the nodes plugins (`cluster_nodes.ts`) | `cluster_nodes.spec.ts` › fetches the nodes plugins | agnostic | | should return an array of component templates (`component_templates.ts`) | `component_templates.spec.ts` › returns an array of component templates | agnostic | | should return a single component template | › returns a single component template | agnostic | | should create a component template | › creates a component template | agnostic | | should create a component template with a frozen_after lifecycle | › creates a component template with a frozen_after lifecycle | agnostic | | should create a component template with only required fields | › creates a component template with only required fields | agnostic | | should not allow creation of a component template with the same name of an existing one | › rejects creating a component template that already exists | agnostic | | should allow an existing component template to be updated | › updates an existing component template | agnostic | | should not allow a non-existing component template to be updated | › rejects updating a component template that does not exist | agnostic | | should allow a deprecated component template to be updated | › updates a deprecated component template | agnostic | | should delete a component template | › deletes a component template | agnostic | | should delete multiple component templates | › deletes multiple component templates | agnostic | | should return an error for any component templates not sucessfully deleted | › reports the component templates it could not delete | agnostic | | should return no datastreams | › returns no data streams for an unused component template | agnostic | | should return datastreams | › returns the data streams of a component template | agnostic | | Allows to create an enrich policy (`create_enrich_policy.ts`) | `create_enrich_policy.spec.ts` › allows to create an enrich policy | agnostic | | Can retrieve fields from indices | › can retrieve fields from indices | agnostic | | Can retrieve matching indices | › can retrieve matching indices | agnostic | | Can retrieve matching data streams | › can retrieve matching data streams — previously stateful-only pending verification, now agnostic | agnostic | | can create an index (`create_index.ts`) | dropped as duplicate of `indices.ts`'s own create case | — | | throws 400 when index already created | `indices.spec.ts` › rejects creating an index that already exists | agnostic | | ILM data is fetched by the ILM data enricher (`data_enrichers/ilm.ts`) | `data_enrichers_ilm.spec.ts` › reports the ILM policy of a managed index | stateful | | ILM data is not empty even if the index unmanaged | › reports ILM data for an unmanaged index | stateful | | returns an array of data streams (`data_streams.ts`) | `data_streams.spec.ts` › lists the data streams (skipped on Security MKI, see `data_streams_mki_security.spec.ts`) | agnostic | | includes stats when provided the includeStats query parameter | › includes stats when asked for them (same skip) | agnostic | | returns a single data stream by ID | › returns a single data stream by name (same skip) | agnostic | | updates the data retention of a DS | › updates the data retention of a data stream | agnostic | | updates the data retention of multiple DS | › updates the data retention of multiple data streams | agnostic | | sets data retention to infinite | › sets the data retention to infinite | agnostic | | can disable lifecycle for a given policy | `data_streams_disable_lifecycle.spec.ts` › disables the lifecycle of a data stream | stateful | | updates the failure store configuration | `data_streams.spec.ts` › updates the failure store configuration | agnostic | | deletes multiple data streams | › deletes multiple data streams | agnostic | | Apply mapping from index template | › applies the mappings of the index template | agnostic | | Rollover datastreams | › rolls a data stream over | agnostic | | correctly returns index mode property based on index settings (`data_streams_index_mode.ts`) | `data_streams_index_mode.spec.ts` › same | agnostic | | returns … index mode if logsdb.enabled is … and prior_logs_usage is … (×4 loop) | `data_streams_logsdb_settings.spec.ts` › same (×4) | stateful | | doesn't send ILM, CCR and Rollups requests (`disabled_data_enrichers/indices.ts`) | `scout_disabled_data_enrichers/api/tests/indices.spec.ts` › same | stateful | | should list all policies (`enrich_policies.ts`) | `enrich_policies.spec.ts` › lists the enrich policies | agnostic | | should be able to execute a policy | › executes an enrich policy | agnostic | | should be able to delete a policy | › deletes an enrich policy | agnostic | | falls back to the cluster default failed data retention when no override is set (`failure_store_settings.ts`) | `failure_store_settings.spec.ts` › same | agnostic | | reflects the persistent cluster default failed data retention override | › same | agnostic | | returns index details (`index_details.ts`) | `indices.spec.ts` › returns the details of a single index | agnostic | | throws 404 when index doesn't exist | › returns 404 for an index that does not exist | agnostic | | returns counts per index and fills missing buckets with 0 (`index_doc_count.ts`) | `index_doc_count.spec.ts` › same | stateful | | returns counts for > 10 indices | › returns counts for more than 10 indices | stateful | | supports 255 character index names (20 indices) | › supports 255 character index names | stateful | | validates request body (indexNames must be non-empty) | › rejects an empty list of index names | stateful | | should create an index (`indices.ts`) | `indices.spec.ts` › creates an index with an index mode | agnostic | | should require index name to be provided | › rejects creating an index without a name | agnostic | | should create an index without index mode | › creates an index without an index mode | agnostic | | should clear the cache on a single index | `indices_actions.spec.ts` › clears the cache of an index | stateful | | should close an index | › closes an index | stateful | | should open an index | › opens an index | stateful | | should delete an index | `indices.spec.ts` › deletes an index | agnostic | | should require index or indices to be provided | › rejects a delete without an index name | agnostic | | should flush an index | `indices_actions.spec.ts` › flushes an index | stateful | | should refresh an index | › refreshes an index | stateful | | should force merge an index | › force merges an index | stateful | | should allow to define the number of segments | › force merges an index into a given number of segments | stateful | | should list all the indices with the expected properties and data enrichers | `indices.spec.ts` › lists the indices with the expected properties | agnostic | | should list all the indices … (reload) | › reloads the indices with the expected properties | agnostic | | should allow reloading only certain indices | › reloads only the requested indices | agnostic | | should get the index mappings (`mapping.ts`) | `mappings.spec.ts` › gets the index mappings | agnostic | | show update the index mappings | › updates the index mappings | agnostic | | should fetch an index settings (`settings.ts`) | `settings.spec.ts` › fetches an index settings | agnostic | | should update an index settings | › updates an index settings | agnostic | | reports no default repository when none is configured (`snapshot_repositories.ts`) | `snapshot_repositories.spec.ts` › same | stateful | | reports the configured default repository | › same | stateful | | should fetch the index stats (`stats.ts`) | `stats.spec.ts` › fetches the index stats | stateful | | should list all the index templates … (`templates.ts`, get all) | `index_templates.spec.ts` › lists the index templates with the expected parameters (split by template kind — see below) | agnostic | | should return an index template with the expected parameters (get one) | › returns an index template with the expected parameters | agnostic | | should return a legacy index template with the expected parameters (get one) | `index_templates_legacy.spec.ts` › returns a legacy index template with the expected parameters | stateful | | should round-trip a data stream template with a frozen_after lifecycle | `index_templates.spec.ts` › round-trips a data stream template with a frozen_after lifecycle — previously stateful-only, now agnostic | agnostic | | should return an index template with the expected parameters (with index mode) | `index_templates_index_mode.spec.ts` › returns an index template carrying its index mode | agnostic | | should return a legacy index template with the expected parameters (with index mode) | `index_templates_legacy.spec.ts` › returns a legacy index template carrying an index mode | stateful | | returns … index mode if logsdb.enabled is … and prior_logs_usage is … (×4 loop, `templates.ts`) | `index_templates_logsdb_settings.spec.ts` › same (×4) | stateful | | should create an index template | `index_templates.spec.ts` › creates an index template | agnostic | | should create a legacy index template | `index_templates_legacy.spec.ts` › creates a legacy index template | stateful | | should throw a 409 conflict when trying to create 2 templates with the same name | `index_templates.spec.ts` › rejects creating two templates with the same name | agnostic | | should validate the request payload | › validates the request payload | agnostic | | should parse the ES error and return the cause (create) | › parses the Elasticsearch error of a create and returns its cause | agnostic | | should update an index template | › updates an index template | agnostic | | should update a legacy index template | `index_templates_legacy.spec.ts` › updates a legacy index template | stateful | | should parse the ES error and return the cause (update) | `index_templates.spec.ts` › parses the Elasticsearch error of an update and returns its cause | agnostic | | should update a deprecated index template | › updates a deprecated index template | agnostic | | should delete an index template | › deletes an index template | agnostic | | should delete a legacy index template | `index_templates_legacy.spec.ts` › deletes a legacy index template | stateful | | should simulate an index template | `index_templates.spec.ts` › simulates an index template | agnostic | | should simulate an index template by name | › simulates an index template by name | agnostic | | should simulate an index template by name with a related data stream | › simulates an index template by name with a related data stream | agnostic | `index_templates_ilm_policy.spec.ts`'s two tests (`lists`/`returns an index template carrying its ILM policy`) formalize ILM-policy coverage that was folded into the `templates.ts` `get all`/`get one` fixture setup rather than asserted as its own case in FTR — kept stateful-only since ILM doesn't run on serverless. ## Serverless API FTR → Scout | FTR test (file) | Scout test | Tag | |---|---|---| | should NOT fetch the nodes plugins in serverless (`cluster_nodes.ts`) | merged into `cluster_nodes.spec.ts` (410/no-array branch) | agnostic | | should return an array of component templates (`index_component_templates.ts`) | merged into `component_templates.spec.ts` | agnostic | | should return a single component template | merged | agnostic | | should allow an existing component template to be updated (`Update #1`) | merged | agnostic | | should not allow a non-existing component template to be updated (`Update #1`) | merged | agnostic | | should allow an existing component template to be updated (`Update #2`) | dropped — verbatim duplicate of `Update #1` | — | | should not allow a non-existing component template to be updated (`Update #2`) | dropped — verbatim duplicate of `Update #1` | — | | should delete a component template | merged | agnostic | | should delete multiple component templates | merged | agnostic | | should return an error for any component templates not sucessfully deleted | merged | agnostic | | should return no datastreams | merged | agnostic | | should return datastreams | merged | agnostic | | Allows to create an enrich policy (`create_enrich_policies.ts`) | merged into `create_enrich_policy.spec.ts` | agnostic | | Can retrieve fields from indices | merged | agnostic | | Can retrieve matching indices | merged | agnostic | | returns … index mode if logsdb.enabled is … (×3 loop, `ds_common.ts`) | `data_streams_logsdb_settings_serverless.spec.ts` › same (×3, no `prior_logs_usage`) | serverless | | updates the data retention of a DS | merged into `data_streams.spec.ts` | agnostic | | sets data retention to infinite | merged | agnostic | | deletes multiple data streams | merged | agnostic | | Apply mapping from index template | merged | agnostic | | Rollover datastreams | merged | agnostic | | returns an array of data streams (`ds_serverless.ts`, metering shape) | merged into `data_streams.spec.ts` (env-conditional stats via `forDeployment`) | agnostic | | returns a single data stream by ID | merged | agnostic | | returns an array of data streams (`ds_mki.ts`, security-project branch) | `data_streams_mki_security.spec.ts` › lists the data streams | serverless security complete | | returns a single data stream by ID | `data_streams_mki_security.spec.ts` › returns a single data stream by name | serverless security complete | | should list all policies (`enrich_policies.ts`) | merged into `enrich_policies.spec.ts` | agnostic | | should be able to execute a policy | merged | agnostic | | should be able to delete a policy | merged | agnostic | | returns the cluster default failed data retention with the expected shape (`failure_store_settings.ts`) | merged into `failure_store_settings.spec.ts` | agnostic | | reflects the persistent cluster default failed data retention override | merged | agnostic | | should list all the index templates with the expected parameters (`index_templates.ts`, all) | merged into `index_templates.spec.ts` | agnostic | | should list all the index templates … (with index mode) | `index_templates_index_mode.spec.ts` › lists an index template carrying its index mode | agnostic | | should return an index template with the expected parameters (one) | merged into `index_templates.spec.ts` | agnostic | | returns … index mode if logsdb.enabled is … (×3 loop, with logs-*-* pattern) | `index_templates_logsdb_settings_serverless.spec.ts` › same (×3, no `prior_logs_usage`) | serverless | | should return an index template with the expected parameters (with index mode) | `index_templates_index_mode.spec.ts` › returns an index template carrying its index mode | agnostic | | should create an index template | merged into `index_templates.spec.ts` | agnostic | | should throw a 409 conflict when trying to create 2 templates with the same name | merged | agnostic | | should validate the request payload | merged | agnostic | | should parse the ES error and return the cause (create) | merged | agnostic | | should update an index template | merged | agnostic | | should parse the ES error and return the cause (update) | merged | agnostic | | should delete an index template | merged | agnostic | | should simulate an index template | merged | agnostic | | should list all the indices with the expected properties (`indices.ts`) | merged into `indices.spec.ts` (serverless expected-keys branch) | agnostic | | returns index details for the specified index name | merged | agnostic | | throws 404 for a non-existent index | merged | agnostic | | can create a new index | merged | agnostic | | fails to re-create the same index | merged | agnostic | | should list all the indices … (reload) | merged | agnostic | | should allow reloading only certain indices | merged | agnostic | | should delete an index | merged | agnostic | | should require index or indices to be provided | merged | agnostic | | should get the index mappings (`mappings.ts`) | merged into `mappings.spec.ts` | agnostic | | should fetch an index settings (`settings.ts`) | merged into `settings.spec.ts` | agnostic | | should update an index settings | merged | agnostic | ## Deltas worth calling out **Design decision, not a regression**: the Security-MKI project-level default retention (elastic#241105) is asserted exclusively in `data_streams_mki_security.spec.ts` (Cloud-only, `serverless.security.complete`), while `data_streams.spec.ts` explicitly skips those same 3 assertions (`isMkiSecurity`) and defers to it. This is the same mutually-exclusive split the old FTR had (`ds_serverless.ts` generic assertions vs. `ds_mki.ts` security-project branch) — reimplemented rather than dropped or loosened. **Coverage gained on serverless**: `create_enrich_policy.spec.ts`'s data-stream discovery cases (`get_fields_from_indices`/`get_matching_data_streams`) and `index_templates.spec.ts`'s `frozen_after` lifecycle round-trip were stateful-only in FTR pending serverless verification; both are now `deploymentAgnostic`. `component_templates.spec.ts`'s whole Create block (4 tests) had no serverless FTR equivalent (`index_component_templates.ts` lacked a Create describe) and is now agnostic too. The serverless-only `logsdb.enabled` matrix for index templates (`SL-API/index_templates.ts`'s "with logs-*-* index pattern", 3 cases) also has a Scout home now — `index_templates_logsdb_settings_serverless.spec.ts` — mirroring `data_streams_logsdb_settings_serverless.spec.ts`'s pattern (unset `cluster.logsdb.enabled` defaults to `logsdb` on serverless, the opposite of stateful). **Dropped as duplicates (no coverage lost)**: `SL-API/index_component_templates.ts`'s `Update #2` describe block (verbatim copy of `Update #1`); `SF-API/create_index.ts`'s `can create an index` (duplicate of `indices.ts`'s own create case, folded per the documented migration-plan decision). </details> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Part of elastic#281244 ## Summary Migrates the last two serverless-only FTR files for `index_management` to Scout — `indices.ts` and `index_detail.ts` under `x-pack/platform/test/serverless/functional/test_suites/management/index_management/` — completing the FTR → Scout migration for this plugin, per the [FTR → Scout migration](elastic#263554). These two files were deliberately left out of elastic#283397 because they overlapped with the existing Scout coverage in `index_details_page.spec.ts` and `home_page.spec.ts`; this PR reconciles the remaining gaps and deletes the FTR files. - Adds `index_actions_context_menu.spec.ts`: manage-index context menu navigation (overview/settings/mappings tabs) and delete-index flow, plus a "can create an index" test that seeds through the UI wizard (`clickCreateIndexButton` → `setCreateIndexName` → `clickCreateIndexSaveButton`), restoring UI-wizard coverage that the rest of this migration batch narrowed to stateful-only by seeding via `esClient.indices.create` instead. - Widens `index_details_page.spec.ts` from `tags.stateful.classic` to a new `NOT_SVL_SEARCH` tag (stateful classic + serverless observability_complete + serverless security_complete), and adds a test asserting the mappings "Add field" button and settings "Edit settings" switch are enabled for a fresh index. - Adds `NOT_SVL_SEARCH` to `tags.ts`, mirroring the existing `SERVERLESS_ONLY` pattern — excludes Search serverless, which manages individual indices through its own `search_indices` app rather than Index Management. - Page object gains `manageIndex`, `changeManageIndexTab`, `deleteIndexFromContextMenu`, `confirmDeleteIndexModal`, and `indexDetailsPage.changeTab`/`mappingsAddFieldButton`/`editSettingsSwitch`. - Deletes `indices.ts`, `index_detail.ts`, their `index.ts` loader, and the reference in `test_suites/management/index.ts`. ### Test plan Scout flaky test runner ran with `/flaky scoutConfig:x-pack/platform/plugins/shared/index_management/test/scout/ui/playwright.config.ts:30` [kibana-flaky-test-suite-runner#13724](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/13724) Locally: 5 passed on stateful classic, 5 passed on serverless observability_complete, 5 passed on serverless security_complete. <details> <summary>Migration details</summary> ## Counts | Suite | Before | After | |---|---|---| | FTR serverless (`test_suites/management/index_management/{indices,index_detail}.ts`) | 11 tests (runs on serverless Observability + Security → 22 test-runs) | deleted | | Scout UI (`index_actions_context_menu.spec.ts` + `index_details_page.spec.ts`) | 1 test, stateful-only | **5 tests in 2 specs** | The 5 Scout tests run as: 5 on stateful classic, 5 on serverless observability_complete, 5 on serverless security_complete (15 test-runs total). 11 FTR tests become 5 Scout tests because: (a) each FTR file duplicated "renders the indices tab" and "can create an index" as its own precondition — these collapse into one explicit "can create an index" test instead of two near-identical assertions; (b) the three "navigates to X tab" tests collapse into one test with a `test.step` per tab; (c) "renders the indices tab" is absorbed as an implicit precondition of `navigateToIndexManagementTab('indices')` rather than a standalone assertion, matching the convention from elastic#283397. ## Serverless FTR → Scout | FTR test | Scout test | Tag | |---|---|---| | `indices.ts` › renders the indices tab | absorbed — precondition of `navigateToIndexManagementTab('indices')` | — | | `indices.ts` › can create an index | `index_actions_context_menu.spec.ts` › can create an index | agnostic (`NOT_SVL_SEARCH`) | | `indices.ts` › navigates to overview | `index_actions_context_menu.spec.ts` › navigates to overview, settings, and mappings tabs from the manage index menu (step: navigates to the overview tab) | agnostic | | `indices.ts` › navigates to settings tab | merged — same test, step: navigates to the settings tab | agnostic | | `indices.ts` › navigates to mappings tab | merged — same test, step: navigates to the mappings tab | agnostic | | `indices.ts` › can delete index | `index_actions_context_menu.spec.ts` › can delete an index from the manage index menu | agnostic | | `index_detail.ts` › renders the indices tab | absorbed — duplicate of `indices.ts`'s own precondition | — | | `index_detail.ts` › can create an index | merged — duplicate of `indices.ts`'s create-index test | agnostic | | `index_detail.ts` › index with no documents | `index_details_page.spec.ts` › Shows enabled mappings and settings actions for a fresh index (step: overview, mappings, and settings tabs exist) | agnostic | | `index_detail.ts` › can add mappings | merged — same test, step: mappings "Add field" button is enabled | agnostic | | `index_detail.ts` › can edit settings | merged — same test, step: settings "Edit settings" switch is enabled | agnostic | ## Deltas worth calling out **Coverage gained on serverless Observability/Security**: the "create an index via the UI wizard" flow (previously stateful-only, via `home_page.spec.ts`) and the "navigate overview/settings/mappings tabs from the manage index menu" flow are now explicitly exercised on serverless too — closing the gap left by seeding the rest of this migration batch via `esClient.indices.create` instead of the UI. **Dropped as standalone tests**: "renders the indices tab" (both files, duplicated) and `index_detail.ts`'s duplicate "can create an index" — these restated preconditions as assertions rather than testing independent behavior. </details>
Part of elastic#281244 ## Summary - Migrates the remaining Index Management FTR API suites (stateful + serverless) to Scout, completing the work done in elastic#283397 and elastic#283996. - Adds `x-pack/platform/plugins/shared/index_management/test/scout/api/` with 25 specs across `cluster_nodes`, `component_templates/`, `data_streams/`, `enrich_policies/`, `index_templates/` and `indices/`. - Deletes the stateful FTR suite `x-pack/platform/test/api_integration/apis/management/index_management/**` and the serverless FTR suite + services `x-pack/platform/test/serverless/api_integration/{test_suites,services}/index_management/**`, plus their config/manifest registrations. - `data_streams`: merges the stateful suite with the serverless `ds_common`/`ds_serverless` mirrors into one `deploymentAgnostic` `data_streams.spec.ts`. The old `ds_mki.ts` security-project branch becomes its own `data_streams_mki_security.spec.ts`, tagged `serverless.security.complete` and skipped unless `config.isCloud` (the default retention it asserts only exists on real Cloud projects). This mirrors the old FTR's `ds_serverless.ts`/`ds_mki.ts` split rather than loosening the generic assertion — no environment is left with weaker coverage than before. - `data_streams` logsdb cluster-settings matrix splits by environment because the defaults differ: `data_streams_logsdb_settings.spec.ts` (stateful-only, 4 cases including `logsdb.prior_logs_usage`) and `data_streams_logsdb_settings_serverless.spec.ts` (`serverless.all`, 3 cases, no `prior_logs_usage`). The plain index-mode assertion (no cluster-settings mutation) is its own agnostic `data_streams_index_mode.spec.ts`. - `indices`: merged CRUD/list/details into one agnostic `indices.spec.ts` (env-specific expected key sets via `forDeployment`); close/open/flush/refresh/forcemerge/clear-cache move to `indices_actions.spec.ts`, stateful-only since those actions aren't exposed on serverless. - `index_templates`: split into `index_templates.spec.ts` (agnostic CRUD/simulate/error-parsing), `index_templates_index_mode.spec.ts` (agnostic), `index_templates_legacy.spec.ts` and `index_templates_ilm_policy.spec.ts` (both stateful-only, legacy templates and ILM don't exist on serverless), and a logsdb cluster-settings pair mirroring the `data_streams` split: `index_templates_logsdb_settings.spec.ts` (stateful-only, 4 cases with `prior_logs_usage`) plus `index_templates_logsdb_settings_serverless.spec.ts` (`serverless.all`, 3 cases, no `prior_logs_usage` — same default-flip as its data-streams equivalent). - `component_templates`: single agnostic spec; drops the old serverless file's verbatim-duplicate `Update #2` block. - `enrich_policies`: merged list/execute/delete into one agnostic spec, replacing the old fixed `setTimeout(2000)` + loose `[200, 429]` delete-status assertion with a real retry loop on the ES 409/429 execution-lock response. - `create_enrich_policy`: merged create + field/index/data-stream discovery into one agnostic spec — the data-stream discovery cases were previously stateful-only pending serverless verification; they're confirmed working and now run everywhere. - `cluster_nodes`: single agnostic spec asserting the 200+array (stateful) vs 410 (serverless) contract via `forDeployment`. - Implements the previously-deferred/blocked item (migration plan batch 4, elastic#27): a disabled-data-enrichers indices test now lives in a new test area, `test/scout_disabled_data_enrichers/api/`, backed by a new Scout server config set `disabled_data_enrichers` (`src/platform/packages/shared/kbn-scout/src/servers/configs/config_sets/disabled_data_enrichers/stateful/classic.stateful.config.ts`) that boots Kibana with `--xpack.rollup.ui.enabled=false --xpack.ccr.ui.enabled=false --xpack.ilm.ui.enabled=false`, since no existing config set disabled those plugin UIs at boot time. ### Test plan Scout flaky test runner: - `/flaky scoutConfig:x-pack/platform/plugins/shared/index_management/test/scout/api/playwright.config.ts:30` [kibana-flaky-test-suite-runner#13780](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/13780) - `/flaky scoutConfig:x-pack/platform/plugins/shared/index_management/test/scout_disabled_data_enrichers/api/playwright.config.ts:30` [kibana-flaky-test-suite-runner#13781](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/13781) <details> <summary>Migration details</summary> ## Counts | Suite | Before | After | |---|---|---| | FTR stateful API (`test/api_integration/apis/management/index_management/`, 18 test files) | 97 tests | deleted | | FTR serverless API (`test/serverless/api_integration/test_suites/index_management/`, 12 test files) | 59 tests (incl. 2 verbatim-duplicate `Update #2` tests) | deleted | | FTR stateful `disabled_data_enrichers/indices.ts` | 1 test (own CI config entry) | deleted | | Scout API (`test/scout/api/tests/`, 25 specs) | new | 108 tests, tagged `deploymentAgnostic` / `stateful.classic` / `serverless.all` / `serverless.security.complete` | | Scout `scout_disabled_data_enrichers/api/tests/` (1 spec) | new | 1 test, `stateful.classic` | 156 FTR tests (97 stateful + 59 serverless) become 109 Scout tests total (108 + 1): most stateful/serverless mirror pairs collapse into a single `deploymentAgnostic` test that runs on both; the duplicated `Update #2` block (2 tests) and `create_index.ts`'s `can create an index` (a duplicate of `indices.ts`'s own create case) are dropped as duplicates with no coverage lost. ## Stateful API FTR → Scout | FTR test (file) | Scout test | Tag | |---|---|---| | should fetch the nodes plugins (`cluster_nodes.ts`) | `cluster_nodes.spec.ts` › fetches the nodes plugins | agnostic | | should return an array of component templates (`component_templates.ts`) | `component_templates.spec.ts` › returns an array of component templates | agnostic | | should return a single component template | › returns a single component template | agnostic | | should create a component template | › creates a component template | agnostic | | should create a component template with a frozen_after lifecycle | › creates a component template with a frozen_after lifecycle | agnostic | | should create a component template with only required fields | › creates a component template with only required fields | agnostic | | should not allow creation of a component template with the same name of an existing one | › rejects creating a component template that already exists | agnostic | | should allow an existing component template to be updated | › updates an existing component template | agnostic | | should not allow a non-existing component template to be updated | › rejects updating a component template that does not exist | agnostic | | should allow a deprecated component template to be updated | › updates a deprecated component template | agnostic | | should delete a component template | › deletes a component template | agnostic | | should delete multiple component templates | › deletes multiple component templates | agnostic | | should return an error for any component templates not sucessfully deleted | › reports the component templates it could not delete | agnostic | | should return no datastreams | › returns no data streams for an unused component template | agnostic | | should return datastreams | › returns the data streams of a component template | agnostic | | Allows to create an enrich policy (`create_enrich_policy.ts`) | `create_enrich_policy.spec.ts` › allows to create an enrich policy | agnostic | | Can retrieve fields from indices | › can retrieve fields from indices | agnostic | | Can retrieve matching indices | › can retrieve matching indices | agnostic | | Can retrieve matching data streams | › can retrieve matching data streams — previously stateful-only pending verification, now agnostic | agnostic | | can create an index (`create_index.ts`) | dropped as duplicate of `indices.ts`'s own create case | — | | throws 400 when index already created | `indices.spec.ts` › rejects creating an index that already exists | agnostic | | ILM data is fetched by the ILM data enricher (`data_enrichers/ilm.ts`) | `data_enrichers_ilm.spec.ts` › reports the ILM policy of a managed index | stateful | | ILM data is not empty even if the index unmanaged | › reports ILM data for an unmanaged index | stateful | | returns an array of data streams (`data_streams.ts`) | `data_streams.spec.ts` › lists the data streams (skipped on Security MKI, see `data_streams_mki_security.spec.ts`) | agnostic | | includes stats when provided the includeStats query parameter | › includes stats when asked for them (same skip) | agnostic | | returns a single data stream by ID | › returns a single data stream by name (same skip) | agnostic | | updates the data retention of a DS | › updates the data retention of a data stream | agnostic | | updates the data retention of multiple DS | › updates the data retention of multiple data streams | agnostic | | sets data retention to infinite | › sets the data retention to infinite | agnostic | | can disable lifecycle for a given policy | `data_streams_disable_lifecycle.spec.ts` › disables the lifecycle of a data stream | stateful | | updates the failure store configuration | `data_streams.spec.ts` › updates the failure store configuration | agnostic | | deletes multiple data streams | › deletes multiple data streams | agnostic | | Apply mapping from index template | › applies the mappings of the index template | agnostic | | Rollover datastreams | › rolls a data stream over | agnostic | | correctly returns index mode property based on index settings (`data_streams_index_mode.ts`) | `data_streams_index_mode.spec.ts` › same | agnostic | | returns … index mode if logsdb.enabled is … and prior_logs_usage is … (×4 loop) | `data_streams_logsdb_settings.spec.ts` › same (×4) | stateful | | doesn't send ILM, CCR and Rollups requests (`disabled_data_enrichers/indices.ts`) | `scout_disabled_data_enrichers/api/tests/indices.spec.ts` › same | stateful | | should list all policies (`enrich_policies.ts`) | `enrich_policies.spec.ts` › lists the enrich policies | agnostic | | should be able to execute a policy | › executes an enrich policy | agnostic | | should be able to delete a policy | › deletes an enrich policy | agnostic | | falls back to the cluster default failed data retention when no override is set (`failure_store_settings.ts`) | `failure_store_settings.spec.ts` › same | agnostic | | reflects the persistent cluster default failed data retention override | › same | agnostic | | returns index details (`index_details.ts`) | `indices.spec.ts` › returns the details of a single index | agnostic | | throws 404 when index doesn't exist | › returns 404 for an index that does not exist | agnostic | | returns counts per index and fills missing buckets with 0 (`index_doc_count.ts`) | `index_doc_count.spec.ts` › same | stateful | | returns counts for > 10 indices | › returns counts for more than 10 indices | stateful | | supports 255 character index names (20 indices) | › supports 255 character index names | stateful | | validates request body (indexNames must be non-empty) | › rejects an empty list of index names | stateful | | should create an index (`indices.ts`) | `indices.spec.ts` › creates an index with an index mode | agnostic | | should require index name to be provided | › rejects creating an index without a name | agnostic | | should create an index without index mode | › creates an index without an index mode | agnostic | | should clear the cache on a single index | `indices_actions.spec.ts` › clears the cache of an index | stateful | | should close an index | › closes an index | stateful | | should open an index | › opens an index | stateful | | should delete an index | `indices.spec.ts` › deletes an index | agnostic | | should require index or indices to be provided | › rejects a delete without an index name | agnostic | | should flush an index | `indices_actions.spec.ts` › flushes an index | stateful | | should refresh an index | › refreshes an index | stateful | | should force merge an index | › force merges an index | stateful | | should allow to define the number of segments | › force merges an index into a given number of segments | stateful | | should list all the indices with the expected properties and data enrichers | `indices.spec.ts` › lists the indices with the expected properties | agnostic | | should list all the indices … (reload) | › reloads the indices with the expected properties | agnostic | | should allow reloading only certain indices | › reloads only the requested indices | agnostic | | should get the index mappings (`mapping.ts`) | `mappings.spec.ts` › gets the index mappings | agnostic | | show update the index mappings | › updates the index mappings | agnostic | | should fetch an index settings (`settings.ts`) | `settings.spec.ts` › fetches an index settings | agnostic | | should update an index settings | › updates an index settings | agnostic | | reports no default repository when none is configured (`snapshot_repositories.ts`) | `snapshot_repositories.spec.ts` › same | stateful | | reports the configured default repository | › same | stateful | | should fetch the index stats (`stats.ts`) | `stats.spec.ts` › fetches the index stats | stateful | | should list all the index templates … (`templates.ts`, get all) | `index_templates.spec.ts` › lists the index templates with the expected parameters (split by template kind — see below) | agnostic | | should return an index template with the expected parameters (get one) | › returns an index template with the expected parameters | agnostic | | should return a legacy index template with the expected parameters (get one) | `index_templates_legacy.spec.ts` › returns a legacy index template with the expected parameters | stateful | | should round-trip a data stream template with a frozen_after lifecycle | `index_templates.spec.ts` › round-trips a data stream template with a frozen_after lifecycle — previously stateful-only, now agnostic | agnostic | | should return an index template with the expected parameters (with index mode) | `index_templates_index_mode.spec.ts` › returns an index template carrying its index mode | agnostic | | should return a legacy index template with the expected parameters (with index mode) | `index_templates_legacy.spec.ts` › returns a legacy index template carrying an index mode | stateful | | returns … index mode if logsdb.enabled is … and prior_logs_usage is … (×4 loop, `templates.ts`) | `index_templates_logsdb_settings.spec.ts` › same (×4) | stateful | | should create an index template | `index_templates.spec.ts` › creates an index template | agnostic | | should create a legacy index template | `index_templates_legacy.spec.ts` › creates a legacy index template | stateful | | should throw a 409 conflict when trying to create 2 templates with the same name | `index_templates.spec.ts` › rejects creating two templates with the same name | agnostic | | should validate the request payload | › validates the request payload | agnostic | | should parse the ES error and return the cause (create) | › parses the Elasticsearch error of a create and returns its cause | agnostic | | should update an index template | › updates an index template | agnostic | | should update a legacy index template | `index_templates_legacy.spec.ts` › updates a legacy index template | stateful | | should parse the ES error and return the cause (update) | `index_templates.spec.ts` › parses the Elasticsearch error of an update and returns its cause | agnostic | | should update a deprecated index template | › updates a deprecated index template | agnostic | | should delete an index template | › deletes an index template | agnostic | | should delete a legacy index template | `index_templates_legacy.spec.ts` › deletes a legacy index template | stateful | | should simulate an index template | `index_templates.spec.ts` › simulates an index template | agnostic | | should simulate an index template by name | › simulates an index template by name | agnostic | | should simulate an index template by name with a related data stream | › simulates an index template by name with a related data stream | agnostic | `index_templates_ilm_policy.spec.ts`'s two tests (`lists`/`returns an index template carrying its ILM policy`) formalize ILM-policy coverage that was folded into the `templates.ts` `get all`/`get one` fixture setup rather than asserted as its own case in FTR — kept stateful-only since ILM doesn't run on serverless. ## Serverless API FTR → Scout | FTR test (file) | Scout test | Tag | |---|---|---| | should NOT fetch the nodes plugins in serverless (`cluster_nodes.ts`) | merged into `cluster_nodes.spec.ts` (410/no-array branch) | agnostic | | should return an array of component templates (`index_component_templates.ts`) | merged into `component_templates.spec.ts` | agnostic | | should return a single component template | merged | agnostic | | should allow an existing component template to be updated (`Update #1`) | merged | agnostic | | should not allow a non-existing component template to be updated (`Update #1`) | merged | agnostic | | should allow an existing component template to be updated (`Update #2`) | dropped — verbatim duplicate of `Update #1` | — | | should not allow a non-existing component template to be updated (`Update #2`) | dropped — verbatim duplicate of `Update #1` | — | | should delete a component template | merged | agnostic | | should delete multiple component templates | merged | agnostic | | should return an error for any component templates not sucessfully deleted | merged | agnostic | | should return no datastreams | merged | agnostic | | should return datastreams | merged | agnostic | | Allows to create an enrich policy (`create_enrich_policies.ts`) | merged into `create_enrich_policy.spec.ts` | agnostic | | Can retrieve fields from indices | merged | agnostic | | Can retrieve matching indices | merged | agnostic | | returns … index mode if logsdb.enabled is … (×3 loop, `ds_common.ts`) | `data_streams_logsdb_settings_serverless.spec.ts` › same (×3, no `prior_logs_usage`) | serverless | | updates the data retention of a DS | merged into `data_streams.spec.ts` | agnostic | | sets data retention to infinite | merged | agnostic | | deletes multiple data streams | merged | agnostic | | Apply mapping from index template | merged | agnostic | | Rollover datastreams | merged | agnostic | | returns an array of data streams (`ds_serverless.ts`, metering shape) | merged into `data_streams.spec.ts` (env-conditional stats via `forDeployment`) | agnostic | | returns a single data stream by ID | merged | agnostic | | returns an array of data streams (`ds_mki.ts`, security-project branch) | `data_streams_mki_security.spec.ts` › lists the data streams | serverless security complete | | returns a single data stream by ID | `data_streams_mki_security.spec.ts` › returns a single data stream by name | serverless security complete | | should list all policies (`enrich_policies.ts`) | merged into `enrich_policies.spec.ts` | agnostic | | should be able to execute a policy | merged | agnostic | | should be able to delete a policy | merged | agnostic | | returns the cluster default failed data retention with the expected shape (`failure_store_settings.ts`) | merged into `failure_store_settings.spec.ts` | agnostic | | reflects the persistent cluster default failed data retention override | merged | agnostic | | should list all the index templates with the expected parameters (`index_templates.ts`, all) | merged into `index_templates.spec.ts` | agnostic | | should list all the index templates … (with index mode) | `index_templates_index_mode.spec.ts` › lists an index template carrying its index mode | agnostic | | should return an index template with the expected parameters (one) | merged into `index_templates.spec.ts` | agnostic | | returns … index mode if logsdb.enabled is … (×3 loop, with logs-*-* pattern) | `index_templates_logsdb_settings_serverless.spec.ts` › same (×3, no `prior_logs_usage`) | serverless | | should return an index template with the expected parameters (with index mode) | `index_templates_index_mode.spec.ts` › returns an index template carrying its index mode | agnostic | | should create an index template | merged into `index_templates.spec.ts` | agnostic | | should throw a 409 conflict when trying to create 2 templates with the same name | merged | agnostic | | should validate the request payload | merged | agnostic | | should parse the ES error and return the cause (create) | merged | agnostic | | should update an index template | merged | agnostic | | should parse the ES error and return the cause (update) | merged | agnostic | | should delete an index template | merged | agnostic | | should simulate an index template | merged | agnostic | | should list all the indices with the expected properties (`indices.ts`) | merged into `indices.spec.ts` (serverless expected-keys branch) | agnostic | | returns index details for the specified index name | merged | agnostic | | throws 404 for a non-existent index | merged | agnostic | | can create a new index | merged | agnostic | | fails to re-create the same index | merged | agnostic | | should list all the indices … (reload) | merged | agnostic | | should allow reloading only certain indices | merged | agnostic | | should delete an index | merged | agnostic | | should require index or indices to be provided | merged | agnostic | | should get the index mappings (`mappings.ts`) | merged into `mappings.spec.ts` | agnostic | | should fetch an index settings (`settings.ts`) | merged into `settings.spec.ts` | agnostic | | should update an index settings | merged | agnostic | ## Deltas worth calling out **Design decision, not a regression**: the Security-MKI project-level default retention (elastic#241105) is asserted exclusively in `data_streams_mki_security.spec.ts` (Cloud-only, `serverless.security.complete`), while `data_streams.spec.ts` explicitly skips those same 3 assertions (`isMkiSecurity`) and defers to it. This is the same mutually-exclusive split the old FTR had (`ds_serverless.ts` generic assertions vs. `ds_mki.ts` security-project branch) — reimplemented rather than dropped or loosened. **Coverage gained on serverless**: `create_enrich_policy.spec.ts`'s data-stream discovery cases (`get_fields_from_indices`/`get_matching_data_streams`) and `index_templates.spec.ts`'s `frozen_after` lifecycle round-trip were stateful-only in FTR pending serverless verification; both are now `deploymentAgnostic`. `component_templates.spec.ts`'s whole Create block (4 tests) had no serverless FTR equivalent (`index_component_templates.ts` lacked a Create describe) and is now agnostic too. The serverless-only `logsdb.enabled` matrix for index templates (`SL-API/index_templates.ts`'s "with logs-*-* index pattern", 3 cases) also has a Scout home now — `index_templates_logsdb_settings_serverless.spec.ts` — mirroring `data_streams_logsdb_settings_serverless.spec.ts`'s pattern (unset `cluster.logsdb.enabled` defaults to `logsdb` on serverless, the opposite of stateful). **Dropped as duplicates (no coverage lost)**: `SL-API/index_component_templates.ts`'s `Update #2` describe block (verbatim copy of `Update #1`); `SF-API/create_index.ts`'s `can create an index` (duplicate of `indices.ts`'s own create case, folded per the documented migration-plan decision). </details> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Part of #281244
Summary
Migrates the last two serverless-only FTR files for
index_managementto Scout —indices.tsandindex_detail.tsunderx-pack/platform/test/serverless/functional/test_suites/management/index_management/— completing the FTR → Scout migration for this plugin, per the FTR → Scout migration. These two files were deliberately left out of #283397 because they overlapped with the existing Scout coverage inindex_details_page.spec.tsandhome_page.spec.ts; this PR reconciles the remaining gaps and deletes the FTR files.index_actions_context_menu.spec.ts: manage-index context menu navigation (overview/settings/mappings tabs) and delete-index flow, plus a "can create an index" test that seeds through the UI wizard (clickCreateIndexButton→setCreateIndexName→clickCreateIndexSaveButton), restoring UI-wizard coverage that the rest of this migration batch narrowed to stateful-only by seeding viaesClient.indices.createinstead.index_details_page.spec.tsfromtags.stateful.classicto a newNOT_SVL_SEARCHtag (stateful classic + serverless observability_complete + serverless security_complete), and adds a test asserting the mappings "Add field" button and settings "Edit settings" switch are enabled for a fresh index.NOT_SVL_SEARCHtotags.ts, mirroring the existingSERVERLESS_ONLYpattern — excludes Search serverless, which manages individual indices through its ownsearch_indicesapp rather than Index Management.manageIndex,changeManageIndexTab,deleteIndexFromContextMenu,confirmDeleteIndexModal, andindexDetailsPage.changeTab/mappingsAddFieldButton/editSettingsSwitch.indices.ts,index_detail.ts, theirindex.tsloader, and the reference intest_suites/management/index.ts.Test plan
Scout flaky test runner ran with
/flaky scoutConfig:x-pack/platform/plugins/shared/index_management/test/scout/ui/playwright.config.ts:30kibana-flaky-test-suite-runner#13724Locally: 5 passed on stateful classic, 5 passed on serverless observability_complete, 5 passed on serverless security_complete.
Migration details
Counts
test_suites/management/index_management/{indices,index_detail}.ts)index_actions_context_menu.spec.ts+index_details_page.spec.ts)The 5 Scout tests run as: 5 on stateful classic, 5 on serverless observability_complete, 5 on serverless security_complete (15 test-runs total).
11 FTR tests become 5 Scout tests because: (a) each FTR file duplicated "renders the indices tab" and "can create an index" as its own precondition — these collapse into one explicit "can create an index" test instead of two near-identical assertions; (b) the three "navigates to X tab" tests collapse into one test with a
test.stepper tab; (c) "renders the indices tab" is absorbed as an implicit precondition ofnavigateToIndexManagementTab('indices')rather than a standalone assertion, matching the convention from #283397.Serverless FTR → Scout
indices.ts› renders the indices tabnavigateToIndexManagementTab('indices')indices.ts› can create an indexindex_actions_context_menu.spec.ts› can create an indexNOT_SVL_SEARCH)indices.ts› navigates to overviewindex_actions_context_menu.spec.ts› navigates to overview, settings, and mappings tabs from the manage index menu (step: navigates to the overview tab)indices.ts› navigates to settings tabindices.ts› navigates to mappings tabindices.ts› can delete indexindex_actions_context_menu.spec.ts› can delete an index from the manage index menuindex_detail.ts› renders the indices tabindices.ts's own preconditionindex_detail.ts› can create an indexindices.ts's create-index testindex_detail.ts› index with no documentsindex_details_page.spec.ts› Shows enabled mappings and settings actions for a fresh index (step: overview, mappings, and settings tabs exist)index_detail.ts› can add mappingsindex_detail.ts› can edit settingsDeltas worth calling out
Coverage gained on serverless Observability/Security: the "create an index via the UI wizard" flow (previously stateful-only, via
home_page.spec.ts) and the "navigate overview/settings/mappings tabs from the manage index menu" flow are now explicitly exercised on serverless too — closing the gap left by seeding the rest of this migration batch viaesClient.indices.createinstead of the UI.Dropped as standalone tests: "renders the indices tab" (both files, duplicated) and
index_detail.ts's duplicate "can create an index" — these restated preconditions as assertions rather than testing independent behavior.