Example/Document Request: How to catch 'errorMsg' if cy.waitUntil() exceeds 'timeout'?

This issue has been tracked since 2022-01-06.

Using npm module cypress-wait-until, is there a way to catch errorMsg if cy.waitUntil() has completed all possible intervals and exceeded timeout? Thereby, providing a point of failure.

Example code waiting for an entry to be found in a log. Custom command cy.cmdLogVerify() returns an object if entry was found in log, otherwise if not found then returns null. If all attempts by cy.waitUntil() fail return object, then how to catch and isolate this failure?:

    cy.waitUntil(() => cy.cmdLogVerify().then($entryLog => cy.wrap($entryLog)), {
      errorMsg: 'ERROR: Not found in Logs',
      timeout: 20000, // waits up to 20000 ms, default to 5000
      interval: 2000, // performs the check every 2000 ms, default to 200
      verbose: true,
      customCheckMessage: 'CHECK: View Logs'
    }).then($entryLog => {
NoriSte wrote this answer on 2022-01-08

Hi @jeff00seattle
I intentionally don't don't expose anything similar, please take a look at #128 and feel free to re-open this issue if you wish to 😊

More Details About Repo
Owner Name NoriSte
Repo Name cypress-wait-until
Full Name NoriSte/cypress-wait-until
Language JavaScript
Created Date 2019-04-27
Updated Date 2023-03-19
Star Count 635
Watcher Count 8
Fork Count 24
Issue Count 3


Issue Title Created Date Updated Date