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

@webship-js/squarespace-steps

v2.0.0

Published

webship-js Cucumber/Playwright test project for Squarespace sites, using custom Squarespace step definitions and a self-contained demo site.

Readme

squarespace-steps

Test

A webship-js Cucumber/Playwright test project for Squarespace sites: navigation, hero sections, footers, contact forms, shop/product grids, and blog listings.

This repository contains:

  • Squarespace step definitions in tests/step-definitions/squarespace.steps.js, required alongside webship-js's own built-in steps.
  • A self-test harness: a self-contained demo Squarespace-style site (demo-site/) and a full set of .feature files (tests/features/) that exercise those steps in CI.

Why a demo site instead of a live Squarespace site?

Pointing tests at a real, live Squarespace site would make the suite flaky (content changes, deploys, network) and would require sharing site credentials. Instead, demo-site/ is a small static site built with representative Squarespace markup (.Header, .Footer, .ProductList, .BlogList, .form-wrapper, .sqs-add-to-cart-button, ...), so the step definitions and .feature files have a stable, versioned target.

The step selectors cover both Squarespace template generations: 7.0 (Brine family classes such as .Header-nav-item, .Footer, .Mobile-bar-menu, .ProductList-item, .BlogList-item) and 7.1 (.header-nav-item, #footer-sections, .header-burger-btn, .grid-item, .blog-item), plus the classes both share (.form-wrapper, .sqs-add-to-cart-button, .sqs-cart-quantity, .sqs-block-button-element). Squarespace is a hosted product with no login page a static fixture could provide, so the steps cover the public site only; nothing here needs an account.

To point this project at a real Squarespace site instead, set LAUNCH_URL to that site's URL when running npm test.

Setup

npm install
npx playwright install chromium

Running tests

npm run demo:serve &          # serves demo-site/ on http://localhost:8080
npm test                      # runs tests/features/**/*.feature against it

CI (.github/workflows/test.yml) runs the same flow on every push and pull request.

Step definitions

Squarespace-specific steps live in tests/step-definitions/squarespace.steps.js (navigation, hero, footer, forms, shop/cart, blog). They're loaded via the require list in cucumber.js alongside webship-js's built-in steps. To reuse them in another webship-js project, install @webship-js/squarespace-steps and add node_modules/@webship-js/squarespace-steps/tests/step-definitions/squarespace.steps.js to that project's require list.

| Step | Type | | --- | --- | | the (site\|main )navigation should( not) contain "<label>" | Then | | "<label>" should( not) be the current navigation item | Then | | I open the mobile (navigation )menu | When | | the mobile (navigation\|menu) toggle( button) should( not) be visible | Then | | the (desktop\|main\|site) navigation should( not) be visible | Then | | the hero title should( not) be "<title>" | Then | | the hero (call-to-action button\|CTA) should( not) link to "<href>" | Then | | the (site )footer should( not) be visible / I should( not) see the footer | Then | | the (site )footer should( not) show\|display a copyright( notice) | Then | | the footer navigation should( not) contain "<label>" | Then | | I fill in the (Squarespace )form field "<label>" with "<value>" | When | | I submit the (Squarespace )form | When | | the (Squarespace )form should( not) show the submitted confirmation( message) / I should( not) see the form submitted confirmation | Then | | the shop should list <n> product(s) | Then | | I add the product "<title>" to the cart | When | | the cart should contain <n> item(s) | Then | | the blog should list <n> post(s) | Then | | the blog post "<title>" should( not) be visible | Then |

The product word is optional ("the Squarespace form" and "the form" both match), so a feature written for another pack reads here too. Every Then step takes should or should not, every action takes I, we or no pronoun, and every failure is a friendly message with a hint (no assertion or Playwright stack). Each assertion polls its condition for the minWaitTime.page budget (at least 10 s) instead of reading the page once, and every click this pack performs settles the page before the next step.

Two things to know about the selectors: the hero title is the first level-one heading of the page content (.hero-title, main h1, #page h1, #siteWrapper h1), and the list ends in a bare h1, so on a page with no hero block the step compares against the page's first h1; and the reference features assert the demo site's own copy, counts and paths ("Ceramic Mug", /shop.html, ...), so swap those values for your site's content when you copy a feature.

Every step's regex and five Gherkin examples are in the JSDoc block above it; npm run test:examples checks that each example matches its own step (and no webship-js core step) and that every feature step is defined exactly once. CI runs it before the suite.

Contributing

All changes land via pull request against 2.0.x; see the issue tracker for open work.

License

MIT, see LICENSE.