Skip to content

[Triggers Actions UI] Wait for webhook card to settle before clicking in flaky SSL test - #290455

Open
kibanamachine wants to merge 1 commit into
mainfrom
fix/flaky-283737-webhook-card-flyout-settle-5ef2851e6a3881f7
Open

[Triggers Actions UI] Wait for webhook card to settle before clicking in flaky SSL test#290455
kibanamachine wants to merge 1 commit into
mainfrom
fix/flaky-283737-webhook-card-flyout-settle-5ef2851e6a3881f7

Conversation

@kibanamachine

Copy link
Copy Markdown
Contributor

Fixes #283737

Summary

  • The test opened the create-connector flyout, then immediately clicked .webhook-card and authSSL. It failed with authSSL never located (retry.try reached timeout 120000 ms), i.e. the connector form never opened.
  • Webhook is a synchronously-registered stack connector, so its form (and the authSSL auth-type card) renders as soon as the card click sets the action type. authSSL never appearing means the .webhook-card click itself was silently dropped.
  • The flyout slides in on open; when loadActionTypes resolves fast (cached), the cards render while the flyout is still animating, so the click lands on the still-moving card and is lost.
  • This patch waits for the webhook card to stop moving (entrance animation settled) before the single click — a bounded poll of the card's on-screen position, not a retried click.

Context

  • No investigator comment existed on the issue (only kibanamachine "New failure" notifications), so the root cause was investigated from scratch.
  • The failure signature is stable across ~14 failures from 2026-08-07 to 2026-09-10, almost all on kibana-on-merge - main (one recent 9.5): always Waiting for element to be located [data-test-subj="authSSL"] timing out to 120s at webhook.ts:24.
  • The shared openNewConnectorForm helper (x-pack/platform/test/functional/services/actions/common.ts) already works around this exact "card click doesn't open the form" reality by retrying the click and asserting the save button appeared. Rather than retry the interaction (which masks the actionability bug), this fix removes the race by waiting until the card is stable, then clicking once.
Verification

Verified locally

  • ✅ Passed: node scripts/eslint x-pack/platform/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/webhook_disabled_ssl_pfx/webhook.ts

Not verified locally

  • This is an FTR test that requires a live Elasticsearch + Kibana, which cannot run in this environment, so the fix was not executed. Its behavior under CI parallel load is therefore unverified.

Note

Requested by @csr. Share feedback in #kibana-qa. Mention @copilot to make quick changes.

Generated by Flaky Test Fixer for #283737 · claude · opus · 576.3 AIC · ⌖ 36.4 AIC · ⊞ 14.5K ·

Fixes flaky webhook disabled-ssl-pfx test where the .webhook-card click
landed while the create-connector flyout was still sliding in, dropping
the click so the connector form (and authSSL tab) never rendered.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown
🤖 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!

@kibanamachine

Copy link
Copy Markdown
Contributor Author

/flaky ftrConfig:x-pack/platform/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/webhook_disabled_ssl_pfx/config.ts:30

Generated by Flaky Fix Verifier for #290455 · claude · opus · 162.1 AIC · ⌖ 36.7 AIC · ⊞ 15.8K ·

@github-actions github-actions Bot added the flaky-fix-check:started Flaky fix verifier: a flaky test runner check has been triggered; in progress. label Sep 11, 2026
@kibanamachine

Copy link
Copy Markdown
Contributor Author

Flaky Test Runner

✅ Build triggered - kibana-flaky-test-suite-runner#14317

  • x-pack/platform/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/webhook_disabled_ssl_pfx/config.ts x30

@kibanamachine

Copy link
Copy Markdown
Contributor Author

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#14317

[✅] x-pack/platform/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/webhook_disabled_ssl_pfx/config.ts: 30/30 tests passed.

see run history

@github-actions github-actions Bot added backport:all-open Backport to all branches that could still receive a release flaky-fix-check:passed Flaky fix verifier: targeted test held across the run(s); fix confirmed. release_note:skip Skip the PR/issue when compiling release notes and removed flaky-fix-check:started Flaky fix verifier: a flaky test runner check has been triggered; in progress. labels Sep 11, 2026
@kibanamachine

Copy link
Copy Markdown
Contributor Author

🏷️ Release and backport labels

The targeted test should not render the pfx tab for ssl auth held 30/30 in the flaky test runner. Applied release_note:skip and backport:all-open.

How release-note and backport labels were chosen

