zitadel/console/cypress.config.ts

45 lines
991 B
TypeScript
Raw Normal View History

2022-07-06 09:53:26 +02:00
import { defineConfig } from 'cypress';
2022-08-04 16:48:48 +02:00
import { env } from 'process';
2022-08-03 17:45:49 +02:00
let tokensCache = new Map<string,string>()
let initmfaandpwrequired = true
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,
2022-08-04 16:48:48 +02:00
env: {
ORGANIZATION: process.env.CYPRESS_ORGANIZATION || 'zitadel'
},
2022-07-06 09:53:26 +02:00
e2e: {
2022-08-04 16:48:48 +02:00
baseUrl: process.env.CYPRESS_BASE_URL || 'http://localhost:8080',
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);
2022-08-03 17:45:49 +02:00
on('task', {
safetoken({key, token}) {
tokensCache.set(key,token);
return null
}
})
on('task', {
loadtoken({key}): string | null {
return tokensCache.get(key) || null;
}
})
2022-07-06 09:53:26 +02:00
},
},
});