Locator Issue observed in step_file.js after codeceptjs version upgrade(3.0.2)

@davert
I am using Page Object model in codeceptjs automation, but after upgrading codeceptjs version to 3.0.2 i am unable to access locators defined in fields section of step_file.js. I am facing this issue only in step_file.js. However if i provide value of locator directly in method, scripts are getting executed properly.

Example:
If I use following code snippet in step_file.js then i get Cannot read property ‘type’ of undefined error in console

module.exports = function() {
return actor({
fields: {
logoutDropDown: “//button[@id=‘login’]”,
},

  login(username, password){
  this.amOnPage('/');
  this.seeElement(this.fields.loginButton);

},
});
}

But if I give value of locator directly in method like this.seeElement("//button[@id=‘login’]");
then script executes correctly.

Please let me know if there are any other configurations are needed or if this is issue in new version.

Thanks

oh, don’t you separate PO in different places than in steps_file?

Screenshot 2020-12-10 at 12.13.05

Yes we do have different files for other methods.

But as mentioned in this file template we are writing some general functions in step_file.js