fix(console, e2e): optimize console and activate tests (#4207)

* activate some tests

* unskip remove project tests

* focus input elements before typing

* fix: prune permissions observable

* cleanup

* remove timeout

* remove ngIf

* test with chrome

* with ngIf

* single observable

* juhu

* maybe better

* fix isAllowed response

* cleanup

Co-authored-by: Max Peintner <[email protected]>
This commit is contained in:
Elio Bischof
2022-09-02 13:43:44 +00:00
committed by GitHub
co-authored by Max Peintner
parent adb5394ae3
commit f0250a3fdb
10 changed files with 178 additions and 151 deletions
+1 -3
View File
@@ -12,8 +12,6 @@ export class RoleGuard implements CanActivate {
constructor(private authService: GrpcAuthService) {}
public canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {
return this.authService.fetchedZitadelPermissions
.pipe(filter((permissionsFetched) => !!permissionsFetched))
.pipe(switchMap((_) => this.authService.isAllowed(route.data['roles'], route.data['requiresAll'])));
return this.authService.isAllowed(route.data['roles'], route.data['requiresAll']);
}
}