kibana/x-pack/test/detection_engine_api_integration
Frank Hassanabad 461d44d8a4
[SIEM][Detection Engine] Fixes a stale view/query within the signals table when re-opening/closing signals
## Summary

Fixes a one liner bug where we were not using waitFor and could have stale views of data from the timeline. This removes that by adding a `waitFor` when setting the signals to be closed, open, in-progress, etc...

This also adds a new `waitFor` for the end to end tests and fixes other tests to use that rather than doing a wait for 5 seconds. This should keep the end to end backend tests fast. 

Before this you could sometimes try to re-open 3 signals like below and it would not change the signals to being open but rather re-query the stale view and show the same signals as being closed when they are not closed:
![crop_bug](https://user-images.githubusercontent.com/1151048/84713572-8b5e7f00-af28-11ea-80b6-2ad67f16b7df.gif)

Now with this PR, those signals will show as being re-opened and the closed signals will update correctly within the same UI on the same tab.

### Checklist

- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios
2020-06-16 08:41:59 -06:00
..
basic [SIEM][Detection Engine] Fixes a stale view/query within the signals table when re-opening/closing signals 2020-06-16 08:41:59 -06:00
common Register privileges in Kibana Platform Security plugin and remove legacy getUser API. (#65472) 2020-06-05 08:11:58 +02:00
security_and_spaces [SIEM][Detection Engine] Fixes a stale view/query within the signals table when re-opening/closing signals 2020-06-16 08:41:59 -06:00
utils.ts [SIEM][Detection Engine] Fixes a stale view/query within the signals table when re-opening/closing signals 2020-06-16 08:41:59 -06:00