sardell commented on a change in pull request #1460: METRON-2179: Make
navigation in both UIs consistent
URL: https://github.com/apache/metron/pull/1460#discussion_r303005908
##########
File path:
metron-interface/metron-config/src/app/sensors/sensor-threat-triage/rule-editor/sensor-rule-editor.component.spec.ts
##########
@@ -84,17 +84,20 @@ describe('Component: SensorRuleEditorComponent', () => {
component.riskLevelRule = {name: 'rule1', rule: 'initial rule',
score: '1', comment: ''};
component.ngOnInit();
component.onSave();
+ fixture.detectChanges();
Review comment:
I'm not sure how this passed before, but this set of tests would fail after
updating to Angular 7 because the `riskLevelRule` property's value was updated
without calling change detection. Because we are directly and synchronously
updating the component property's value in the test, we have to explicitly call
change detection so the Angular testing environment knows of the value update.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services