mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-6150] User info disappears in every click (#7328)
* [AAE-6150] userinfo remove debounce for every reload * [ci:force] force e2e
This commit is contained in:
@@ -27,7 +27,7 @@ import { IdentityUserService } from '../../services/identity-user.service';
|
||||
import { BpmUserModel } from '../../models/bpm-user.model';
|
||||
import { EcmUserModel } from '../../models/ecm-user.model';
|
||||
import { UserInfoComponent } from './user-info.component';
|
||||
import { of, timer } from 'rxjs';
|
||||
import { of } from 'rxjs';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
@@ -88,7 +88,7 @@ describe('User info component', () => {
|
||||
|
||||
async function whenFixtureReady() {
|
||||
fixture.detectChanges();
|
||||
await timer(500).toPromise();
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
}
|
||||
|
||||
|
@@ -25,7 +25,7 @@ import { EcmUserService } from '../../services/ecm-user.service';
|
||||
import { IdentityUserService } from '../../services/identity-user.service';
|
||||
import { of, Observable, Subject } from 'rxjs';
|
||||
import { MatMenuTrigger, MenuPositionX, MenuPositionY } from '@angular/material/menu';
|
||||
import { debounceTime, startWith, takeUntil } from 'rxjs/operators';
|
||||
import { filter, takeUntil } from 'rxjs/operators';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-userinfo',
|
||||
@@ -75,15 +75,15 @@ export class UserInfoComponent implements OnInit, OnDestroy {
|
||||
private bpmUserService: BpmUserService,
|
||||
private identityUserService: IdentityUserService,
|
||||
private authService: AuthenticationService) {
|
||||
this.authService.onLogin
|
||||
.pipe(
|
||||
filter(() => this.authService.isKerberosEnabled()),
|
||||
takeUntil(this.destroy$)
|
||||
).subscribe(() => this.getUserInfo());
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.authService.onLogin
|
||||
.pipe(
|
||||
startWith(this.authService.isLoggedIn()),
|
||||
debounceTime(500),
|
||||
takeUntil(this.destroy$)
|
||||
).subscribe(() => this.getUserInfo());
|
||||
this.getUserInfo();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
|
Reference in New Issue
Block a user