
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
@testivai/witness-playwright
Advanced tools
Playwright adapter for TestivAI Witness — local-first visual regression with pixel + DOM comparison
Official Playwright adapter for TestivAI visual regression testing.
npm install -D @testivai/witness-playwright
Initialize your project
npx testivai init
# Select "Local Mode" when prompted
Add the reporter to your Playwright config
// playwright.config.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [
['line'],
['@testivai/witness-playwright/reporter', {
}]
],
});
Capture snapshots in your tests
import { test, expect } from '@playwright/test';
import { witness } from '@testivai/witness-playwright';
test('homepage visual', async ({ page }, testInfo) => {
await page.goto('https://example.com');
await witness(page, testInfo, 'homepage');
});
Run your tests
npx playwright test
View the report
Open visual-report/index.html in your browser.
Approve changes
npx testivai approve --all
No configuration needed — npx testivai init scaffolds .testivai/config.json,
the baselines directory, and the .gitignore entries. Everything runs locally.
witness(page, testInfo, name?, config?)Capture a visual snapshot of the current page.
import { witness } from '@testivai/witness-playwright';
// Basic usage
await witness(page, testInfo, 'my-snapshot');
// With per-snapshot overrides
await witness(page, testInfo, 'checkout-page', {
ignoreSelectors: ['.live-chat', '[data-testid=clock]'], // hidden for this capture
stabilize: false, // opt out of animation-freeze + font-wait for this snapshot
});
// Diff tolerances (maxDiffPercent, noiseAutoPass, ...) are project-level:
// set them in .testivai/config.json — see the repository README.
name: Visual Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm ci
- run: npx playwright install chromium
- run: npx playwright test
- uses: testivai/testivai-action@v1
if: always()
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
report-dir: visual-report
MIT
FAQs
Playwright adapter for TestivAI Witness — local-first visual regression with pixel + DOM comparison
We found that @testivai/witness-playwright demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.