mirror of
https://github.com/Redocly/redoc.git
synced 2025-04-18 15:51:58 +03:00
Fix e2e tests timeouts
This commit is contained in:
parent
167b272d3e
commit
0e354afd20
|
@ -23,9 +23,11 @@ export class JsonSchemaLazy implements OnDestroy, AfterViewInit {
|
||||||
@Input() nestOdd: boolean;
|
@Input() nestOdd: boolean;
|
||||||
@Input() childFor: string;
|
@Input() childFor: string;
|
||||||
@Input() isArray: boolean;
|
@Input() isArray: boolean;
|
||||||
|
disableLazy: boolean = false;
|
||||||
loaded: boolean = false;
|
loaded: boolean = false;
|
||||||
constructor(private specMgr:SpecManager, private location:ViewContainerRef, private elementRef:ElementRef,
|
constructor(private specMgr:SpecManager, private location:ViewContainerRef, private elementRef:ElementRef,
|
||||||
private resolver:ComponentResolver, private optionsService:OptionsService, private _renderer: Renderer) {
|
private resolver:ComponentResolver, private optionsService:OptionsService, private _renderer: Renderer) {
|
||||||
|
this.disableLazy = this.optionsService.options.disableLazySchemas;
|
||||||
}
|
}
|
||||||
|
|
||||||
normalizePointer() {
|
normalizePointer() {
|
||||||
|
@ -67,7 +69,7 @@ export class JsonSchemaLazy implements OnDestroy, AfterViewInit {
|
||||||
|
|
||||||
// skip caching view with tabs inside (discriminator)
|
// skip caching view with tabs inside (discriminator)
|
||||||
// as it needs attached controller
|
// as it needs attached controller
|
||||||
if (compRef.instance.hasDescendants || compRef.instance._hasSubSchemas) {
|
if (!this.disableLazy && (compRef.instance.hasDescendants || compRef.instance._hasSubSchemas)) {
|
||||||
this._loadAfterSelf();
|
this._loadAfterSelf();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -85,11 +87,7 @@ export class JsonSchemaLazy implements OnDestroy, AfterViewInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
if (this.optionsService.options.disableLazySchemas) {
|
if (!this.auto && !this.disableLazy) return;
|
||||||
this._loadAfterSelf();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!this.auto) return;
|
|
||||||
this.loadCached();
|
this.loadCached();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user