[Security Solution] [Attack discovery] Fix mistake in default attack discovery graph state (#213651)

## Summary

Fix mistake instroduced in [this
PR](https://github.com/elastic/kibana/pull/205553/files#diff-7a3a06cc740e97fe6941bb05a878a18561ed194946d3f28fadeb3f2f38dc1013R50).
The default state of continuePrompt was not migrated correctly.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [X] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [X]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [X] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [X] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [X] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [X] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
This commit is contained in:
Kenneth Kreindler 2025-03-08 10:21:37 +00:00 committed by GitHub
parent bda4c78c53
commit 166efa0c83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -124,6 +124,12 @@ describe('getDefaultGraphState', () => {
expect(graphAnnotation.spec.unrefinedResults.value).toBeNull();
});
it('returns the expected default continuePrompt state', () => {
const graphAnnotation = getDefaultGraphAnnotation({ prompts });
expect(graphAnnotation.spec.continuePrompt.value).toBe(prompts.continue);
});
it('returns the expected default end', () => {
const graphAnnotation = getDefaultGraphAnnotation({ prompts });

View file

@ -47,7 +47,7 @@ export const getDefaultGraphAnnotation = ({ end, filter, prompts, start }: Optio
}),
continuePrompt: Annotation<string, string>({
reducer: (x: string, y?: string) => y ?? x,
default: () => '',
default: () => prompts.continue,
}),
end: Annotation<string | null | undefined>({
reducer: (x?: string | null, y?: string | null) => y ?? x,