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

@salesforcedevs/sfdocs-e2e

v1.0.13

Published

E2E test suite for SFDocs static portal pages (SSG)

Readme

@salesforcedevs/sfdocs-e2e

End-to-end test suite for SFDocs portal pages, built on WebdriverIO + Mocha. It runs headless Chrome tests against a live (or locally served) SFDocs portal and generates Allure reports with video recordings on failure.

This package is published independently from the rest of the monorepo. It is not released as part of the standard yarn release workflow — see Publishing below.


What it tests

Tests are organised into three suites, each targeting a different surface:

| Suite | Config file | Default base URL | Spec paths | | --------------- | ---------------------------- | ----------------------- | ----------------------------------------- | | static-portal | static-portal-wdio.conf.js | http://localhost:3000 | src/portal/specs/, src/shared/specs/ | | portal | portal-wdio.conf.js | http://localhost:3001 | src/portal/specs/, src/shared/specs/ | | search | search-wdio.conf.js | http://localhost:3000 | src/portal/specs/scope.search.*.test.ts |

Shared specs (src/shared/specs/) cover UI components that exist on both portal and content-repo pages:

  • Anchor headings, banners, breadcrumbs, callout content
  • Code blocks, doc phase badges, dev-center links
  • Error routes, guides, overview pages, page titles
  • Redoc references, references, videos

Portal specs (src/portal/specs/) cover portal-specific pages:

  • /docs landing page, /docs/apis landing page
  • Media mapper, scoped search (guides and references)

Content-repo specs (src/content-repo/specs/) cover the content-repository portal:

  • Homepage, guide and reference pages, component specifications
  • Nav header, tabset, media mapper, sitemap

Running tests locally

Prerequisites

  • Node.js and Yarn installed
  • Google Chrome installed (ChromeDriver version is auto-detected from your local Chrome installation)
  • A running SFDocs portal at the target base URL

The static-portal suite excludes the following tests that are not applicable to static builds:

  • docs.api.test.ts and docs.test.ts — landing pages that don't exist in static builds
  • Footer tests (should display footer) — footer component is not available in static builds

Run against the static portal (default)

# 1. Build and serve the static portal (from the monorepo root or example-portal package)
yarn build:static:portal
yarn start:static:portal   # serves on http://localhost:3000

# 2. Run the static-portal suite
yarn test:e2e:static:portal

Run against the live portal

# Portal must be running on http://localhost:3001
yarn test:e2e:portal

Run scope search tests

yarn test:scope-search

Override the base URL

Pass the E2E_BASE_URL environment variable to point tests at any environment:

E2E_BASE_URL=https://staging.example.com yarn test:e2e:static:portal

Using as a CLI in external projects

This package ships a sfdocs-e2e binary so consuming projects can run the suite without cloning this repo.

Install

npm install --save-dev @salesforcedevs/sfdocs-e2e
# or
yarn add --dev @salesforcedevs/sfdocs-e2e

Run

# Defaults: static-portal config, http://localhost:3000
npx sfdocs-e2e

# Custom base URL
npx sfdocs-e2e --baseUrl http://localhost:8080

# Choose a config suite
npx sfdocs-e2e --config portal
npx sfdocs-e2e --config static-portal
npx sfdocs-e2e --config static-dsc-portal
npx sfdocs-e2e --config search

# Help
npx sfdocs-e2e --help

Environment variables

| Variable | Description | | ----------------------- | --------------------------------------------------------------------------------- | | E2E_BASE_URL | Base URL of the site under test (overridden by --baseUrl) | | CHROME_DRIVER_VERSION | Pin a specific ChromeDriver version (auto-detected locally; set explicitly in CI) |


Test results and reports

Results are written to _results_/ inside the package directory:

_results_/
  static-portal/
    allure-raw/        # Allure XML + video attachments
    videos/            # MP4 recordings of failed tests
    wdio-*.log         # Browser driver logs

To generate and open an Allure HTML report:

npx allure generate _results_/static-portal/allure-raw -o _results_/static-portal/allure-report --clean
npx allure open _results_/static-portal/allure-report

Publishing

This package is excluded from the monorepo's standard release script (scripts/release_npm.sh) because it is an independent test utility with its own release cadence.

When to publish

Publish a new version when:

  • New test suites or specs are added
  • The CLI runner (bin/run-e2e.js) is updated
  • WebdriverIO or other test dependencies are upgraded
  • Config files are changed in a way that affects consumers

How to publish

Always validate with an alpha release first, then promote to stable.

The e2e package is marked "private": true so it is automatically skipped during the monorepo's standard yarn release workflow. Two convenience scripts handle temporarily removing the private flag, publishing, and restoring it:

| Script | Command | Description | | ------------------- | ---------------------------------- | ---------------------------------- | | release:alpha:e2e | yarn release:alpha:e2e <version> | Publish with the alpha dist-tag | | release:e2e | yarn release:e2e <version> | Publish with the latest dist-tag |

1. Publish an alpha (for testing)

cd packages/e2e
yarn release:alpha:e2e 1.0.0-alpha.0

The alpha dist-tag means yarn add @salesforcedevs/sfdocs-e2e will not resolve this version by default — consumers must opt in explicitly:

# Install latest alpha
yarn add --dev @salesforcedevs/sfdocs-e2e@alpha

# Or pin to a specific alpha version
yarn add --dev @salesforcedevs/[email protected]

Iterate on alphas as needed (1.0.0-alpha.1, 1.0.0-alpha.2, ...) until the release is validated.

2. Promote to stable

cd packages/e2e
yarn release:e2e 1.0.0

3. Future releases — bump and publish

cd packages/e2e

# Bug fix
yarn release:e2e 1.0.1

# New feature
yarn release:e2e 1.1.0

# Breaking change
yarn release:e2e 2.0.0