Member Junction
    Preparing search index...

    Interface FakeProviderOptions<T>

    Options for createFakeProvider.

    interface FakeProviderOptions<T = unknown> {
        currentUser?: Partial<UserInfo>;
        entities?: Partial<EntityInfo>[];
        entityByName?: (name: string) => EntityInfo | undefined;
        roles?: Partial<RoleInfo>[];
        runViewResults?: T[] | ((params: RunViewParams) => T[]);
    }

    Type Parameters

    • T = unknown

      the row shape your RunView calls return (inferred from runViewResults).

    Index

    Properties

    currentUser?: Partial<UserInfo>

    The provider's CurrentUser. Merged over a stub default.

    entities?: Partial<EntityInfo>[]

    Rows for provider.Entities — the entity-metadata array some components scan (md.Entities.find(e => e.Name === '...')). Only the fields the component reads need to be present (commonly Name + ID); pass minimal stubs. Defaults to [] (an empty catalog, which exercises the "entity not found" guard).

    entityByName?: (name: string) => EntityInfo | undefined

    Resolver for provider.EntityByName(name). Components that read entity metadata (this.ProviderToUse.EntityByName(...)) need this — without it the default returns undefined, which is the right behavior for exercising "entity not found" guard paths.

    roles?: Partial<RoleInfo>[]

    Rows for provider.Roles — the role catalog components read for permission/role UIs (md.Roles.find(r => r.Name === '...')). Only the fields the component reads need to be present (commonly Name + ID); pass minimal stubs. Defaults to [].

    runViewResults?: T[] | ((params: RunViewParams) => T[])

    Rows any RunView / RunViews call returns — a fixed array (same for every call) or a function of the params (to vary by EntityName / ExtraFilter).