Add a custom Playwright configuration
Runs execute under a named configuration — Default unless told otherwise. Here's how to add a Mobile one.
Read the default as your reference
testvibe files get Configurations/Default.config.jsKeep the current template’s structure: it is an ESM
export default defineConfig({...})file whose object must be pure JSON. The runtime parses that object; JavaScript expressions and comments inside it are not supported.Write the new configuration
Save the full template response to
mobile.config.js, then changeNametoMobileand update these fields inside its JSON object. Keep the remaining template fields, including reporters, test paths, and runtime safeguards:{"Name": "Mobile","use": {"browserName": "chromium","viewport": { "width": 390, "height": 844 }}}This fragment shows the fields to edit; it is not the complete configuration file. It changes the viewport size; the current runner does not map
isMobileorhasTouchfrom these files. Do not setbaseURL: TestVibe supplies the target at run time.testvibe files put Configurations/Mobile.config.js --file ./mobile.config.jsThe file name is the config name:
Configurations/Mobile.config.js→Mobile. (Writes outsideFeatures/orConfigurations/are rejected — see the allowlist.)Verify and run
testvibe configstestvibe run "Login Functionality" --config Mobile --waitOver REST that's
POST …/features/12/runwith{"config": "Mobile"}— seerun_feature.
Configurations apply per run — the same generated tests execute under any config, so one feature can be green on desktop and red on mobile. That's the point.