https://github.com/qavajs/cypress-runner-adapter
Adapter to launch qavajs project with cypress runner
https://github.com/qavajs/cypress-runner-adapter
qa test-automation testing
Last synced: 4 months ago
JSON representation
Adapter to launch qavajs project with cypress runner
- Host: GitHub
- URL: https://github.com/qavajs/cypress-runner-adapter
- Owner: qavajs
- License: mit
- Created: 2024-06-09T11:15:41.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2026-03-02T10:54:18.000Z (4 months ago)
- Last Synced: 2026-03-02T14:36:23.495Z (4 months ago)
- Topics: qa, test-automation, testing
- Language: JavaScript
- Homepage: https://qavajs.github.io
- Size: 519 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Support: supportCodeLibrary/build_parameter_type.js
Awesome Lists containing this project
README
# @qavajs/cypress-runner-adapter
Adapter to run cucumberjs tests via cypress test runner
## Installation
`npm install @qavajs/cypress-runner-adapter`
## Basic Configuration
```javascript
const { defineConfig } = require('cypress');
const cucumber = require('@qavajs/cypress-runner-adapter/adapter');
module.exports = defineConfig({
e2e: {
specPattern: 'cypress/feature/**/*.feature',
supportFile: 'cypress/support/e2e.js',
setupNodeEvents(on, config) {
on('file:preprocessor', cucumber)
},
},
});
```
`support/e2e.js` is entry point with step definition;
```javascript
import { When, setWorldConstructor } from '@qavajs/cypress-runner-adapter';
class World {
parameter = 42;
}
setWorldConstructor(World);
When('open {string} url', function (url) {
cy.visit(url);
});
```