Call previously defined step from another step within javascript file

Viewed 16

Is it possible to call defined steps within the definition of other steps?

import { Given } from "cypress-cucumber-preprocessor/steps";


Given('I send message {string} to {string}', (message, username) => {
  // be clever and send the message to user
}

Given('I send default message {string}', (username) => {
  // I would like to use the previous Given like i would in my .feature
  // Given I send message 'default message' to ${username}
}
0 Answers
Related