[Security Solution][Threat Hunting] Fixes failing timeline test #113394
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
In this PR we are fixing a failing Cypress test.
After the Cypress upgrade to the latest version, the
Create a timeline from a template
test started to fail. I don't know exactly the reason but looks like related to the way the assertions were done on the API response.We need to take into consideration that Cypress should be used purely for testing the UI in those situations where it is impossible to check the same behavior with Jest or the API framework. The API in Cypress should be only used to prepare test data, to prepare the initial status of the test, or to wait for certain events before continuing with the assertions on the UI.
I refactored the test and now the assertions are done using the UI.