From ed717d3d2dcb05f30c5eee6222c0401f40750cbf Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 10 Jun 2025 15:17:13 +0200 Subject: [PATCH] test: adjust karma global state mock Signed-off-by: Ferdinand Thiessen --- core/js/tests/specHelper.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/js/tests/specHelper.js b/core/js/tests/specHelper.js index 8d121a2fb38..77958488df7 100644 --- a/core/js/tests/specHelper.js +++ b/core/js/tests/specHelper.js @@ -85,6 +85,9 @@ window._oc_appswebroots = { "files": window.webroot + '/apps/files/', "files_sharing": window.webroot + '/apps/files_sharing/' }; + +window.OC ??= {}; + OC.config = { session_lifetime: 600 * 1000, session_keepalive: false, @@ -111,6 +114,10 @@ window.Snap.prototype = { window.isPhantom = /phantom/i.test(navigator.userAgent); document.documentElement.lang = navigator.language; +const el = document.createElement('input'); +el.id = 'initial-state-core-config'; +el.value = btoa(JSON.stringify(window.OC.config)) +document.body.append(el); // global setup for all tests (function setupTests() {