tiborm commented on a change in pull request #1514: METRON-2190: [UI] Alerts 
UI: Indicating loading and preventing parallel requests
URL: https://github.com/apache/metron/pull/1514#discussion_r327018486
 
 

 ##########
 File path: 
metron-interface/metron-alerts/src/app/alerts/configure-rows/show-hide/show-hide-alert-entries.component.spec.ts
 ##########
 @@ -104,29 +104,26 @@ describe('ShowHideAlertEntriesComponent', () => {
     expect(component.onVisibilityChanged).toHaveBeenCalledWith('DISMISS', 
false);
   });
 
-  it('should trigger changed event on any toggle changes', () => {
+  it('should trigger changed event on any toggle changes and propagate state', 
() => {
+    const serviceSpy = TestBed.get(ShowHideService);
     spyOn(component.changed, 'emit');
     fixture.detectChanges();
 
-    
fixture.debugElement.query(By.css('[data-qe-id="hideDismissedAlertsToggle"] 
input')).nativeElement.click();
-    fixture.detectChanges();
-
-    expect((component.changed.emit as Spy).calls.argsFor(0)[0]).toEqual(new 
ShowHideChanged('DISMISS', true));
-
-    fixture.debugElement.query(By.css('[data-qe-id="hideResolvedAlertsToggle"] 
input')).nativeElement.click();
-    fixture.detectChanges();
-
-    expect((component.changed.emit as Spy).calls.argsFor(1)[0]).toEqual(new 
ShowHideChanged('RESOLVE', true));
 
 Review comment:
   The content of the event is changed to what you see in line 118 and 126.

----------------------------------------------------------------
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

Reply via email to