Skip to content

Commit 7995f4c

Browse files
authored
[EDR Workflows] Stabilize Fleet integrations FTR tests under env pressure (elastic#268492)
The `should display the endpoint custom content` and `should show the Trusted Apps page when link is clicked` tests in `fleet_integrations.ts` intermittently fail on ESS and Serverless with a Selenium `ScriptTimeoutError` when Kibana is under Fleet/ES startup contention (registry `ECONNRESET`, `missing_references` saved-object imports, ES `NoLivingConnectionsError`). Mirrors the pattern from elastic#268313: wraps the post-click element-render and post-navigation assertions in `retry.waitForWithTimeout` / `retry.tryForTime` so each retry attempt gets a fresh WebDriver script-timeout window. Closes elastic#250405 Closes elastic#250417 Closes elastic#265974 Closes elastic#260847
1 parent b240c58 commit 7995f4c

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

x-pack/solutions/security/test/security_solution_endpoint/apps/integrations/fleet_integrations.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
1313
const testSubjects = getService('testSubjects');
1414
const esArchiver = getService('esArchiver');
1515
const browser = getService('browser');
16+
const retry = getService('retry');
1617
const endpointDataStreamHelpers = getService('endpointDataStreamHelpers');
1718

1819
describe('When in the Fleet application', function () {
@@ -44,13 +45,24 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
4445

4546
it('should display the endpoint custom content', async () => {
4647
await (await fleetIntegrations.findIntegrationDetailCustomTab()).click();
47-
await testSubjects.existOrFail('fleetEndpointPackageCustomContent');
48+
await retry.waitForWithTimeout(
49+
'endpoint custom content to render',
50+
30_000,
51+
async () => await testSubjects.exists('fleetEndpointPackageCustomContent')
52+
);
4853
});
4954

5055
it('should show the Trusted Apps page when link is clicked', async () => {
5156
await (await fleetIntegrations.findIntegrationDetailCustomTab()).click();
57+
await retry.waitForWithTimeout(
58+
'trusted apps link to render',
59+
30_000,
60+
async () => await testSubjects.exists('trustedApps-artifactsLink')
61+
);
5262
await (await testSubjects.find('trustedApps-artifactsLink')).click();
53-
await trustedApps.ensureIsOnTrustedAppsEmptyPage();
63+
await retry.tryForTime(30_000, async () => {
64+
await trustedApps.ensureIsOnTrustedAppsEmptyPage();
65+
});
5466
});
5567
});
5668
});

0 commit comments

Comments
 (0)