Logs and screenshots
After installing the coverage plugin, the coverage is working great!
However, I constantly get this warning after each test:
[2855:0617/211145.460808:INFO:CONSOLE(68449)] "Cypress Warning: Cypress detected that you returned a promise in a test, but also invoked one or more cy commands inside of that promise.
The test title was:
> "after each" hook
While this works in practice, it's often indicative of an anti-pattern. You almost never need to return both a promise and also invoke cy commands.
Cy commands themselves are already promise like, and you can likely avoid the use of the separate Promise.
https://on.cypress.io/returning-promise-and-commands-in-test", source: http://localhost:4000/__cypress/runner/cypress_runner.js (68449)
[2855:0617/211145.472633:INFO:CONSOLE(68449)] "Cypress Warning: Cypress detected that you returned a promise in a test, but also invoked one or more cy commands inside of that promise.
The test title was:
> "after all" hook: collectBackendCoverage
While this works in practice, it's often indicative of an anti-pattern. You almost never need to return both a promise and also invoke cy commands.
Cy commands themselves are already promise like, and you can likely avoid the use of the separate Promise.
https://on.cypress.io/returning-promise-and-commands-in-test", source: http://localhost:4000/__cypress/runner/cypress_runner.js (68449)
[2855:0617/211145.484349:INFO:CONSOLE(68449)] "Cypress Warning: Cypress detected that you returned a promise in a test, but also invoked one or more cy commands inside of that promise.
The test title was:
> "after all" hook: generateReport
While this works in practice, it's often indicative of an anti-pattern. You almost never need to return both a promise and also invoke cy commands.
Cy commands themselves are already promise like, and you can likely avoid the use of the separate Promise.
https://on.cypress.io/returning-promise-and-commands-in-test", source: http://localhost:4000/__cypress/runner/cypress_runner.js (68449)
This happens both in Github actions but also locally:
Logs and screenshots After installing the coverage plugin, the coverage is working great! However, I constantly get this warning after each test:
This happens both in Github actions but also locally:
Versions
Describe the bug The after hooks should not mix cypress commands and promises
Link to the repo Sorry, this is a closed repository. I suspect it's easy to reproduce.