VisualQ

Step library

Browse, edit, and reuse step definitions across features.

Every Gherkin step is matched against a step definition — a Cucumber expression (the user clicks {string}) bound to a Playwright body.

Scopes

VisualQ ships step definitions across three scopes:

ScopeVisible toEditableExamples
SystemEvery projectRead-only (VisualQ team)Pillar steps (a11y, perf, VRT…)
OrgEvery project in the orgAdminsShared business steps (e.g. company login)
ProjectSingle projectMembersPage-specific steps

When matching, VisualQ tries project → org → system in that order. The first match wins.

Browsing the library

Open a feature and use Step library in the toolbar, or From library inside a scenario:

  • Filter by scope (Project, Organization, System, or All) using the tabs under the search bar. Each tab shows a count; Project is selected by default so you see your project-owned steps first.
  • Scope badges on each row use color and icons (Project / Organization / System).
  • Free-text search matches pattern, description, tags, and localized aliases.
  • Steps are grouped by scope when All is active, then by category (pillarHook or uiTags).
  • Each entry shows quick actions to Edit or View (system), Fork, Delete (project; org for admins), or insert into a scenario.

Editing a step definition

Click the code action on a step to open the Step Definition editor. Project steps are editable; system steps are read-only unless you fork them into the project first.

  • Change the pattern (Cucumber expression). Examples:
    • I click on {string} — captures a quoted argument
    • I wait {int}ms — captures an integer
    • the LCP should be below {float}s — float
  • Edit the Playwright body. The same AST whitelist applies.
  • Edit localized aliases such as fr.
  • Add library tags such as cookies or auth.

When you save, VisualQ:

  1. Re-validates the pattern.
  2. Re-validates the body against the AST whitelist.
  3. Recomputes the dedup hash and updates updatedAt.
  4. Marks the step as user-edited so AI generation does not silently replace it.

Creating steps with AI

When a feature contains an unresolved step, VisualQ shows it in the side panel. Use Generate step with AI to create a project-scoped step definition from that Gherkin wording, then open it from the library to review or edit the Playwright.

You can also create a step manually with New step. Keep the Gherkin pattern business-oriented, for example:

When the user accepts cookies

Put selector details, CMP fallbacks, and iframe handling in the Playwright body, not in the scenario text.

Forking system steps

System steps are read-only. If you need to customize one, use Fork to project. The fork keeps the same pattern and Playwright body, but becomes a project step. Since project steps take priority over org and system steps, the fork is the version used by future compiles.

Deleting a step definition

Project and org step definitions can be deleted from the Step library: use the trash icon on a project row, or Delete in the step editor. Organization steps can be deleted by org admins. System steps cannot be deleted — fork them into the project instead.

On this page