aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-01-24 19:28:00 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2024-01-25 17:55:06 +0100
commit163d02e2a7eed591bfda554b22db7b006ef587e8 (patch)
tree31e487fe9856021dbcb5e8a8532d189077351161 /core
parent9fb7d5bca7a592de08d096ce07997987ff2d86a0 (diff)
downloadnextcloud-server-163d02e2a7eed591bfda554b22db7b006ef587e8.tar.gz
nextcloud-server-163d02e2a7eed591bfda554b22db7b006ef587e8.zip
fix(tests): Adjust legacy tests for nextcloud-router update
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'core')
-rw-r--r--core/js/tests/specHelper.js4
-rw-r--r--core/js/tests/specs/coreSpec.js12
-rw-r--r--core/js/tests/specs/l10nSpec.js4
3 files changed, 10 insertions, 10 deletions
diff --git a/core/js/tests/specHelper.js b/core/js/tests/specHelper.js
index 498eed757d6..d2afe2b67cf 100644
--- a/core/js/tests/specHelper.js
+++ b/core/js/tests/specHelper.js
@@ -95,8 +95,8 @@ window._oc_capabilities = {
}
// FIXME: OC.webroot is supposed to be only the path!!!
-OC.webroot = location.href + '/';
-OC.appswebroots = {
+window._oc_webroot = location.href + '/';
+window._oc_appswebroots = {
"files": window.webroot + '/apps/files/',
"files_sharing": window.webroot + '/apps/files_sharing/'
};
diff --git a/core/js/tests/specs/coreSpec.js b/core/js/tests/specs/coreSpec.js
index b7339ce7188..8b689fbcecf 100644
--- a/core/js/tests/specs/coreSpec.js
+++ b/core/js/tests/specs/coreSpec.js
@@ -42,16 +42,16 @@ describe('Core base tests', function() {
describe('Base values', function() {
it('Sets webroots', function() {
expect(OC.getRootPath()).toBeDefined();
- expect(OC.appswebroots).toBeDefined();
+ expect(window._oc_appswebroots).toBeDefined();
});
});
describe('filePath', function() {
beforeEach(function() {
- OC.webroot = 'http://localhost';
- OC.appswebroots.files = OC.getRootPath() + '/apps3/files';
+ window._oc_webroot = 'http://localhost';
+ window._oc_appswebroots.files = OC.getRootPath() + '/apps3/files';
});
afterEach(function() {
- delete OC.appswebroots.files;
+ delete window._oc_appswebroots.files;
});
it('Uses a direct link for css and images,' , function() {
@@ -70,11 +70,11 @@ describe('Core base tests', function() {
var TESTAPP_ROOT = OC.getRootPath() + '/appsx/testapp';
beforeEach(function() {
- OC.appswebroots[TESTAPP] = TESTAPP_ROOT;
+ window._oc_appswebroots[TESTAPP] = TESTAPP_ROOT;
});
afterEach(function() {
// restore original array
- delete OC.appswebroots[TESTAPP];
+ delete window._oc_appswebroots[TESTAPP];
});
it('Generates correct links for core apps', function() {
expect(OC.linkTo('core', 'somefile.php')).toEqual(OC.getRootPath() + '/core/somefile.php');
diff --git a/core/js/tests/specs/l10nSpec.js b/core/js/tests/specs/l10nSpec.js
index eaa9f5744c2..af01526c569 100644
--- a/core/js/tests/specs/l10nSpec.js
+++ b/core/js/tests/specs/l10nSpec.js
@@ -12,11 +12,11 @@ describe('OC.L10N tests', function() {
var TEST_APP = 'jsunittestapp';
beforeEach(function() {
- OC.appswebroots[TEST_APP] = OC.getRootPath() + '/apps3/jsunittestapp';
+ window._oc_appswebroots[TEST_APP] = OC.getRootPath() + '/apps3/jsunittestapp';
});
afterEach(function() {
OC.L10N._unregister(TEST_APP);
- delete OC.appswebroots[TEST_APP];
+ delete window._oc_appswebroots[TEST_APP];
});
describe('text translation', function() {