Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-01-10 17:08:03 +0300
committerVincent Petry <vincent@nextcloud.com>2022-01-10 21:08:28 +0300
commit9b5c5d0cfef811dd024c4e2e9a490e176386895b (patch)
tree5439c76fca239373640187133c1dfe180ec5eaa5 /apps
parent9fb5d00145a92a2ad0d739fabaa9cbd00b48f62d (diff)
Fix JS tests after test lib updates
Prevent XHR during load by checking window.TESTING. Adjust some expected values. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/files/src/files-app-settings.js3
-rw-r--r--apps/files/src/main-personal-settings.js6
-rw-r--r--apps/systemtags/js/admin.js4
3 files changed, 10 insertions, 3 deletions
diff --git a/apps/files/src/files-app-settings.js b/apps/files/src/files-app-settings.js
index f5d50d8685b..56175a4dc41 100644
--- a/apps/files/src/files-app-settings.js
+++ b/apps/files/src/files-app-settings.js
@@ -36,6 +36,9 @@ Object.assign(window.OCA.Files, { Settings: new Settings() })
Object.assign(window.OCA.Files.Settings, { Setting })
window.addEventListener('DOMContentLoaded', function() {
+ if (window.TESTING) {
+ return
+ }
// Init Vue app
// eslint-disable-next-line
new Vue({
diff --git a/apps/files/src/main-personal-settings.js b/apps/files/src/main-personal-settings.js
index da5d91537ec..6bbbe715464 100644
--- a/apps/files/src/main-personal-settings.js
+++ b/apps/files/src/main-personal-settings.js
@@ -34,5 +34,7 @@ __webpack_public_path__ = generateFilePath('files', '', 'js/')
Vue.prototype.t = t
-const View = Vue.extend(PersonalSettings)
-new View().$mount('#files-personal-settings')
+if (!window.TESTING) {
+ const View = Vue.extend(PersonalSettings)
+ new View().$mount('#files-personal-settings')
+}
diff --git a/apps/systemtags/js/admin.js b/apps/systemtags/js/admin.js
index 22d17343228..2409cb488de 100644
--- a/apps/systemtags/js/admin.js
+++ b/apps/systemtags/js/admin.js
@@ -179,6 +179,8 @@
})();
window.addEventListener('DOMContentLoaded', function() {
- OCA.SystemTags.Admin.init();
+ if (!window.TESTING) {
+ OCA.SystemTags.Admin.init();
+ }
});