diff --git a/packages/auth/src/auth-keycloak.js b/packages/auth/src/auth-keycloak.js index cb8cedf9f119b3ec5315672dd2caf683357c8496..fd4ddfea5622ddd4a732a5ba60bdd5f491626ba6 100644 --- a/packages/auth/src/auth-keycloak.js +++ b/packages/auth/src/auth-keycloak.js @@ -112,13 +112,20 @@ export class AuthKeycloak extends AdapterLitElement { } sendSetPropertyEvents() { - this.sendSetPropertyEvent('auth', { + const auth = { 'subject': this.subject, 'token': this.token, 'user-full-name': this.name, 'person-id': this.personId, 'person': this.person, - }); + }; + + // inject a window.DBPAuth variable for cypress + if (window.Cypress) { + window.DBPAuth = auth; + } + + this.sendSetPropertyEvent('auth', auth); // this.sendSetPropertyEvent('auth-subject', this.subject); // this.sendSetPropertyEvent('auth-token', this.token);