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

How to fix it

  1. Never mix native async/await with Cypress commands; chain everything with `.then()` instead
  2. Make sure every `cy` command is part of the single chain Cypress is tracking for that test