aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/tests/specHelper.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/tests/specHelper.js')
-rw-r--r--core/js/tests/specHelper.js30
1 files changed, 11 insertions, 19 deletions
diff --git a/core/js/tests/specHelper.js b/core/js/tests/specHelper.js
index d2afe2b67cf..77958488df7 100644
--- a/core/js/tests/specHelper.js
+++ b/core/js/tests/specHelper.js
@@ -1,23 +1,8 @@
/**
-* ownCloud
-*
-* @author Vincent Petry
-* @copyright 2014 Vincent Petry <pvince81@owncloud.com>
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
+ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2014 ownCloud Inc.
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
/**
* Simulate the variables that are normally set by PHP code
@@ -100,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,
@@ -126,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() {