Skip to content

[ResponseOps][Scout] Migrate FTR → Scout: alert_deletion, edit_rule_flow, maintenance_windows_table, bulk_actions, create_rule_flow#271260

Draft
guskovaue wants to merge 2 commits into
elastic:mainfrom
guskovaue:response-ops-scout-migration-medium
Draft

[ResponseOps][Scout] Migrate FTR → Scout: alert_deletion, edit_rule_flow, maintenance_windows_table, bulk_actions, create_rule_flow#271260
guskovaue wants to merge 2 commits into
elastic:mainfrom
guskovaue:response-ops-scout-migration-medium

Conversation

@guskovaue
Copy link
Copy Markdown
Contributor

@guskovaue guskovaue commented May 26, 2026

Closes: #271278

Summary

Migrates 5 FTR test specs owned by @elastic/response-ops from x-pack/platform/test/functional_with_es_ssl to Scout Playwright tests under triggers_actions_ui/test/scout/ui/tests/.

All tests are tagged tags.stateful.classic (equivalent to the functional_with_es_ssl FTR suite).

Migrated specs

FTR source Scout spec Tests Notes
triggers_actions_ui/alert_deletion.ts alert_deletion.spec.ts 1 Inlines 3 stack-alert ES docs; expect.poll waits for event-log delete-alerts action instead of importing FTR-only alert_deletion_test_utils.ts (outside Scout tsconfig scope)
rules/rules_page/edit_rule_flow.ts edit_rule_flow.spec.ts 6 test.noop.es-query (API-created); each test navigates independently — no shared browser state like the FTR chain
triggers_actions_ui/maintenance_windows/maintenance_windows_table.ts maintenance_windows_table.spec.ts 8 FTR page-objects (searchMaintenanceWindows, getMaintenanceWindowsList) inlined as helpers; createMw / deleteMw via kbnClient.request()
rules/rules_list/bulk_actions.ts rules_bulk_actions.spec.ts 6 test.noop.es-query; test.always-firing.index-threshold (different type needed for the filter test); snooze/schedule via kbnClient.request()
rules/rules_page/create_rule_flow.ts rules_create_flow.spec.ts 5 All 5 FTR tests including the previously de-scoped save/redirect tests; test.noop.index-threshold with fillIndexThresholdForm helper

Key patterns introduced

  • fillIndexThresholdForm(page, name) — fills the .index-threshold create form via UI: opens selectIndexExpression, types .kibana to trigger the async combobox, waits for [role="listbox"] (the "Choose…" fallback always renders the typed pattern), clicks the first option, waits for a date field in thresholdAlertTimeFieldSelect, selects it, closes the popover. Unblocks create-form save tests that previously required test.noop.

  • saveRuleAndGetId(page) — clicks rulePageFooterSaveButton, handles the "no actions" confirmCreateRuleModal with a 3 s waitFor + .catch, waits for redirect to /app/rules/rule/, and extracts the new rule ID from the URL for cleanup.

  • Event-log pollingexpect.poll(() => esClient.search(...), {timeout: 30_000}) replaces FTR's retry.try for async ES verification.

  • API cleanup — all created resources (rules, MWs) tracked in arrays and deleted in afterEach/afterAll via Promise.allSettled.

Scout environment substitutions

FTR Scout
test.noop rule type .es-query (API) / .index-threshold (UI)
test.always-firing rule type .index-threshold
supertest snooze/schedule kbnClient.request() to internal alerting API
FTR page objects for MWs Inline helpers using direct page locators
alert_deletion_test_utils.ts import Inlined simplified test data

Test plan

  • Run node scripts/scout.js run-tests --config x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/playwright.config.ts against a local stateful/classic Kibana
  • Verify all 5 new specs appear in the manifest (standard.json)
  • Confirm no regressions in previously passing Scout specs

…nce_windows_table, bulk_actions, create_rule_flow to Scout

Migrates 5 FTR test specs from x-pack/platform/test/functional_with_es_ssl
to Scout Playwright tests under triggers_actions_ui/test/scout/ui/tests/:

- alert_deletion.spec.ts — inlines 3 stack-alert docs (ES bulk + expect.poll
  on event log) instead of importing from the FTR-only alert_deletion_test_utils
- edit_rule_flow.spec.ts — .es-query replaces test.noop; each test navigates
  independently (no shared browser state)
- maintenance_windows_table.spec.ts — FTR page-objects inlined as helpers;
  createMw/deleteMw via kbnClient.request()
- rules_bulk_actions.spec.ts — test.noop → .es-query, test.always-firing →
  .index-threshold; snooze/schedule via kbnClient.request()
- rules_create_flow.spec.ts — all 5 FTR tests migrated; test.noop →
  .index-threshold with fillIndexThresholdForm helper (index combobox +
  time-field select) and saveRuleAndGetId (extracts rule ID from post-save
  redirect URL)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@guskovaue guskovaue requested a review from a team as a code owner May 26, 2026 12:53
@guskovaue guskovaue self-assigned this May 26, 2026
@guskovaue guskovaue marked this pull request as draft May 26, 2026 13:06
@infra-vault-gh-plugin-prod
Copy link
Copy Markdown

infra-vault-gh-plugin-prod Bot commented May 26, 2026

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!
  • Click to trigger kibana-entity-store-performance-from-pr for this PR!
  • Click to trigger kibana-storybooks-from-pr for this PR!

@guskovaue guskovaue added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v9.5.0 labels May 26, 2026
@elastic elastic deleted a comment from kibanamachine May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ResponseOps][Scout] Migrate FTR → Scout: alert_deletion, edit_rule_flow, maintenance_windows_table, bulk_actions, create_rule_flow

2 participants