Was unable to find a step for “”: Mapping stepDefinitions to feature file in cucumber
- khyati sehgal
- Jun 18, 2020
- 1 min read
Was unable to find step for “Given open application as admin user”cucumberautocomplete
While working with cucumber, when steps are not mapped completely with the feature files, it usually gives this as a warning.
In this blog, I will share how can we map the step definition with the feature files.
How does the feature look like?

unimplemented_methods
But I already have a step defined for this, then why this error is coming?
These steps will help you in resolving this error.
Add Cucumber extension
In protractor configuration file, in require block add the path of step definitions like this:-
require: [
'./e2e/hooks/*.ts',
'./e2e/stepDefinition/*/*.ts',
],
hooks
No changes in hooks file
Settings.json
Check the settings.json

Settings.json
File –> Preference
Search for keyword- ‘js’
Click setting.json
Add the correct path of the steps, feature file here.
{
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"html.format.indentHandlebars": true,
"html.format.indentInnerHtml": true,
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": true,
"typescript.implementationsCodeLens.enabled": true,
javascript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": true,
"typescript.format.insertSpaceAfterConstructor": true,
"typescript.format.insertSpaceAfterTypeAssertion": true,
"typescript.updateImportsOnFileMove.enabled": "always",
"files.autoSave": "afterDelay",
"terminal.integrated.fontWeight": "800",
"terminal.integrated.scrollback": 10000,
"editor.wordWrapColumn": 300,
"html.format.wrapLineLength": 300,
"editor.wrappingIndent": "none",
"editor.formatOnPaste": true,
"html.format.endWithNewline": true,
"html.format.maxPreserveNewLines": 300,
"editor.wordWrap": "on",
"cucumberautocomplete.steps": [
"e2e/stepDefinition/*/*.ts"
],
"cucumberautocomplete.syncfeatures": "e2e/features/*/*.feature",
"cucumberautocomplete.strictGherkinCompletion": true,
"window.zoomLevel": 0,
"cucumberautocomplete.strictGherkinValidation": true,
"editor.renderWhitespace": "none",
"editor.renderControlCharacters": true,
"launch": {
},
"workbench.iconTheme": "vscode-icons"
}
And you are done

Comentarios