Files
nextcloud-tables/cypress.config.mjs
Enjeck C 94b4e46f16 fix: update cypress test configs
Signed-off-by: Enjeck C. <patrathewhiz@gmail.com>
2025-06-25 18:40:39 +01:00

53 lines
1.3 KiB
JavaScript

/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { defineConfig } from 'cypress'
import vitePreprocessor from 'cypress-vite'
import { nodePolyfills } from 'vite-plugin-node-polyfills'
import vue from '@vitejs/plugin-vue2'
export default defineConfig({
projectId: 'ixbf9n',
e2e: {
baseUrl: 'http://nextcloud.local/index.php/',
setupNodeEvents(on, config) {
on('file:preprocessor', vitePreprocessor({
plugins: [vue(), nodePolyfills()],
configFile: false,
}))
// Disable spell checking to prevent rendering differences
on('before:browser:launch', (browser, launchOptions) => {
if (browser.family === 'chromium' && browser.name !== 'electron') {
launchOptions.preferences.default['browser.enable_spellchecking'] = false
return launchOptions
}
if (browser.family === 'firefox') {
launchOptions.preferences['layout.spellcheckDefault'] = 0
return launchOptions
}
if (browser.name === 'electron') {
launchOptions.preferences.spellcheck = false
return launchOptions
}
})
return config
},
},
component: {
devServer: {
framework: 'vue',
bundler: 'vite',
},
viewportWidth: 800,
viewportHeight: 600,
},
})