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

Attempt replicate. #2

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion cypress.json
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
{}
{
"projectId": "**",
"integrationFolder": "cypress/tests",
"testFiles": ["**/*.spec.ts"],
"nodeVersion": "system",
"env": {
"FAIL_FAST_STRATEGY": "spec"
}
}
18 changes: 11 additions & 7 deletions cypress/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,21 @@

// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

const installLogsPrinter = require('cypress-terminal-report/src/installLogsPrinter');

const path = require('path');
/**
* @type {Cypress.PluginConfig}
*/
module.exports = (on, config) => {
installLogsPrinter(on, {
printLogsToConsole: "always",
collectTestLogs: () => console.log('a'),
});
const options = {
outputRoot: config.projectRoot + '/cypress/logs/',
printLogsToFile: 'always',
specRoot: path.relative(config.fileServerFolder, config.integrationFolder),
outputTarget: {
'cypress-logs|json': 'json',
},
logToFilesOnAfterRun: true,
}
require('cypress-terminal-report/src/installLogsPrinter')(on, options)
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
}
4 changes: 3 additions & 1 deletion cypress/support/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

// Import commands.js using ES2015 syntax:
import './commands'
require('cypress-terminal-report/src/installLogsCollector')();
require('cypress-terminal-report/src/installLogsCollector')({
xhr: { printRequestData: true },
});
// Alternatively you can use CommonJS syntax:
// require('./commands')
166 changes: 87 additions & 79 deletions package-lock.json

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

Loading