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

230
Views
How to wrap e2e steps in function and run it from one tests?

I have more than 1000 lines of test steps in smoke test like this :

test("Smoke Test", async (t) => {
  console.log("Starting test");
// want to take out this in another class AuthStep.
  await AuthPage.setUserName("testtest@hotmail.com"); // AuthPage - page object model
  await AuthPage.setUserPassword("123456");
//end of AuthClass
  await t.expect(getUrl()).eql(authUrl);
  await t.expect(getUrl()).eql(loginUrl + "auth", { timeout: 100000 });
  await MainPage.setUserType(userName);
 ....
}

I just want to optimize this Smoke test and for example, move these steps into separate classes that will runs in the in Smoketest. How can I do it in TestCafe framework?

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!