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 19:42:19 +0300
commit8210f849ba908cef954fb2ee4fa4440192e2d55b (patch)
tree9aa8ae7d6b816b466b05b3899917b788f9e39a5f /apps
parent4f3ea773703e8f7e28fa455bf8b0467a3c0869d3 (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 daaafbcd6c3..0d8f84cb7a8 100644
--- a/apps/files/src/files-app-settings.js
+++ b/apps/files/src/files-app-settings.js
@@ -37,6 +37,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 4a56e836ecd..769978c23ff 100644
--- a/apps/files/src/main-personal-settings.js
+++ b/apps/files/src/main-personal-settings.js
@@ -58,5 +58,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();
+ }
});