Skip to content

Commit

Permalink
e2e: add cypress-terminal-report
Browse files Browse the repository at this point in the history
That we see something in the output of our e2e tests in the terminal.
This should help with debugging.
  • Loading branch information
BacLuc committed Mar 2, 2025
1 parent f6bb085 commit 4b41dcb
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
4 changes: 4 additions & 0 deletions e2e/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ module.exports = defineConfig({
deleteDownloads: () => deleteDownloads(config),
moveDownloads: (destSubDir) => moveDownloads(config, destSubDir),
})
const cypressTerminalReportOptions = {
printLogsToConsole: 'always',
}
require('cypress-terminal-report/src/installLogsPrinter')(on, cypressTerminalReportOptions)

Check failure on line 22 in e2e/cypress.config.js

View workflow job for this annotation

GitHub Actions / Lint: e2e (ESLint)

Replace `on,·cypressTerminalReportOptions` with `⏎········on,⏎········cypressTerminalReportOptions⏎······`
},
specPattern: 'specs/**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'support/index.js',
Expand Down
50 changes: 50 additions & 0 deletions e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@eslint/eslintrc": "3.3.0",
"@eslint/js": "9.21.0",
"cypress": "13.16.1",
"cypress-terminal-report": "7.1.0",
"eslint": "9.21.0",
"eslint-config-prettier": "10.0.2",
"eslint-plugin-cypress": "4.1.0",
Expand Down
5 changes: 5 additions & 0 deletions e2e/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@

// Import commands.js using ES2015 syntax:
import './commands'
import installLogsCollector from 'cypress-terminal-report/src/installLogsCollector'

installLogsCollector({
commandTimings: 'seconds',
})

// Alternatively you can use CommonJS syntax:
// require('./commands')

0 comments on commit 4b41dcb

Please # to comment.