bbPress Steps

Overview

bbPress Steps adds step definitions to Webship-js 2.0.x for the markup the platform itself renders, regardless of theme or distribution, so scenarios read as plain sentences instead of CSS selectors. It is a plugin for Webship-js: it ships one file of step definitions you drop into an existing test project, and it composes with the built-in steps rather than duplicating them.

Install

npm install --save-dev @webship-js/bbpress-steps

Then add its step file to cucumber.js beside the Webship-js steps:

require: [
  'node_modules/webship-js/tests/step-definitions/**/*.js',
  'node_modules/@webship-js/bbpress-steps/tests/step-definitions/*.js',
  'tests/step-definitions/**/*.js',
]

Test users

The steps that log in use accounts that already exist on the site, by the handle a feature names (Given I am a logged in user with the "admin" user). The site build creates them; a feature never creates or deletes an account. They are listed in cucumber.js under worldParameters. These are the test accounts of the pack's own test site: put the accounts of your site in your project, and keep real passwords in environment variables.

{
  "worldParameters": {
    "users": {
      "admin": {
        "username": "administrator",
        "password": "dD.123123ddd",
        "email": "administrator@example.com"
      },
      "keymaster": {
        "username": "keymaster",
        "password": "dD.123123ddd",
        "email": "keymaster@example.com"
      },
      "moderator": {
        "username": "moderator",
        "password": "dD.123123ddd",
        "email": "moderator@example.com"
      },
      "participant": {
        "username": "participant",
        "password": "dD.123123ddd",
        "email": "participant@example.com"
      },
      "spectator": {
        "username": "spectator",
        "password": "dD.123123ddd",
        "email": "spectator@example.com"
      },
      "blocked": {
        "username": "blocked",
        "password": "dD.123123ddd",
        "email": "blocked@example.com"
      }
    }
  }
}

Steps

This pack loads WordPress Steps itself, so every WordPress step is a step of a site with forums too. They are listed here after the pack's own steps: one place to look for a tester or a developer working on forums.

Every assertion step reads both polarities from one definition: should see and should not see are the same step. Source and issues: github.com/webship/bbpress-steps.