zitadel/console/cypress.config.ts
2022-08-04 16:48:48 +02:00

45 lines
991 B
TypeScript

import { defineConfig } from 'cypress';
import { env } from 'process';
let tokensCache = new Map<string,string>()
let initmfaandpwrequired = true
export default defineConfig({
reporter: 'mochawesome',
reporterOptions: {
reportDir: 'cypress/results',
overwrite: false,
html: true,
json: true,
},
chromeWebSecurity: false,
trashAssetsBeforeRuns: false,
defaultCommandTimeout: 10000,
env: {
ORGANIZATION: process.env.CYPRESS_ORGANIZATION || 'zitadel'
},
e2e: {
baseUrl: process.env.CYPRESS_BASE_URL || 'http://localhost:8080',
experimentalSessionAndOrigin: true,
setupNodeEvents(on, config) {
require('cypress-terminal-report/src/installLogsPrinter')(on);
on('task', {
safetoken({key, token}) {
tokensCache.set(key,token);
return null
}
})
on('task', {
loadtoken({key}): string | null {
return tokensCache.get(key) || null;
}
})
},
},
});