Edit a test

Change a check without recording anything, redo a test from any step, rename it, or run another test before it.

Change a check, a caption or a hold

This needs no recording. It needs the studio running, because the test is a file on your machine.

  1. Open the test and click Edit steps.
  2. Click the pencil on a step. On a check you can change what it checks. On any step you can change its caption, and on a check its hold.
  3. Change as many steps as you want. Each change is marked on its step and can be reverted.
  4. Click Save changes. The file in your repository is rewritten and the test is replayed to confirm it still passes.

If the file changed on disk after you opened the page, nothing is saved.

Ask the Assistant for the change

The Assistant Paid plan is on a saved test's page too. Describe the change in words, such as “make it check blue instead” or “tighten every check in here”. Its changes land on the steps like the pencil's do, and are saved with the same Save changes button.

It changes checks only. Ask it to add, remove or reorder a step and it tells you which step to branch on.

Redo a test from a step

To add, remove or reorder steps, you perform the flow again from the point where it changes. This is called branching. The steps before that point are kept.

  1. On the test's Edit steps page, click the branch button on the last step you want to keep. That step and every step above it are kept. Branch from the very start, above the first step, keeps nothing.
  2. The kept steps replay in the recording browser, one at a time. Then the browser is yours at that point.
  3. Build the rest with the whole studio: recorded clicks, the tools and the Assistant. See Studio tools.
  4. The Original flow panel under the flow lists the steps the test used to have from that point on. Click to select one, shift-click for a range, and copy them across. Each copied step is run against the live page.
  5. Finish recording overwrites the test. Cancel recording leaves it exactly as it was.

Kept steps cannot be changed during the session. To change step 3, branch on step 2. To add to the end, branch on the last step.

From the terminal, --from is the number of steps to keep:

verifaied test edit "Settings/API tokens" --from 2

Rename or move a test

On the test's page, Edit details renames the test, moves it to another folder or changes its description. The file in your repository does not move: it stays where the recording wrote it.

Pre-steps

Most flows start signed in. Do not record the login again in every test. Record it once as its own test, then make it a pre-step of the others: a test that is replayed first.

  • Choose pre-steps under Replay first (optional) when you create a test, or later on its Edit steps page. Drag them in the flow to change their order.
  • Pre-steps replay before a recording starts, so their steps are not recorded again. They replay again before every run.
  • A pre-step's own pre-steps run before it. A test that several of them share runs once.
  • Only a saved test can be a pre-step, not a draft and not a suite test.
  • With a pre-step, a test needs no start path. It begins where the pre-step leaves the browser.

A pre-step is a reference, not a copy. Fix the login test once and every test that starts with it is fixed.

Inserted tests and stale links

A test can also run another test in the middle of its flow. You add one while recording, with Insert test. See Insert test.

An inserted test added with Keep linked follows the test it came from. When that test is re-recorded, the copy is out of date: its row says so and it counts in the Stale links tile. You do not have to fix it by hand. The next run of the test updates the copy in the file and tells you it did.

Edit the file by hand

A recorded test is a plain Playwright file under .verifaied/tests/. Edit it in your editor like any other. Two kinds of comment above the import tell verifAIed what it is:

// verifaied-test: Settings/API tokens/Create a token
// verifaied-pre: Auth/Log in
import { test, expect } from '@playwright/test';

test('Create a token', async ({ page }) => {
  await page.getByRole('link', { name: 'Settings' }).click();
  // ...
});
  • // verifaied-test: is the test's folder and name, once.
  • // verifaied-pre: is a pre-step, one line each, in the order they run.

After you add a file by hand, pull one somebody else wrote, or change a file's pre-steps, run:

verifaied test sync

It creates and updates the tests in verifAIed to match the files. It never deletes a test. A new file must be at the path its name gives, .verifaied/tests/<folder>/<name>.spec.ts. Add --dry-run to see what would change without sending anything.