Add a custom Playwright configuration
Add a named Playwright configuration (e.g. Mobile) and run features under it.
2
Last updated
Was this helpful?
Add a named Playwright configuration (e.g. Mobile) and run features under it.
Runs execute under a named configuration — Default unless told otherwise. Here's how to add a Mobile one.
module.exports = {
use: {
browserName: 'chromium',
viewport: { width: 390, height: 844 },
isMobile: true,
hasTouch: true,
},
};testvibe files put Configurations/Mobile.config.js --file ./mobile.config.jsThe file name is the config name: Configurations/Mobile.config.js → Mobile. (Writes outside Features/ or Configurations/ are rejected — see the allowlist.)
testvibe configs
testvibe run "Login Functionality" --config Mobile --waitOver REST that's POST …/features/12/run with {"config": "Mobile"} — see run_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.
Last updated
Was this helpful?
Was this helpful?
