Skip to content

Commit 3219a16

Browse files
committed
fix(security/scout): remove cleanStandardList to preserve llmProxy connector
cleanStandardList() deletes saved objects of type 'action', which includes the .gen-ai connector created by the worker-scoped llmProxy fixture. Calling it in beforeEach destroyed the connector before the test ran, making the bulk 'Add to chat' action invisible and causing every subsequent step to fail. The connector lifecycle is owned by llmProxy; this test only needs targeted deleteAll() calls for the objects it creates. Refs #17496
1 parent f935559 commit 3219a16

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

x-pack/solutions/security/plugins/security_solution/test/scout/ui/parallel_tests/investigations/bulk_add_alerts_to_chat.spec.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ spaceTest.describe(
2222
const ruleNames: string[] = [];
2323

2424
spaceTest.beforeEach(async ({ browserAuth, apiServices, scoutSpace }) => {
25-
// Defensive cleanup from any prior failed run
25+
// Defensive cleanup from any prior failed run.
26+
// Note: cleanStandardList() is intentionally omitted here — it deletes saved objects
27+
// of type 'action', which would destroy the .gen-ai connector created by the
28+
// worker-scoped llmProxy fixture and make the bulk "Add to chat" action disappear.
2629
await apiServices.detectionRule.deleteAll();
2730
await apiServices.detectionAlerts.deleteAll();
28-
await scoutSpace.savedObjects.cleanStandardList();
2931

3032
ruleNames.length = 0;
3133
for (let i = 0; i < ALERT_COUNT; i++) {
@@ -40,10 +42,9 @@ spaceTest.describe(
4042
await browserAuth.loginWithCustomRole(FULL_KIBANA_SECURITY_ROLE);
4143
});
4244

43-
spaceTest.afterEach(async ({ apiServices, scoutSpace }) => {
45+
spaceTest.afterEach(async ({ apiServices }) => {
4446
await apiServices.detectionRule.deleteAll();
4547
await apiServices.detectionAlerts.deleteAll();
46-
await scoutSpace.savedObjects.cleanStandardList();
4748
});
4849

4950
spaceTest(

0 commit comments

Comments
 (0)