@zosmaai/zosma-qa-playwright
v0.0.8
Published
Playwright runner and base config for zosma-qa
Readme
@zosmaai/zosma-qa-playwright
Playwright runner and base config for zosma-qa — the zero-config QA platform.
This package exports a defineConfig() function that wraps Playwright's config with production-ready defaults, so you get retries, traces, screenshots, video, and HTML reports without writing any boilerplate.
Installation
npm install -D @zosmaai/zosma-qa-playwright @playwright/test
npx playwright installUsage
// playwright.config.ts
import { defineConfig } from '@zosmaai/zosma-qa-playwright';
export default defineConfig({
use: {
baseURL: 'https://www.myapp.com',
},
browsers: ['chromium', 'firefox', 'webkit'],
});That's it. The following defaults are applied automatically:
| Setting | CI | Local |
|---|---|---|
| fullyParallel | true | true |
| retries | 2 | 0 |
| workers | 1 | auto |
| reporter | html + github + list | html + list |
| trace | on-first-retry | on-first-retry |
| screenshot | only-on-failure | only-on-failure |
| video | retain-on-failure | retain-on-failure |
Browser shorthand
The browsers option maps to Playwright's devices presets:
browsers: ['chromium'] // Desktop Chrome
browsers: ['chromium', 'firefox', 'webkit'] // full cross-browserAll Playwright options still work
defineConfig() returns a standard PlaywrightTestConfig — you can override anything:
export default defineConfig({
use: { baseURL: 'https://staging.myapp.com' },
browsers: ['chromium'],
webServer: {
command: 'npm run dev',
url: 'http://localhost:3000',
reuseExistingServer: !process.env.CI,
},
testDir: './e2e',
});Part of zosma-qa
@zosmaai/zosma-qa-core— shared types and plugin interface@zosmaai/zosma-qa-playwright— this package@zosmaai/zosma-qa-appium— Appium mobile testing runner@zosmaai/zosma-qa-cli— interactive CLI (npx zosma-qa)
Full documentation: github.com/zosmaai/zosma-qa
License
Apache-2.0
