Cypress error Cypress detected that the test has ended but there is still a pending command
A command started running but the test finished before it resolved, almost always caused by mixing native async/await with the Cypress command queue.
Why this happens
- Native `async`/`await` or raw Promises were mixed with `cy.` commands instead of chaining with `.then()`
- A command was fired outside the test's tracked chain (e.g. inside a detached callback)
How to fix it
- Never mix native async/await with Cypress commands; chain everything with `.then()` instead
- Make sure every `cy` command is part of the single chain Cypress is tracking for that test