Overview
Vue 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/vue-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/vue-steps/tests/step-definitions/*.js',
'tests/step-definitions/**/*.js',
]
Steps
- Given the page is wired up
- Then the page should be wired up
- Then the page should have been drawn in the browser only
- When I wait for the page to be still
- When I use the "Posts" link
- When I return to the previous view
- Then the view should have changed in place
- Then the new view should be announced as "Posts"
- Then the "Posts" link should be marked current
- Then the view's address should be "/posts"
- When I wait for the view's data to arrive
- When I send the form with the "Send" button
- Then the form should have gone through
- Then the form should have been turned down with "Your message needs at least 10 characters."
- Then the form should have been sent in place
- Then the view should be the 404 error page
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/vue-steps.
Logo
The Vue logo is the Vue team's, designed by Evan You, from github.com/vuejs/art, under CC BY-NC-SA 4.0. It is not covered by this package's MIT licence.