mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-11 18:44:22 +00:00
c54ddc71a2
Actions are extended to to local users. It's possible to run custom code during registration and authentication of local users.
46 lines
974 B
TypeScript
46 lines
974 B
TypeScript
import { defineConfig } from 'cypress';
|
|
|
|
let tokensCache = new Map<string,string>()
|
|
|
|
export default defineConfig({
|
|
reporter: 'mochawesome',
|
|
|
|
reporterOptions: {
|
|
reportDir: 'cypress/results',
|
|
overwrite: false,
|
|
html: true,
|
|
json: true,
|
|
},
|
|
|
|
trashAssetsBeforeRuns: false,
|
|
defaultCommandTimeout: 10000,
|
|
|
|
env: {
|
|
ORGANIZATION: process.env.CYPRESS_ORGANIZATION || 'zitadel',
|
|
BACKEND_URL: process.env.CYPRESS_BACKEND_URL || baseUrl().replace("/ui/console", "")
|
|
},
|
|
|
|
e2e: {
|
|
baseUrl: baseUrl(),
|
|
experimentalSessionAndOrigin: true,
|
|
setupNodeEvents(on, config) {
|
|
|
|
on('task', {
|
|
safetoken({key, token}) {
|
|
tokensCache.set(key,token);
|
|
return null
|
|
}
|
|
})
|
|
on('task', {
|
|
loadtoken({key}): string | null {
|
|
return tokensCache.get(key) || null;
|
|
}
|
|
})
|
|
},
|
|
},
|
|
});
|
|
|
|
function baseUrl(){
|
|
return process.env.CYPRESS_BASE_URL || 'http://localhost:8080/ui/console'
|
|
}
|