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

223
Views
Estoy tratando de afirmar que el siguiente método es verdadero, pero me estoy volviendo indefinido

Básicamente, puedo obtener el texto de todos los botones, pero recibo el error que dice Indefinido al afirmar que es cierto. Por favor necesito ayuda, avíseme si necesita más información. Gracias

 async isNoticationsEnabled(type: string) { const notificationType = await this.getNotificationsTypeByText(type); const selectContainer = await notificationType.$$('.NotificationTypeSchedule__selectContainer'); const sms = selectContainer[1]; const mobilePush = selectContainer[2]; const webPush = selectContainer[3]; const enabled = []; enabled.push(sms, mobilePush, webPush) for (let i = 0; i < enabled.length; i++) { const elements = enabled[i]; if(await elements?.getText() === 'On') { return true; } } }

Producción:

 expect(received).toBe(expected) // Object.is equality Expected: true Received: undefined 42 | expect(await NotificationsTabs.isNotificationSectionDisplayed()).toBe(true) 43 | await NotificationsTabs.scrollTo('Note Mentions') > 44 | expect(await NotificationsTabs.isNoticationsEnabled('Note Mentions')).toBe(true); | ^ 45 | }); 46 | });
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!