You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made this simple example component, to demonstrate the issue:
@Component({
selector: 'mwf-test-timing',
template: '<ng-container *ngIf="resultSet$ | async as resultSet"> <span data-testid="yes">{{resultSet}}</span> </ng-container> <button (click)="handleClick()">CLICK ME</button>',
styleUrls: ['./test-timing.component.scss']
})
export class TestTimingComponent implements OnInit {
click$ = new Subject();
resultSet$ = this.click$.pipe(
debounceTime(300),
tap(() => console.log('button was clicked')),
map(() => 'this is a result')
);
constructor() {
}
ngOnInit() {
}
handleClick() {
this.click$.next();
}
}
In my test I use the waitFor function to see if a result shows up, but it does not.
The console.log in the pipeline is triggered though. But it's as if the re-rendering does not happen.
This test passes if I leave out the debounceTime pipe.
The text was updated successfully, but these errors were encountered:
sjbuysse
changed the title
waitFor not picking up async changes from pipeline with debounceTime
waitFor not picking up DOM changes from pipeline with debounceTimeApr 17, 2020
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I made this simple example component, to demonstrate the issue:
In my test I use the
waitFor
function to see if a result shows up, but it does not.The
console.log
in the pipeline is triggered though. But it's as if the re-rendering does not happen.This test passes if I leave out the
debounceTime
pipe.The text was updated successfully, but these errors were encountered: