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
Version info:
"@testing-library/angular": "^9.3.1",
"jest": "^26.0.1",
"@angular/core": "~9.1.9",
Hi,
I made a project with nothing in it except this example component, to demonstrate the issue:
import { Component } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
@Component({
selector: 'mwf-test-show',
template: '<button (click)="toggleShow()" data-testid="toggle">toggle</button><div *ngIf="show$ | async" data-testid="getme">Here I am</div>',
})
export class TestSelectComponent {
showSubj = new BehaviorSubject(false);
show$ = this.showSubj.asObservable().pipe(tap(show => console.log(show)));
toggleShow() {
this.showSubj.next(true);
}
}
In my test I use the waitFor function to see if the hidden div shows after toggling the Observable value to true, but it does not.
The console.log in the pipeline is triggered though. But it's as if the re-rendering does not happen.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I made a project with nothing in it except this example component, to demonstrate the issue:
In my test I use the
waitFor
function to see if the hidden div shows after toggling the Observable value totrue
, but it does not.The
console.log
in the pipeline is triggered though. But it's as if the re-rendering does not happen.The text was updated successfully, but these errors were encountered: