Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
Fixes a merge timing conflict between
elastic@e27066d
and elastic@b4b316a
  • Loading branch information
jbudz committed May 2, 2024
1 parent c7045ca commit 8075e0c
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1175,22 +1175,22 @@ export default ({ getService }: FtrProviderContext): void => {
})
.expect(200);

expect(bulkEditResponse.attributes.summary).to.eql({
expect(bulkEditResponse.attributes.summary).toEqual({
failed: 0,
skipped: 0,
succeeded: 1,
total: 1,
});

// Check that the updated rule is returned with the response
expect(bulkEditResponse.attributes.results.updated[0].investigation_fields).to.eql({
expect(bulkEditResponse.attributes.results.updated[0].investigation_fields).toEqual({
field_names: ['field-1'],
});

// Check that the updates have been persisted
const { body: updatedRule } = await fetchRule(ruleId).expect(200);

expect(updatedRule.investigation_fields).to.eql({ field_names: ['field-1'] });
expect(updatedRule.investigation_fields).toEqual({ field_names: ['field-1'] });
});

it('should add investigation fields to rules', async () => {
Expand Down Expand Up @@ -1218,22 +1218,22 @@ export default ({ getService }: FtrProviderContext): void => {
})
.expect(200);

expect(bulkEditResponse.attributes.summary).to.eql({
expect(bulkEditResponse.attributes.summary).toEqual({
failed: 0,
skipped: 0,
succeeded: 1,
total: 1,
});

// Check that the updated rule is returned with the response
expect(bulkEditResponse.attributes.results.updated[0].investigation_fields).to.eql(
expect(bulkEditResponse.attributes.results.updated[0].investigation_fields).toEqual(
resultingFields
);

// Check that the updates have been persisted
const { body: updatedRule } = await fetchRule(ruleId).expect(200);

expect(updatedRule.investigation_fields).to.eql(resultingFields);
expect(updatedRule.investigation_fields).toEqual(resultingFields);
});

it('should delete investigation fields from rules', async () => {
Expand Down Expand Up @@ -1261,22 +1261,22 @@ export default ({ getService }: FtrProviderContext): void => {
})
.expect(200);

expect(bulkEditResponse.attributes.summary).to.eql({
expect(bulkEditResponse.attributes.summary).toEqual({
failed: 0,
skipped: 0,
succeeded: 1,
total: 1,
});

// Check that the updated rule is returned with the response
expect(bulkEditResponse.attributes.results.updated[0].investigation_fields).to.eql(
expect(bulkEditResponse.attributes.results.updated[0].investigation_fields).toEqual(
resultingFields
);

// Check that the updates have been persisted
const { body: updatedRule } = await fetchRule(ruleId).expect(200);

expect(updatedRule.investigation_fields).to.eql(resultingFields);
expect(updatedRule.investigation_fields).toEqual(resultingFields);
});

const skipIndexPatternsUpdateCases = [
Expand Down Expand Up @@ -1337,22 +1337,22 @@ export default ({ getService }: FtrProviderContext): void => {
})
.expect(200);

expect(bulkEditResponse.attributes.summary).to.eql({
expect(bulkEditResponse.attributes.summary).toEqual({
failed: 0,
skipped: 1,
succeeded: 0,
total: 1,
});

// Check that the rules is returned as skipped with expected skip reason
expect(bulkEditResponse.attributes.results.skipped[0].skip_reason).to.eql(
expect(bulkEditResponse.attributes.results.skipped[0].skip_reason).toEqual(
'RULE_NOT_MODIFIED'
);

// Check that the no changes have been persisted
const { body: updatedRule } = await fetchRule(ruleId).expect(200);

expect(updatedRule.investigation_fields).to.eql(resultingInvestigationFields);
expect(updatedRule.investigation_fields).toEqual(resultingInvestigationFields);
});
}
);
Expand Down

0 comments on commit 8075e0c

Please sign in to comment.