Skip to content

Config Reference

verfix.config.json is the Flow Library for your project. It lives in your project root and is created by verfix init.

{
"baseUrl": "http://localhost:3000",
"mode": "assisted",
"flows": [
{
"id": "homepage-smoke",
"steps": [
{ "action": "navigate", "url": "/" }
],
"assertions": [
{ "type": "page_loaded" },
{ "type": "no_console_errors" }
]
},
{
"id": "contact-form",
"mode": "strict",
"steps": [
{ "action": "navigate", "url": "/contact" },
{ "action": "type", "selector": "[data-testid=name]", "value": "Test User" },
{ "action": "click", "selector": "[data-testid=submit]" }
],
"assertions": [
{ "type": "text_visible", "value": "Thank you" }
]
}
]
}

FieldTypeRequiredDefaultDescription
baseUrlstringYesBase URL of your app. All navigate steps with relative URLs are resolved against this.
mode"strict" | "assisted" | "smoke" | "exploratory"No"strict"Default execution mode for all flows. Individual flows can override this.
flowsFlow[]YesArray of verification flows.
assertionsAssertionDefinition[]NoGlobal assertions applied to every flow if the flow has none.
selectorsRecord<string, string>NoNamed selector map. Referenced by key in step targets.
metadataobjectNoArbitrary metadata passed to the API (e.g. { "framework": "nextjs" }).
timeoutnumberNo15000Default timeout in milliseconds for steps and assertions.
retriesnumberNo2Number of retries on failure before declaring the flow failed.

Each item in the flows array:

FieldTypeRequiredDescription
idstringYesUnique identifier for this flow. Used with --flow <id>.
namestringNoAlternative to id. If both provided, id takes precedence.
mode"strict" | "assisted" | "smoke" | "exploratory"NoOverrides the global mode for this flow only.
stepsFlowStep[]YesOrdered list of browser actions.
assertionsAssertionDefinition[]NoAssertions to check after all steps complete.

Steps are the browser actions executed in order before assertions run.

Navigate to a URL. Relative paths are resolved against baseUrl.

{ "action": "navigate", "url": "/login" }
{ "action": "navigate", "url": "https://example.com/page" }
FieldTypeRequiredDescription
action"navigate"Yes
urlstringYesAbsolute or relative URL

Click an element.

{ "action": "click", "selector": "[data-testid=submit]" }
{ "action": "click", "testId": "submit-button" }
FieldTypeRequiredDescription
action"click"Yes
selectorstringOne ofCSS selector
testIdstringOne ofShorthand for [data-testid=<value>]
textstringOne ofFinds element by visible text content
timeoutnumberNoStep-level timeout override in ms

Type text into an input.

{ "action": "type", "selector": "[data-testid=email]", "value": "test@example.com" }
FieldTypeRequiredDescription
action"type"Yes
selector / testId / textstringOne ofTarget element
valuestringYesText to type
timeoutnumberNoStep-level timeout override in ms

Wait for an element to appear before proceeding.

{ "action": "wait_for_selector", "selector": "[data-testid=dashboard]" }
FieldTypeRequiredDescription
action"wait_for_selector"Yes
selector / testIdstringOne ofTarget element
timeoutnumberNoStep-level timeout override in ms

Assertions are checked after all steps complete. Each has a type field.

Verifies the page loaded without a navigation error.

{ "type": "page_loaded" }

Verifies an element matching the selector is present and visible.

{ "type": "selector_visible", "selector": "[data-testid=dashboard]" }
FieldTypeRequired
selectorstringYes
timeoutnumberNo

Verifies a text string appears on the page.

{ "type": "text_visible", "value": "Welcome back" }
FieldTypeRequired
valuestringYes
timeoutnumberNo

Verifies the current URL contains a substring.

{ "type": "url_contains", "value": "/dashboard" }
FieldTypeRequired
valuestringYes

Verifies the page <title> contains a substring.

{ "type": "title_contains", "value": "Dashboard" }
FieldTypeRequired
valuestringYes

Fails if any console.error() calls were detected during the flow.

{ "type": "no_console_errors" }

Verifies a network request to a URL pattern returned a 2xx status.

{ "type": "network_request_success", "value": "/api/user" }
FieldTypeRequired
valuestringYes — URL pattern to match

verfix init can scaffold these flows from the preset library:

Flow IDSteps
loginnavigate /login → type email → type password → click submit
dashboard-loadnavigate /dashboard → assert page_loaded + selector_visible + no_console_errors
signupnavigate /signup → type name/email/password → click submit
checkoutnavigate /checkout → type card number → click pay button