[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
Conversation
…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>
|
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #271278
Summary
Migrates 5 FTR test specs owned by
@elastic/response-opsfromx-pack/platform/test/functional_with_es_sslto Scout Playwright tests undertriggers_actions_ui/test/scout/ui/tests/.All tests are tagged
tags.stateful.classic(equivalent to thefunctional_with_es_sslFTR suite).Migrated specs
triggers_actions_ui/alert_deletion.tsalert_deletion.spec.tsexpect.pollwaits for event-logdelete-alertsaction instead of importing FTR-onlyalert_deletion_test_utils.ts(outside Scout tsconfig scope)rules/rules_page/edit_rule_flow.tsedit_rule_flow.spec.tstest.noop→.es-query(API-created); each test navigates independently — no shared browser state like the FTR chaintriggers_actions_ui/maintenance_windows/maintenance_windows_table.tsmaintenance_windows_table.spec.tssearchMaintenanceWindows,getMaintenanceWindowsList) inlined as helpers;createMw/deleteMwviakbnClient.request()rules/rules_list/bulk_actions.tsrules_bulk_actions.spec.tstest.noop→.es-query;test.always-firing→.index-threshold(different type needed for the filter test); snooze/schedule viakbnClient.request()rules/rules_page/create_rule_flow.tsrules_create_flow.spec.tstest.noop→.index-thresholdwithfillIndexThresholdFormhelperKey patterns introduced
fillIndexThresholdForm(page, name)— fills the.index-thresholdcreate form via UI: opensselectIndexExpression, types.kibanato 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 inthresholdAlertTimeFieldSelect, selects it, closes the popover. Unblocks create-form save tests that previously requiredtest.noop.saveRuleAndGetId(page)— clicksrulePageFooterSaveButton, handles the "no actions"confirmCreateRuleModalwith a 3 swaitFor+.catch, waits for redirect to/app/rules/rule/, and extracts the new rule ID from the URL for cleanup.Event-log polling —
expect.poll(() => esClient.search(...), {timeout: 30_000})replaces FTR'sretry.tryfor async ES verification.API cleanup — all created resources (rules, MWs) tracked in arrays and deleted in
afterEach/afterAllviaPromise.allSettled.Scout environment substitutions
test.nooprule type.es-query(API) /.index-threshold(UI)test.always-firingrule type.index-thresholdsupertestsnooze/schedulekbnClient.request()to internal alerting APIalert_deletion_test_utils.tsimportTest plan
node scripts/scout.js run-tests --config x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/playwright.config.tsagainst a local stateful/classic Kibanastandard.json)