# zidane-ui/onboarding/testing

Import: `import { … } from 'zidane-ui/onboarding/testing'`. Source: [ui/src/onboarding/testing/index.ts](https://github.com/Tahul/zidane/blob/main/ui/src/onboarding/testing/index.ts).

## Functions

### `createFixtureOnboardingHost`

Function.

Builds an [`OnboardingHost`](https://zidane.si/docs/reference/ui-onboarding-headless.md#OnboardingHost) over demo data and scripted behaviour.

```ts
function createFixtureOnboardingHost(options?: FixtureOnboardingOptions): OnboardingHost
```

**Parameters**

- `options?` (`FixtureOnboardingOptions`, default `{}`): The surface, mode, demo data and script.

**Returns** `OnboardingHost`: The host.

Source: [ui/src/onboarding/headless/fixture-host.ts:96](https://github.com/Tahul/zidane/blob/main/ui/src/onboarding/headless/fixture-host.ts#L96)

### `demoOnboardingModels`

Function.

The models a demo provider offers.

```ts
function demoOnboardingModels(key: string): readonly OnboardingModelInfo[]
```

**Parameters**

- `key` (`string`): Provider key.

**Returns** `readonly OnboardingModelInfo[]`

Source: [ui/src/onboarding/headless/fixtures.ts:159](https://github.com/Tahul/zidane/blob/main/ui/src/onboarding/headless/fixtures.ts#L159)

## Constants

### `DEMO_IMPORT_PREVIEW`

Constant.

What an import from that Claude Code setup brings over.

```ts
const DEMO_IMPORT_PREVIEW: OnboardingImportPreview
```

Source: [ui/src/onboarding/headless/fixtures.ts:118](https://github.com/Tahul/zidane/blob/main/ui/src/onboarding/headless/fixtures.ts#L118)

### `DEMO_ONBOARDING_DETECTION`

Constant.

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

```ts
const DEMO_ONBOARDING_DETECTION: OnboardingDetection
```

Source: [ui/src/onboarding/headless/fixtures.ts:107](https://github.com/Tahul/zidane/blob/main/ui/src/onboarding/headless/fixtures.ts#L107)

### `DEMO_ONBOARDING_PROVIDERS`

Constant.

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

```ts
const DEMO_ONBOARDING_PROVIDERS: readonly OnboardingProvider[]
```

Source: [ui/src/onboarding/headless/fixtures.ts:31](https://github.com/Tahul/zidane/blob/main/ui/src/onboarding/headless/fixtures.ts#L31)

### `DEMO_SKILL_LISTINGS`

Constant.

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

```ts
const DEMO_SKILL_LISTINGS: Readonly<Record<string, SkillSourceListing>>
```

Source: [ui/src/onboarding/headless/fixtures.ts:167](https://github.com/Tahul/zidane/blob/main/ui/src/onboarding/headless/fixtures.ts#L167)

## Interfaces

### `FixtureOnboardingOptions`

Interface.

Options of [`createFixtureOnboardingHost`](https://zidane.si/docs/reference/ui-onboarding-testing.md#createFixtureOnboardingHost).

```ts
interface FixtureOnboardingOptions
```

**Properties**

- `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?` (`number`, default `600`): Milliseconds between scripted steps.
- `detection?` (`OnboardingDetection`): What was found. Defaults to [`DEMO_ONBOARDING_DETECTION`](https://zidane.si/docs/reference/ui-onboarding-testing.md#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`, default `'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`](https://zidane.si/docs/reference/ui-onboarding-testing.md#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`, default `'full'`): How much of it runs.
- `models?` (`(key: string) => readonly OnboardingModelInfo[]`): The models Connect offers for a provider. Defaults to [`demoOnboardingModels`](https://zidane.si/docs/reference/ui-onboarding-testing.md#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'`, default `'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`](https://zidane.si/docs/reference/ui-onboarding-testing.md#DEMO_SKILL_LISTINGS).
- `surface?` (`OnboardingSurface`, default `'desktop'`): The app the wizard runs in.
- `themes?` (`readonly Theme[]`): The themes Look offers. Defaults to the built-in ones.

Source: [ui/src/onboarding/headless/fixture-host.ts:28](https://github.com/Tahul/zidane/blob/main/ui/src/onboarding/headless/fixture-host.ts#L28)
