Skip to content

Commit 9248e30

Browse files
authored
[EDR Workflows] Stabilize "add a new entry" FTR test under env pressure (elastic#268313)
The `should be able to add a new ${testData.title} entry` parametrized test in `artifact_entries_list.ts` intermittently fails on Serverless with a `TimeoutError` waiting for the new artifact's `criteriaConditions` card to render within the default 10s implicit wait. Mirrors the sibling update-flow pattern: wraps the post-create assertion in `retry.waitForWithTimeout(20000, …)` keyed on the `criteriaConditions` card before running the existing `checkResults` loop. Closes elastic#265265
1 parent 978082b commit 9248e30

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,15 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
241241

242242
it(`should be able to add a new ${testData.title} entry`, async () => {
243243
await createArtifact(testData, { policyId: policyInfo.packagePolicy.id });
244-
// Check new artifact is in the list
244+
245+
// Check new artifact is in the list (wait for list to be updated)
246+
await retry.waitForWithTimeout('entry is added to list', 20000, async () => {
247+
const currentValue = await testSubjects.getVisibleText(
248+
testData.create.checkResults[0].selector
249+
);
250+
return currentValue === testData.create.checkResults[0].value;
251+
});
252+
245253
for (const checkResult of testData.create.checkResults) {
246254
expect(await testSubjects.getVisibleText(checkResult.selector)).to.equal(
247255
checkResult.value

0 commit comments

Comments
 (0)