Forum Discussion

kakabubu's avatar
kakabubu
Contributor
5 years ago
Solved

Test complete - JavaScript project - Script editor - Find usages doesn't find all references.

We have a JavaScript project.  Where references between files are done by "require" function.

//form_login file

function pressNext() {
//some actions here
}

module.exports.pressNext = pressNext;
//some other file in project
const form_login = require('form_login');

function exampleFunction() {
form_login.pressNext();
}


When I press "Find usages" on any function/variable in "form_login" file
Then this operation does not find this kind of reference.

 

So I have to use the "Find" operation. But this operation does not find references to this function in KeywordTests.
So every time I have to rename function/remove function/change arguments of the function, I have to search for references using both "Find usages" and "Find (Look in Project suite)".

 

It's really annoying. Because often I forget to choose "Look in Project suite", or forget to use "Find usages". That can cause tests to fail.