1

I am very new to Codeceptjs. I'm using Visual Studio Code to write some sample tests. It will really help me if I could have something like an auto-complete for the methods so when I typed for instance I.see it shows me the options that I have, for instance, seeInCurrentUrl. Tried but couldn't find any plugins for VSC do you know any? or any other ways to do that?

farm command
  • 653
  • 3
  • 7
  • 18

2 Answers2

2

Check the docs. You can add the definitions by doing https://codecept.io/commands#typescript-definitions

You run

npx codeceptjs def

to install the auto-complete definitions and then add

/// <reference path="./steps.d.ts" />

at the top of each file. Hope that helps.

-1

In steps_file.ts, try to change the following line:

// module.exports = function() {
export = function() {
    return actor({
        // Define custom steps here, use 'this' to access default methods of I.
        // It is recommended to place a general 'login' function here.
    })
}
pascal918
  • 369
  • 3
  • 5