Having limited knowledge in TypeScript and Angular2, I've been attempting to run cucumber's features using steps written in TypeScript. However, when executing the steps.ts files, I encounter the following error message:
[launcher] Running 1 instances of WebDriver
[launcher] Error: TypeError: step.Given is not a function
at Object.module.exports (/Users/roalcantara/Documents/Tango/tango/test/features/step_definitions/signIn.steps.ts:13:8)
...
It appears that the cucumber definitions were not properly compiled.
Here are my relevant configurations:
My directory structure looks like this:
/test/
|-/features/
|-xpto.feature
|--/step_definitions
|---xpto.step.ts
/package.json
{
"name": "Tango",
"version": "0.0.1",
...
/typings.json
{
"dependencies": {},
...
/protractor.conf.js:
// @AngularClass
require('ts-node/register');
var helpers = require('./helpers');
...
One example of a step_definition file is:
/test/features/step_definitions/signUp.steps.ts
import cucumber = require('cucumber')
import {SignUpPage} from '../pages/signUp.page';
import {SignInPage} from '../pages/signIn.page';
...
Is there anything crucial that I might have overlooked?