Skip to content

zidane-ui/onboarding/testing

import { … } from 'zidane-ui/onboarding/testing'ui/src/onboarding/testing/index.ts

Functions#

createFixtureOnboardingHostFunction#

Builds an OnboardingHost over demo data and scripted behaviour.

TypeScript
function createFixtureOnboardingHost(options?: FixtureOnboardingOptions): OnboardingHost
Parameters
NameTypeDefaultDescription
options?FixtureOnboardingOptions{}

The surface, mode, demo data and script.

ui/src/onboarding/headless/fixture-host.ts:96

demoOnboardingModelsFunction#

The models a demo provider offers.

TypeScript
function demoOnboardingModels(key: string): readonly OnboardingModelInfo[]
Parameters
NameTypeDescription
keystring

Provider key.

ui/src/onboarding/headless/fixtures.ts:159

Constants#

DEMO_IMPORT_PREVIEWConstant#

What an import from that Claude Code setup brings over.

TypeScript
const DEMO_IMPORT_PREVIEW: OnboardingImportPreview

ui/src/onboarding/headless/fixtures.ts:118

DEMO_ONBOARDING_DETECTIONConstant#

A machine with an Anthropic key in the environment, Claude Code, the GitHub CLI and Ollama.

TypeScript
const DEMO_ONBOARDING_DETECTION: OnboardingDetection

ui/src/onboarding/headless/fixtures.ts:107

DEMO_ONBOARDING_PROVIDERSConstant#

The built-in providers and the provider extensions, as Connect lists them on a fresh machine, each with its logo.

TypeScript
const DEMO_ONBOARDING_PROVIDERS: readonly OnboardingProvider[]

ui/src/onboarding/headless/fixtures.ts:31

DEMO_SKILL_LISTINGSConstant#

The skills of the recommended sources, as browseSkillSource lists them, cut to a few each: what the fixture host's skills.browse answers.

TypeScript
const DEMO_SKILL_LISTINGS: Readonly<Record<string, SkillSourceListing>>

ui/src/onboarding/headless/fixtures.ts:167

Interfaces#

FixtureOnboardingOptionsInterface#

Options of createFixtureOnboardingHost.

TypeScript
interface FixtureOnboardingOptions
FixtureOnboardingOptions properties
NameTypeDefaultDescription
appearance?OnboardingAppearance

The look in effect. Defaults to the system's mode on the default dark and light themes.

appIconNote?string

The line under the app icons.

appIcons?readonly OnboardingAppIcon[]

The app icons Look offers, the first one the default and the one in use. Absent: Look offers no icon.

delayMs?number600

Milliseconds between scripted steps.

detection?OnboardingDetection

What was found. Defaults to DEMO_ONBOARDING_DETECTION.

failing?readonly string[]

Provider keys, connector ids, extension names and skill sources whose sign-in, test, listing or install fails.

githubToken?string | null'gho_demo'

The GitHub token "Use my gh login" takes.

importPreview?OnboardingImportPreview | null

What an import brings over. null leaves Bring your setup out. Defaults to DEMO_IMPORT_PREVIEW.

installedConnectors?readonly string[]

Connector ids already installed.

installedExtensions?readonly string[]

Native extensions already installed.

installedSkills?readonly string[]

Skills already installed, by name.

mode?OnboardingMode'full'

How much of it runs.

models?(key: string) => readonly OnboardingModelInfo[]

The models Connect offers for a provider. Defaults to demoOnboardingModels.

onCommit?(result: OnboardingResult) => void

Called with the result when the run finishes.

settings?Partial<Settings>

The stored settings. Defaults to none.

signIn?'url' | 'device' | 'prompt''url'

What a browser sign-in shows after it starts: the page (url), a device code, or a question.

skillImages?SkillSourceImages

Where the skill browser finds avatars and previews. Absent: GitHub.

skillListings?Readonly<Record<string, SkillSourceListing>>

The skill sources a browse lists, by what the user typed. Defaults to DEMO_SKILL_LISTINGS.

surface?OnboardingSurface'desktop'

The app the wizard runs in.

themes?readonly Theme[]

The themes Look offers. Defaults to the built-in ones.

ui/src/onboarding/headless/fixture-host.ts:28