import { createAccount } from "../specs/AccountUtils";
Below is the Object:
const fields = ["field1", "field2"];
const accountDetails = {
type: "School",
name: Utils.create_UUID("abc_"),
fieldValues: fields
};
And step definition which passes that object as param.
Given(/^should create an account$/,{timeout: 80 * 1000}, function () {
createAccount(accountDetails);
});
This createAccount function is not defined in a class but in a js file like below:
export function createAccount(accountDetails) {
return () => {
browser.retryIfFails(() => {
HomePage.goToPage("AccountsPage");
AccountsPage.newTracker(accountDetails);
});
};
}
this function createAccount(accountDetails); is not getting executed as param is out of context createAccount(accountDetails);