npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@svatah/yam-playwright-test

v0.2.0

Published

The bind() fixture for an existing Playwright Test project

Downloads

313

Readme

@svatah/yam-playwright-test

The Playwright Test host (LLD §9). Two things live here, and LLD §1 makes this the one package that may hold either: the bind() fixture for plain Playwright tests — the whole of module (a)'s adoption story — and, from Phase 2, the generated spec per flow that runs the executor inside Playwright Test.

It is the only package besides the CLI allowed to import an adapter-* package, and it imports exactly one: the Playwright adapter.

bind() in a plain Playwright test

One dependency, one import (REQ-PKG-2):

import { test, expect } from "@svatah/yam-playwright-test";

test("sign in", async ({ page, bind }) => {
  await page.goto("/login");
  await (await bind("login.username-field", "the username field")).fill("[email protected]");
  await (await bind("login.sign-in-button")).click();
  await expect(page).toHaveURL(/dashboard/);
});

bind(id, phrase?) returns a Playwright Locator, so everything you already do with a locator still works. A project with its own fixtures extends this test instead of @playwright/test's.

The ten-minute quick start, with the record and heal passes explained, is in examples/plain-playwright/README.md.

Modes (LLD §6.5)

| YAM_MODE | What happens | |---|---| | run (default) | The resolver reads the store and returns a Locator. No model, no network beyond the application. A failure names every candidate tried and writes .yam/bind-failures.jsonl. | | record | An id with no binding for the current context is grounded by a person clicking it, and synthesised with provenance.model: "human". | | heal | On a failure, relocalization runs inline, the resolution is retried once, and the test is annotated healed. The repair is staged to .yam/heal-proposals.jsonl, never applied. |

A healed run is healed, not passed (REQ-HEAL-4, ADR-6): a repair reaches the repository through a diff someone reads, so "green" keeps meaning that a deterministic replay passed.

Recording without a person

YAM_PICK (or the yamPicks fixture option) names the element for each id so record mode runs headless:

YAM_MODE=record YAM_PICK='{"login.username-field":"username"}' npx playwright test

A bare word is a test id; anything else is a CSS selector. This is a test affordance, not a feature. It exists so the record path can be exercised in CI, and it is how this repository proves that path works. Reaching for it in a real project means writing selectors again, which is the thing bindings are for not doing.

Licence

Apache-2.0.