Skip to content

Commit f1b3fac

Browse files
committed
test: adjust karma global state mock
Signed-off-by: Ferdinand Thiessen <[email protected]>
1 parent c3e66e2 commit f1b3fac

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

core/js/tests/specHelper.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ window._oc_appswebroots = {
8585
"files": window.webroot + '/apps/files/',
8686
"files_sharing": window.webroot + '/apps/files_sharing/'
8787
};
88+
89+
window.OC ??= {};
90+
8891
OC.config = {
8992
session_lifetime: 600 * 1000,
9093
session_keepalive: false,
@@ -111,6 +114,10 @@ window.Snap.prototype = {
111114

112115
window.isPhantom = /phantom/i.test(navigator.userAgent);
113116
document.documentElement.lang = navigator.language;
117+
const el = document.createElement('input');
118+
el.id = 'initial-state-core-config';
119+
el.value = btoa(JSON.stringify(window.OC.config))
120+
document.body.append(el);
114121

115122
// global setup for all tests
116123
(function setupTests() {

0 commit comments

Comments
 (0)