zitadel/console/cypress.config.ts

33 lines
815 B
TypeScript
Raw Normal View History

2022-07-06 09:53:26 +02:00
import { defineConfig } from 'cypress';
2022-07-09 11:11:25 +02:00
import { readFileSync } from 'fs';
2022-07-06 09:53:26 +02:00
export default defineConfig({
reporter: 'mochawesome',
reporterOptions: {
reportDir: 'cypress/results',
overwrite: false,
html: true,
json: true,
},
chromeWebSecurity: false,
trashAssetsBeforeRuns: false,
defaultCommandTimeout: 10000,
e2e: {
2022-07-09 11:11:25 +02:00
experimentalSessionAndOrigin: true,
2022-07-06 09:53:26 +02:00
setupNodeEvents(on, config) {
2022-07-09 11:11:25 +02:00
require('cypress-terminal-report/src/installLogsPrinter')(on);
config.defaultCommandTimeout = 10_000
config.env.parsedServiceAccountKey = config.env.serviceAccountKey
if (config.env.serviceAccountKeyPath) {
config.env.parsedServiceAccountKey = JSON.parse(readFileSync(config.env.serviceAccountKeyPath, 'utf-8'))
}
return config
2022-07-06 09:53:26 +02:00
},
},
});