cypress-terminal-report: Can't get this plugin to work in our project, maybe it's a typescript thing?

We are trying to improve our debugging experience with Cypress, by installing this plugin.

We are using typescript for our e2e tests - and we can’t get any outputs at all. I suppose the installation could be the culprit? Instead of modifying cypress/plugins/index.js we should just modify cypress/plugins/index.ts correct?

Or should the code itself also be altered, i.e. require('cypress-terminal-report/src/installLogsCollector')();?

Thanks for the help 😃

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

Makes sense now @archfz - thanks for the patience and an AWESOME library. Next step for me is to do something about the log outputs, since we use colored output like this:

cons:log (K): %ccreateForm-_qur8btwli,
              color: white; background-color: #291617; padding: 2px 6px; border-radius: 2px; font-size: 10px,
              name emitted value: P

How would you accomplish this - Read.me or html file? Alternatively I could also just use emojies, because then different log instances could still be visually seperated and it would work “out of the box” in both .txt and .json files 😃

Ofc it doesnt work, cause then you are not loading the support.js anywhere, which is loading the plugin on the browser side. Please be clear on what files cypress loads, that being one in browser one on node side and ofc the spec files. Cypress doesnt load 2 files separately for the browser, like support and commands. Please notice that the default cypress project init imports the commands file in the support js.

Checkout https://github.com/archfz/cypress-terminal-report-demo it’s now with typescript.