From b21c5f5d823573253c560ef127cf4e1bbfdadb52 Mon Sep 17 00:00:00 2001
From: Patrizio Bekerle <patrizio@bekerle.com>
Date: Thu, 16 Feb 2023 13:52:59 +0100
Subject: [PATCH] Move setting of data-auth-set

---
 packages/auth/src/auth-keycloak.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/packages/auth/src/auth-keycloak.js b/packages/auth/src/auth-keycloak.js
index 1f339711..7a3f408b 100644
--- a/packages/auth/src/auth-keycloak.js
+++ b/packages/auth/src/auth-keycloak.js
@@ -171,14 +171,14 @@ export class AuthKeycloak extends AdapterLitElement {
             person: this._user,
         };
 
-        this.setAttribute("data-auth-set", "true");
-
         // inject a window.DBPAuth variable for Cypress/Playwright
         if (window.Cypress || window.playwright) {
             window.DBPAuth = auth;
             console.log("Cypress/Playwright detected");
         }
 
+        this.setAttribute("data-auth-set", "true");
+
         this.sendSetPropertyEvent('auth', auth);
     }
 
-- 
GitLab