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