Socket
Book a DemoInstallSign in
Socket

@buddy-works/playwright

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@buddy-works/playwright

Buddy Visual Test Playwright Plugin

0.1.0
latest
npmnpm
Version published
Weekly downloads
6
500%
Maintainers
3
Weekly downloads
 
Created
Source

Visual Test Playwright Plugin

A Playwright plugin for performing visual testing using Buddy Works Visual Testing. This plugin allows automatic capturing of website snapshots across different screen resolutions and comparing them with reference versions to detect visual regressions.

Installation

npm install @buddy-works/playwright

Usage

import { test as base } from "@playwright/test";
import withVisualTestPluginFixture from "@buddy-works/playwright";

const test = withVisualTestPluginFixture(base);

test("homepage visual test", async ({ page, visualTestPlugin }) => {
  await page.goto("https://example.com");

  await visualTestPlugin.takeSnap(page, "homepage", {
    devices: [{ viewport: { width: 1366, height: 768 } }],
    colorScheme: "DARK",
    cloneCookies: true,
  });
});

Examples

Example usage of the plugin can be found in the examples/ directory:

# Install dependencies
pnpm i
# Build plugin
pnpm run build
# Create link for plugin
pnpm link
# Go to examples folder
cd examples
# Link plugin
pnpm link @buddy-works/playwright
# Install examples dependencies
pnpm i
# Add enviroment variables with token
export BUDDY_VT_TOKEN=****
# Run an example
pnpm run test

License

MIT

Keywords

playwright

FAQs

Package last updated on 24 Mar 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.