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?
Asked
Active
Viewed 1,500 times
1

farm command
- 653
- 3
- 7
- 18
2 Answers
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.

Artūrs Alsbergs
- 46
- 2
-
I propose to add the actual command to run „npx codeceptjs def“ to your answer to improve it, just like to the docs as reference. – Paul Vincent Beigang May 05 '19 at 07:23
-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