Search code examples
javascriptcucumbercypresscucumberjscypress-cucumber-preprocessor

Error: Step implementation missing for: [step_definition] with cypress & Cucumber when using Scenario outline with example


I have the following Cucumber BDD set up based on Cypress.io. The test runs fine when hard coding the value but failing when it is given in the "Scenario Outline with example' way. What am I missing?

Error:

enter image description here

Feature file:

enter image description here

Step Def:

enter image description here

Version:

Cypress 7.1.0: cypress-cucumber-preprocessor: "^4.0.3",


Solution

  • After trying all combinations, this (using regex) one worked.

    When(/^keying the vessel identifier ([^"]*) on the search box$/, searchTerm => {
        Search.doSearch(searchTerm)
    });