-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I log using waitUntil() to troubleshoot issues? #484
Comments
I can't look into it now, sorry. I'm also from mobile. Just a question: are you sure the |
I've realised I can run my task after an arbitrary wait outside of the waitUntil() to check what might be the issue, will try that tomorrow. |
Someone might've split expectedFileData on Aside from the PEBCAK issue, how would I have logged stuff out within my checkFunction? Thanks |
Friendly bump :) |
Sorry for the radio silence, I missed your previous comment 🤗 so the |
Hi,
I'm hoping you can help.
I have used waitUntil() successfully with practically the same block of code as below, but this always fails:
In the code that works, there's no
expectedRecordCount
and all I'm doing is:return databaseResponse.length == expectedFileData.length ? databaseResponse : false
I could delve into the context of what I'm doing here but essentially what I need to do is log out the result of the database call/the counts for each attempt to figure out why it's always failing.
Edit: the database query works in MySQL Workbench and gives me the expected number of records.
I have not been able to use
cy.log()
in my task's 'then' block due to this error ("cy.then() failed because you are mixing up async and sync code...") and console.log (inserted before thereturn
statement)......doesn't output anything.
I have so far not been able to correctly understand how I implement logging with your plugin to achieve this.
The text was updated successfully, but these errors were encountered: