Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration with cypress-mochawesome-reporter #233

Closed
vaclavGabriel opened this issue Jan 23, 2024 · 1 comment
Closed

Integration with cypress-mochawesome-reporter #233

vaclavGabriel opened this issue Jan 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@vaclavGabriel
Copy link

Hello,
May I ask for clarification on the integration with cypress-mochawesome-reporter?

According to the documentation, I've set up the integration in the e2e.ts file:

import 'cypress-terminal-report/src/installLogsCollector'

afterEach(() => {
	cy.wait(50, { log: false }).then(() =>
		cy.addTestContext(Cypress.TerminalReport.getLogs('txt'))
	)
})

However, I'm getting this TS error: Property 'TerminalReport' does not exist on type 'Cypress & CyEventEmitter'
Can you advise how to fix it, please?

package.json:

"cypress-terminal-report": "^5.3.11",
"cypress-mochawesome-reporter": "^3.8.0",
"cypress": "12.17.3",

tsconfig.json:

	"compilerOptions": {
		"types": [
			"node",
			"cypress",
			"@testing-library/cypress",
			"cypress-terminal-report",
			"cypress-mochawesome-reporter"
		],
		"esModuleInterop": true,
@archfz archfz added the bug Something isn't working label Jan 24, 2024
@archfz
Copy link
Owner

archfz commented Jan 24, 2024

Fix released in 5.3.12

Also added example integration in demo.

cc @bvandercar-vt Not sure why the change I made fixes it and why it was not working with your change.

@archfz archfz closed this as completed Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants