[Triggers Actions UI] Wait for webhook card to settle before clicking in flaky SSL test - #290455
[Triggers Actions UI] Wait for webhook card to settle before clicking in flaky SSL test#290455kibanamachine wants to merge 1 commit into
Conversation
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>
|
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
|
/flaky ftrConfig:x-pack/platform/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/webhook_disabled_ssl_pfx/config.ts:30
|
Flaky Test Runner✅ Build triggered - kibana-flaky-test-suite-runner#14317
|
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. |
🏷️ Release and backport labelsThe targeted test How release-note and backport labels were chosenApplied
|
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
Test Failures
|
| export default ({ getPageObjects, getService }: FtrProviderContext) => { | ||
| const testSubjects = getService('testSubjects'); | ||
| const find = getService('find'); | ||
| const retry = getService('retry'); |
There was a problem hiding this comment.
This suite already has the actions service — connectors/utils.ts in this directory uses it.
| const retry = getService('retry'); | |
| const actions = getService('actions'); |
|
|
||
| // 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; | ||
| }); | ||
|
|
There was a problem hiding this comment.
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.
| 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'); |
There was a problem hiding this comment.
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).
| 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'); |
Fixes #283737
Summary
.webhook-cardandauthSSL. It failed withauthSSLnever located (retry.try reached timeout 120000 ms), i.e. the connector form never opened.authSSLauth-type card) renders as soon as the card click sets the action type.authSSLnever appearing means the.webhook-cardclick itself was silently dropped.loadActionTypesresolves fast (cached), the cards render while the flyout is still animating, so the click lands on the still-moving card and is lost.Context
kibanamachine"New failure" notifications), so the root cause was investigated from scratch.kibana-on-merge - main(one recent9.5): alwaysWaiting for element to be located [data-test-subj="authSSL"]timing out to 120s atwebhook.ts:24.openNewConnectorFormhelper (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
node scripts/eslint x-pack/platform/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/webhook_disabled_ssl_pfx/webhook.tsNot verified locally
Note
Requested by @csr. Share feedback in #kibana-qa. Mention
@copilotto make quick changes.