Skip to main content

Edit Test Content

You can edit test intent and, when needed, generated code from the selected feature detail view.

The feature detail Gherkin editor

Most changes should start in the Gherkin feature file. Regenerate Playwright code after the intent changes meaningfully.

Edit Gherkin Intent

Use the Gherkin editor when you want to change what the test should prove.

  1. Open the Test Suite.
  2. Select a feature.
  3. Open the editor for the feature file.
  4. Update the Feature, Background, Scenario, or steps.
  5. Save the file.
  6. Regenerate Playwright code if the behavior changed.

Saving writes the updated .feature file to your project.

Save Options

Depending on the screen, you may see options such as:

OptionUse it when
SaveYou want to keep editing or review before generating.
Save and closeYou are done editing the feature for now.
Save and generateYou want to save the current feature and immediately start generation.
Cancel or revertYou do not want to keep unsaved edits.

If you have unsaved changes, TestVibe may ask before switching away from the editor.

Edit Generated Code

Generated Playwright code is executable test code. Edit it only when you need a targeted adjustment that is easier to make in code than in Gherkin.

Good reasons to edit generated code:

ReasonExample
Small selector fixA generated locator needs a more stable role or label.
Extra wait or assertionThe app has a known delayed state that should be verified.
Project-specific helperYour project has a reusable test helper.

Prefer editing Gherkin and regenerating when the expected behavior changed.

Regenerate Or Edit Manually?

SituationBetter choice
The user journey changedEdit Gherkin, then regenerate.
The expected result changedEdit Gherkin, then regenerate.
A selector is slightly wrongEdit generated code or improve Gherkin with visible labels.
The generated code is broadly offImprove Gherkin and regenerate.
A helper should be reusedEdit generated code if your team owns that helper pattern.

After Editing

After saving changes:

  1. Generate or regenerate Playwright code if needed.
  2. Run one test first.
  3. Review screenshots, videos, traces, and failure details.
  4. Keep the Gherkin and code aligned.