Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import type { FtrProviderContext } from '../../../../ftr_provider_context';
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');

const pageObjects = getPageObjects(['common', 'triggersActionsUI', 'header']);

describe('webhook', () => {
Expand All @@ -20,6 +21,17 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {

it('should not render the pfx tab for ssl auth', async () => {
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;
});

@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.

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');


Expand Down
Loading