Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

97
Views
CucumberJS does not read objects passed as params to a function

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);

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!