Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution] [Attack discovery] Fixes Attack discovery loading…
… popover issues (#183675) ## [Security Solution] [Attack discovery] Fixes Attack discovery loading popover issues ### Summary This PR fixes issues related to the Attack discovery loading popover, where it may not be displayed, or get stuck in an open state ### Desk testing 1) Configure at least two generative AI connectors 2) Clear local storage 3) Close all open browser tabs with sessions to Kibana 4) Navigate to Security > Attack discovery 5) Select the first connector 6) Click Generate **Expected results** - While loading, the information (i) icon (popover anchor) will NOT be displayed, because it's the first generation interval for the selected connector - Attack discoveries are generated for the selected connector 7) Once again, click Generate **Expected result** - While loading, the information (i) icon (popover anchor) IS displayed, because there's now at least one generation interval available in local storage 8) Click the information (i) icon **Expected result** - The popover containing the text `Remaining time is based on the average speed...` is displayed - The popover includes the time of the last generation 9) Click anywhere outside the popover **Expected results** - The popover closes 10) Keep opening and closing the popover while the selected connector is loading **Expected results** - The popover continues to open and close as expected - Attack discoveries are once again generated for the currently selected connector 11) Select the other (2nd) connector **Expected results** - The `Up to 20 alerts will be analyzed` empty state is displayed 12) Click Generate for the newly-selected connector **Expected results** - While loading, the information (i) icon (popover anchor) will NOT be displayed, because it's the first generation interval for the newly selected connector - Attack discoveries are generated for the newly selected connector 13) Once again, click Generate **Expected result** - While loading, the information (i) icon (popover anchor) IS displayed, because there's now at least one generation interval available in local storage for the selected (2nd) connector 14) Click on the information (i) icon (popover anchor) **Expected result** - The popover containing the text `Remaining time is based on the average speed...` is displayed - The popover contains one date (for the previous generation) 15) Click anywhere outside the popover **Expected results** - The popover closes 16) While the 2nd connector is STILL loading, select the first connector **Expected result** - The cached attack discovery results for the first connector are displayed - The loading callout is hidden - The Generate button is disabled, and instead displays the text `Loading...` 17) While the 2nd connector is STILL loading, re-select the 2nd connector **Expected result** - The countdown timer is once again displayed, because the 2nd connector's was still loading - Attack discoveries are generated for the 2nd connector 18) Close the browser 19) Open the browser 20) Navigate to Security > Attack discovery **Expected result** - The 2nd connector is still selected 21) Click Generate **Expected result** - While loading, the information (i) icon (popover anchor) will be displayed, because it's using the results from local storage 22) Click on the information (i) icon (popover anchor) **Expected result** - The popover containing the text `Remaining time is based on the average speed...` is displayed - The popover contains two datetimes, for the two previous runs of the 2nd connector 23) Click anywhere outside the popover **Expected results** - The popover closes
- Loading branch information