Skip to content

openObsidianSettingsTab

Opens Obsidian’s settings modal on a given tab and waits until that tab has actually rendered, resolving the transport and vault from the current test context.

See Lib.openSettingsTab for why app.setting.open() can put the modal in a second Electron window, and why the container is attached before it on a vault that lacks the harness’s settingsPopoutWindow: false default.

Close it again from a callback with app.setting.close(); re-opening works, because the attach is idempotent.

Import:

import { openObsidianSettingsTab } from 'obsidian-integration-testing';

Signature:

function openObsidianSettingsTab(params: OpenObsidianSettingsTabParams): Promise<string[]>

Parameters:

ParameterTypeDescription
paramsOpenObsidianSettingsTabParamsThe tab to open, how long to wait, and transport / vault overrides.

Returns: Promise<string[]> — A Promise resolving to the names of the setting rows the tab rendered.


Links to this page: