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/django-cms-steps

v2.0.0

Published

Custom webship-js step definitions for testing django CMS sites (admin login, the CMS toolbar, toolbar navigation, and the page tree).

Readme

django-cms-steps

Custom webship-js step definitions for testing django CMS sites: Django admin login/logout (as a user from the users registry), the CMS toolbar, toolbar navigation (including the sideframe overlay), the page tree, and the "no pages yet" welcome screen.

@webship-js/django-cms-steps is a plugin for webship-js — it does not replace it. It ships one file, tests/step-definitions/django-cms.steps.js, of extra Given/When/Then steps that you load alongside webship-js's own step library in your project's cucumber.js. There is no custom.js; every step this package provides lives in django-cms.steps.js.

Install

npm install --save-dev webship-js @webship-js/django-cms-steps

Both packages are devDependencies of your test project. webship-js is a peer dependency of @webship-js/django-cms-steps.

Quick start

Add this package's steps to your cucumber.js require array, next to webship-js's own:

// cucumber.js
module.exports = {
  default: {
    requireModule: ['ts-node/register'],
    require: [
      'node_modules/webship-js/tests/step-definitions/**/*.js',
      'node_modules/@webship-js/django-cms-steps/tests/step-definitions/*.steps.js',
      'tests/step-definitions/**/*.js', // your own project-specific steps, if any
    ],
    paths: ['tests/features/**/*.feature'],
    worldParameters: {
      launchUrl: process.env.LAUNCH_URL || 'http://localhost',
      // Accounts for "a logged in user with the "<key>" user". Keep the
      // password out of the repo: read it from an environment variable.
      users: {
        admin: {
          username: process.env.DJANGOCMS_ADMIN_USER || 'admin',
          password: process.env.DJANGOCMS_ADMIN_PASS || 'admin',
        },
      },
    },
  },
};

Then write a feature using the new steps:

Feature: CMS toolbar

  Scenario: Admin sees the CMS toolbar and opens the page tree
    Given I am a logged in user with the "admin" user
    Then I should see the CMS toolbar
    When I click "Pages" in the CMS toolbar menu
    Then the CMS sideframe should be showing "/admin/cms/pagecontent/"
npx cucumber-js --config cucumber.js

Steps

| Step | Type | | --- | --- | | I am a logged in user with the "<key>" user (reads worldParameters.users) | Given | | I am not logged in (clears cookies and storage, asserts the admin login form) | Given | | I log out | When | | I should( not) see the CMS toolbar | Then | | I click "<label>" in the CMS toolbar menu | When | | the CMS sideframe should( not) be showing "<url part>" | Then | | I am on the page tree | Given | | I should( not) see the page tree | Then | | I should( not) see "<title>" in the page tree | Then | | I should( not) see the welcome screen | Then |

The product word is optional in every sentence: "the CMS toolbar", "the django CMS toolbar" and "the toolbar" all match, so a feature written for another pack reads here too. Every Then step takes should or should not, every When/Then step takes I, we or no pronoun, and every failure is a friendly message with a hint (no Playwright stack). Assertions wait on their locator for the minWaitTime.page budget (at least 10 s) instead of reading the page once.

Every step's regex and five Gherkin examples are in the JSDoc block above it in tests/step-definitions/django-cms.steps.js; 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.

Testing this package itself

This repository also contains its own test suite (tests/features/) that exercises the steps in tests/step-definitions/django-cms.steps.js. It doesn't bundle a demo site — point it at any django CMS install you have via LAUNCH_URL. CI builds a throwaway django CMS site with ddev at run time to test against on every push/PR — see .github/workflows/test.yml.

License

MIT © Webship.co