[Security Solution][Detections] fixes timeline setting to None functional test for bulk edit (#137980)

## Summary

Improves timeline removal functional test for bulk edit, by setting default timeline properties for rule, that being tested


### Checklist

Delete any items that are not applicable to this PR.

- [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
This commit is contained in:
Vitalii Dmyterko 2022-08-04 09:27:26 +01:00 committed by GitHub
parent 6e1cac8dad
commit fc4a49532f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -634,8 +634,18 @@ export default ({ getService }: FtrProviderContext): void => {
});
it('should correctly remove timeline', async () => {
const timelineId = 'test-id';
const timelineTitle = 'Test timeline template';
const ruleId = 'ruleId';
await createRule(supertest, log, getSimpleRule(ruleId));
const createdRule = await createRule(supertest, log, {
...getSimpleRule(ruleId),
timeline_id: 'test-id',
timeline_title: 'Test timeline template',
});
// ensure rule has been created with timeline properties
expect(createdRule.timeline_id).to.be(timelineId);
expect(createdRule.timeline_title).to.be(timelineTitle);
const { body } = await postBulkAction()
.send({