Applied release_note:skip because this is a test-only FTR change (it adds a bounded wait for the webhook card to settle before the single card click) with no user-facing effect.

  • v9.5.4 → the test file is identical to the pre-fix version on 9.5, the patch applies cleanly, and the flake was observed there.
  • v9.4.7 → the test file is identical to the pre-fix version on 9.4 and the patch applies cleanly.
  • v8.19.22 → the test file is identical to the pre-fix version on 8.19 and the patch applies cleanly.

Generated by Flaky Fix Verifier for #290455 · claude · opus · 148.8 AIC · ⌖ 74.7 AIC · ⊞ 16K ·

@kibanamachine
kibanamachine marked this pull request as ready for review September 11, 2026 08:44
@kibanamachine
kibanamachine requested a review from a team as a code owner September 11, 2026 08:44
@kibanamachine
kibanamachine enabled auto-merge (squash) September 11, 2026 08:44
@kibanamachine

Copy link
Copy Markdown
Contributor Author

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

Test Failures

  • [job] [logs] FTR Configs #44 / Actions and Triggers app create alert "before all" hook for "should delete the right action when the same action has been added twice"
  • [job] [logs] FTR Configs #126 / lens serverless - group 1 - subgroup 1 lens smokescreen tests should allow filtering by legend on a pie chart

export default ({ getPageObjects, getService }: FtrProviderContext) => {
const testSubjects = getService('testSubjects');
const find = getService('find');
const retry = getService('retry');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This suite already has the actions service — connectors/utils.ts in this directory uses it.

Suggested change
const retry = getService('retry');
const actions = getService('actions');

Comment on lines +24 to +34

// The flyout slides in on open; clicking a card mid-animation drops the click and
// leaves the form unopened, so wait for the webhook card to stop moving first.
let previous: { x: number; y: number } | undefined;
await retry.waitForWithTimeout('webhook card to stop moving', 30000, async () => {
const { x, y } = await (await testSubjects.find('.webhook-card')).getPosition();
const settled = x === previous?.x && y === previous?.y;
previous = { x, y };
return settled;
});

@js-jankisalvi js-jankisalvi Sep 11, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This suite inherits accessibility:disableAnimations: true, so the flyout isn't animating — and EUI's flyout is animation: euiFlyoutSlideInRight 0s outside prefers-reduced-motion: no-preference anyway. Since retryDelay is 502ms and the first sample always fails (previous is undefined), this is effectively a ~500ms sleep, then one click with no check that the form opened.

It may still help, but against a different race — React not having bound the handler yet, which is what preclickDelay is for.

openNewConnectorForm('webhook') retries the card click until create-connector-flyout-save-btn exists, which is what the other webhook connector tests use. It covers a dropped click for any reason and fails at the card instead of 120s later at authSSL.

Suggestion moved to a correctly anchored comment below — this thread's range didn't cover the whole block.

Comment on lines 23 to 36
await pageObjects.triggersActionsUI.clickCreateConnectorButton();

// The flyout slides in on open; clicking a card mid-animation drops the click and
// leaves the form unopened, so wait for the webhook card to stop moving first.
let previous: { x: number; y: number } | undefined;
await retry.waitForWithTimeout('webhook card to stop moving', 30000, async () => {
const { x, y } = await (await testSubjects.find('.webhook-card')).getPosition();
const settled = x === previous?.x && y === previous?.y;
previous = { x, y };
return settled;
});

await testSubjects.click('.webhook-card');
await testSubjects.click('authSSL');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-anchoring the suggestion from the thread above so it covers the whole block (the other one stopped short of clickCreateConnectorButton() and the two clicks).

Suggested change
await pageObjects.triggersActionsUI.clickCreateConnectorButton();
// The flyout slides in on open; clicking a card mid-animation drops the click and
// leaves the form unopened, so wait for the webhook card to stop moving first.
let previous: { x: number; y: number } | undefined;
await retry.waitForWithTimeout('webhook card to stop moving', 30000, async () => {
const { x, y } = await (await testSubjects.find('.webhook-card')).getPosition();
const settled = x === previous?.x && y === previous?.y;
previous = { x, y };
return settled;
});
await testSubjects.click('.webhook-card');
await testSubjects.click('authSSL');
await actions.common.openNewConnectorForm('webhook');
await testSubjects.click('authSSL');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:all-open Backport to all branches that could still receive a release flaky-fix-check:passed Flaky fix verifier: targeted test held across the run(s); fix confirmed. flaky-test-fixer Automated PR created by the flaky test fixer workflow release_note:skip Skip the PR/issue when compiling release notes

Projects

None yet

2 participants