Cypress Custom Command does not run in test-body #25338
Unanswered
Shaegi
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to write a plugin which compares DOM-Snapshots. To do so I'm writing the element into a file in reading it on the next run.
The functionallity is working fine, however the custom-command does not execute in the test-body, but fails/succeeds in the 'after-all'-Hook.
After crawling through github/stackoverflow issues, I couldn't find a solution for my problem.
The plugin code is the following:
The test code is the fowlloing:
In the runner im getting this output:

if I have multiple tests with my custom command, only the last will be executed.
I tried to have a custom cy.wait with alias but it didn't help.
I hope you can help me! Thanks!
Beta Was this translation helpful? Give feedback.
All reactions