Skip to content

Commit fae8c21

Browse files
committed
e2e: add cypress-terminal-report
That we see something in the output of our e2e tests in the terminal. This should help with debugging.
1 parent 0cdc43b commit fae8c21

File tree

5 files changed

+65
-0
lines changed

5 files changed

+65
-0
lines changed

.github/workflows/reusable-e2e-tests-run.yml

+2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ jobs:
6868

6969
# pull cypress while container are starting up
7070
- run: docker compose pull e2e
71+
72+
- run: docker compose run --entrypoint="npm ci" --rm e2e
7173

7274
- run: sh -x wait-for-container-startup.sh
7375

e2e/cypress.config.js

+7
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ module.exports = defineConfig({
1616
deleteDownloads: () => deleteDownloads(config),
1717
moveDownloads: (destSubDir) => moveDownloads(config, destSubDir),
1818
})
19+
const cypressTerminalReportOptions = {
20+
printLogsToConsole: 'always',
21+
}
22+
require('cypress-terminal-report/src/installLogsPrinter')(
23+
on,
24+
cypressTerminalReportOptions
25+
)
1926
},
2027
specPattern: 'specs/**/*.cy.{js,jsx,ts,tsx}',
2128
supportFile: 'support/index.js',

e2e/package-lock.json

+50
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"@eslint/eslintrc": "3.3.0",
1818
"@eslint/js": "9.22.0",
1919
"cypress": "13.16.1",
20+
"cypress-terminal-report": "7.1.0",
2021
"eslint": "9.22.0",
2122
"eslint-config-prettier": "10.1.1",
2223
"eslint-plugin-cypress": "4.2.0",

e2e/support/index.js

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515

1616
// Import commands.js using ES2015 syntax:
1717
import './commands'
18+
import installLogsCollector from 'cypress-terminal-report/src/installLogsCollector'
19+
20+
installLogsCollector({
21+
commandTimings: 'seconds',
22+
})
1823

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

0 commit comments

Comments
 (0)