Overview
django CMS 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/django-cms-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/django-cms-steps/tests/step-definitions/*.js',
'tests/step-definitions/**/*.js',
]
Steps
- Given I am a logged in user with the "admin" user
- Given I am not logged in
- When I log out
- 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/"
- Given I am on the django CMS page tree
- Then I should see the page tree
- Then I should see "Home" in the page tree
- Then I should see the django CMS welcome screen
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/django-cms-steps.