fix: update babel and fix karma

Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
This commit is contained in:
skjnldsv 2025-03-06 12:52:59 +01:00
parent 2b740665ec
commit 48a643f8c1
6 changed files with 6695 additions and 6771 deletions

View file

@ -4,17 +4,17 @@ exports[`CalDavSettings interactions 1`] = `
<div>
<div
class="settings-section settings-section--limit-width"
data-v-0974f50a=""
data-v-6f6953b5=""
>
<h2
class="settings-section__name"
data-v-0974f50a=""
data-v-6f6953b5=""
>
Calendar server
<a
aria-label="External documentation for Calendar server"
class="settings-section__info"
data-v-0974f50a=""
data-v-6f6953b5=""
href="https://docs.nextcloud.com/server/23/go.php?to=user-sync-calendars"
rel="noreferrer nofollow"
target="_blank"
@ -23,7 +23,7 @@ exports[`CalDavSettings interactions 1`] = `
<span
aria-hidden="true"
class="material-design-icon help-circle-icon"
data-v-0974f50a=""
data-v-6f6953b5=""
role="img"
>
<svg
@ -45,7 +45,7 @@ exports[`CalDavSettings interactions 1`] = `
<!---->
<p
class="settings-hint"
data-v-0974f50a=""
data-v-6f6953b5=""
>
Also install the
<a
@ -66,38 +66,38 @@ exports[`CalDavSettings interactions 1`] = `
</p>
<p
data-v-0974f50a=""
data-v-6f6953b5=""
>
<span
class="checkbox-radio-switch checkbox-radio-switch-switch checkbox-radio-switch--checked"
data-v-00597cce=""
data-v-0974f50a=""
data-v-194d90ea=""
data-v-6f6953b5=""
style="--icon-size: 36px; --icon-height: 16px;"
>
<input
aria-labelledby="caldavSendInvitations-label"
class="checkbox-radio-switch__input"
data-v-00597cce=""
data-v-194d90ea=""
id="caldavSendInvitations"
type="checkbox"
value=""
/>
<span
class="checkbox-content checkbox-radio-switch__content checkbox-content-switch checkbox-content--has-text"
data-v-00597cce=""
data-v-e75842d8=""
data-v-194d90ea=""
data-v-38a6f3e5=""
id="caldavSendInvitations-label"
>
<span
aria-hidden="true"
class="checkbox-content__icon checkbox-content__icon--checked checkbox-radio-switch__icon"
data-v-e75842d8=""
data-v-38a6f3e5=""
inert="inert"
>
<span
aria-hidden="true"
class="material-design-icon toggle-switch-icon"
data-v-e75842d8=""
data-v-38a6f3e5=""
role="img"
>
<svg
@ -117,7 +117,7 @@ exports[`CalDavSettings interactions 1`] = `
</span>
<span
class="checkbox-content__text checkbox-radio-switch__text"
data-v-e75842d8=""
data-v-38a6f3e5=""
>
Send invitations to attendees
@ -127,7 +127,7 @@ exports[`CalDavSettings interactions 1`] = `
</span>
<em
data-v-0974f50a=""
data-v-6f6953b5=""
>
Please make sure to properly set up
<a
@ -140,38 +140,38 @@ exports[`CalDavSettings interactions 1`] = `
</p>
<p
data-v-0974f50a=""
data-v-6f6953b5=""
>
<span
class="checkbox-radio-switch checkbox checkbox-radio-switch-switch checkbox-radio-switch--checked"
data-v-00597cce=""
data-v-0974f50a=""
data-v-194d90ea=""
data-v-6f6953b5=""
style="--icon-size: 36px; --icon-height: 16px;"
>
<input
aria-labelledby="caldavGenerateBirthdayCalendar-label"
class="checkbox-radio-switch__input"
data-v-00597cce=""
data-v-194d90ea=""
id="caldavGenerateBirthdayCalendar"
type="checkbox"
value=""
/>
<span
class="checkbox-content checkbox-radio-switch__content checkbox-content-switch checkbox-content--has-text"
data-v-00597cce=""
data-v-e75842d8=""
data-v-194d90ea=""
data-v-38a6f3e5=""
id="caldavGenerateBirthdayCalendar-label"
>
<span
aria-hidden="true"
class="checkbox-content__icon checkbox-content__icon--checked checkbox-radio-switch__icon"
data-v-e75842d8=""
data-v-38a6f3e5=""
inert="inert"
>
<span
aria-hidden="true"
class="material-design-icon toggle-switch-icon"
data-v-e75842d8=""
data-v-38a6f3e5=""
role="img"
>
<svg
@ -191,7 +191,7 @@ exports[`CalDavSettings interactions 1`] = `
</span>
<span
class="checkbox-content__text checkbox-radio-switch__text"
data-v-e75842d8=""
data-v-38a6f3e5=""
>
Automatically generate a birthday calendar
@ -201,7 +201,7 @@ exports[`CalDavSettings interactions 1`] = `
</span>
<em
data-v-0974f50a=""
data-v-6f6953b5=""
>
Birthday calendars will be generated by a background job.
@ -209,11 +209,11 @@ exports[`CalDavSettings interactions 1`] = `
</em>
<br
data-v-0974f50a=""
data-v-6f6953b5=""
/>
<em
data-v-0974f50a=""
data-v-6f6953b5=""
>
Hence they will not be available immediately after enabling but will show up after some time.
@ -222,38 +222,38 @@ exports[`CalDavSettings interactions 1`] = `
</p>
<p
data-v-0974f50a=""
data-v-6f6953b5=""
>
<span
class="checkbox-radio-switch checkbox-radio-switch-switch checkbox-radio-switch--checked"
data-v-00597cce=""
data-v-0974f50a=""
data-v-194d90ea=""
data-v-6f6953b5=""
style="--icon-size: 36px; --icon-height: 16px;"
>
<input
aria-labelledby="caldavSendEventReminders-label"
class="checkbox-radio-switch__input"
data-v-00597cce=""
data-v-194d90ea=""
id="caldavSendEventReminders"
type="checkbox"
value=""
/>
<span
class="checkbox-content checkbox-radio-switch__content checkbox-content-switch checkbox-content--has-text"
data-v-00597cce=""
data-v-e75842d8=""
data-v-194d90ea=""
data-v-38a6f3e5=""
id="caldavSendEventReminders-label"
>
<span
aria-hidden="true"
class="checkbox-content__icon checkbox-content__icon--checked checkbox-radio-switch__icon"
data-v-e75842d8=""
data-v-38a6f3e5=""
inert="inert"
>
<span
aria-hidden="true"
class="material-design-icon toggle-switch-icon"
data-v-e75842d8=""
data-v-38a6f3e5=""
role="img"
>
<svg
@ -273,7 +273,7 @@ exports[`CalDavSettings interactions 1`] = `
</span>
<span
class="checkbox-content__text checkbox-radio-switch__text"
data-v-e75842d8=""
data-v-38a6f3e5=""
>
Send notifications for events
@ -283,7 +283,7 @@ exports[`CalDavSettings interactions 1`] = `
</span>
<em
data-v-0974f50a=""
data-v-6f6953b5=""
>
Please make sure to properly set up
<a
@ -295,11 +295,11 @@ exports[`CalDavSettings interactions 1`] = `
</em>
<br
data-v-0974f50a=""
data-v-6f6953b5=""
/>
<em
data-v-0974f50a=""
data-v-6f6953b5=""
>
Notifications are sent via background jobs, so these must occur often enough.
@ -309,38 +309,38 @@ exports[`CalDavSettings interactions 1`] = `
<p
class="indented"
data-v-0974f50a=""
data-v-6f6953b5=""
>
<span
class="checkbox-radio-switch checkbox-radio-switch-switch checkbox-radio-switch--checked"
data-v-00597cce=""
data-v-0974f50a=""
data-v-194d90ea=""
data-v-6f6953b5=""
style="--icon-size: 36px; --icon-height: 16px;"
>
<input
aria-labelledby="caldavSendEventRemindersToSharedGroupMembers-label"
class="checkbox-radio-switch__input"
data-v-00597cce=""
data-v-194d90ea=""
id="caldavSendEventRemindersToSharedGroupMembers"
type="checkbox"
value=""
/>
<span
class="checkbox-content checkbox-radio-switch__content checkbox-content-switch checkbox-content--has-text"
data-v-00597cce=""
data-v-e75842d8=""
data-v-194d90ea=""
data-v-38a6f3e5=""
id="caldavSendEventRemindersToSharedGroupMembers-label"
>
<span
aria-hidden="true"
class="checkbox-content__icon checkbox-content__icon--checked checkbox-radio-switch__icon"
data-v-e75842d8=""
data-v-38a6f3e5=""
inert="inert"
>
<span
aria-hidden="true"
class="material-design-icon toggle-switch-icon"
data-v-e75842d8=""
data-v-38a6f3e5=""
role="img"
>
<svg
@ -360,7 +360,7 @@ exports[`CalDavSettings interactions 1`] = `
</span>
<span
class="checkbox-content__text checkbox-radio-switch__text"
data-v-e75842d8=""
data-v-38a6f3e5=""
>
Send reminder notifications to calendar sharees as well
@ -370,7 +370,7 @@ exports[`CalDavSettings interactions 1`] = `
</span>
<em
data-v-0974f50a=""
data-v-6f6953b5=""
>
Reminders are always sent to organizers and attendees.
@ -380,38 +380,38 @@ exports[`CalDavSettings interactions 1`] = `
<p
class="indented"
data-v-0974f50a=""
data-v-6f6953b5=""
>
<span
class="checkbox-radio-switch checkbox-radio-switch-switch checkbox-radio-switch--checked"
data-v-00597cce=""
data-v-0974f50a=""
data-v-194d90ea=""
data-v-6f6953b5=""
style="--icon-size: 36px; --icon-height: 16px;"
>
<input
aria-labelledby="caldavSendEventRemindersPush-label"
class="checkbox-radio-switch__input"
data-v-00597cce=""
data-v-194d90ea=""
id="caldavSendEventRemindersPush"
type="checkbox"
value=""
/>
<span
class="checkbox-content checkbox-radio-switch__content checkbox-content-switch checkbox-content--has-text"
data-v-00597cce=""
data-v-e75842d8=""
data-v-194d90ea=""
data-v-38a6f3e5=""
id="caldavSendEventRemindersPush-label"
>
<span
aria-hidden="true"
class="checkbox-content__icon checkbox-content__icon--checked checkbox-radio-switch__icon"
data-v-e75842d8=""
data-v-38a6f3e5=""
inert="inert"
>
<span
aria-hidden="true"
class="material-design-icon toggle-switch-icon"
data-v-e75842d8=""
data-v-38a6f3e5=""
role="img"
>
<svg
@ -431,7 +431,7 @@ exports[`CalDavSettings interactions 1`] = `
</span>
<span
class="checkbox-content__text checkbox-radio-switch__text"
data-v-e75842d8=""
data-v-38a6f3e5=""
>
Enable notifications for events via push

View file

@ -2,6 +2,7 @@ module.exports = {
plugins: [
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-private-methods',
// We need the bundler entry not the web one
// Jest will otherwise resolve the wrong one
[

13327
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -45,7 +45,7 @@
"@nextcloud/browserslist-config": "^3.0.1",
"@nextcloud/calendar-availability-vue": "^2.2.6",
"@nextcloud/capabilities": "^1.2.0",
"@nextcloud/dialogs": "^5.3.8",
"@nextcloud/dialogs": "^6.1.1",
"@nextcloud/event-bus": "^3.3.1",
"@nextcloud/files": "^3.10.2",
"@nextcloud/initial-state": "^2.2.0",
@ -118,6 +118,8 @@
},
"devDependencies": {
"@babel/node": "^7.22.10",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-transform-private-methods": "^7.25.9",
"@babel/preset-typescript": "^7.23.2",
"@cypress/vue2": "^2.1.1",
"@cypress/webpack-preprocessor": "^6.0.2",

View file

@ -37,6 +37,9 @@ if (!process.env.CHROMIUM_BIN) {
process.env.CHROMIUM_BIN = require('puppeteer').executablePath()
}
const webpack = require('webpack');
const webpackEnvironmentPlugin = new webpack.EnvironmentPlugin({ NODE_ENV: 'production' });
/* jshint node: true */
module.exports = function(config) {
function findApps() {
@ -189,6 +192,8 @@ module.exports = function(config) {
served: true
});
files.unshift('tests/karma.setup.js');
console.log(files)
config.set({
@ -231,6 +236,10 @@ module.exports = function(config) {
outputFile: 'tests/autotest-results-js.xml'
},
webpack: {
plugins: [ webpackEnvironmentPlugin ]
},
// web server port
port: 9876,

9
tests/karma.setup.js Normal file
View file

@ -0,0 +1,9 @@
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
window.process = {
env: {
NODE_ENV: 'production'
}
};