diff options
Diffstat (limited to 'cypress.config.ts')
-rw-r--r-- | cypress.config.ts | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/cypress.config.ts b/cypress.config.ts index 4f15c9a2a23..8aa4bd48b24 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -6,6 +6,7 @@ import { waitOnNextcloud, } from './cypress/dockerNode' import { defineConfig } from 'cypress' +import cypressSplit from 'cypress-split' import webpackPreprocessor from '@cypress/webpack-preprocessor' import type { Configuration } from 'webpack' @@ -47,6 +48,8 @@ export default defineConfig({ // We've imported your old cypress plugins here. // You may want to clean this up later by importing these. async setupNodeEvents(on, config) { + cypressSplit(on, config) + on('file:preprocessor', webpackPreprocessor({ webpackOptions: webpackConfig as Configuration })) // Disable spell checking to prevent rendering differences @@ -76,18 +79,16 @@ export default defineConfig({ // Before the browser launches // starting Nextcloud testing container - return startNextcloud(process.env.BRANCH) - .then((ip) => { - // Setting container's IP as base Url - config.baseUrl = `http://${ip}/index.php` - return ip - }) - .then(waitOnNextcloud) - .then(configureNextcloud) - .then(applyChangesToNextcloud) - .then(() => { - return config - }) + const ip = await startNextcloud(process.env.BRANCH) + + // Setting container's IP as base Url + config.baseUrl = `http://${ip}/index.php` + await waitOnNextcloud(ip) + await configureNextcloud() + await applyChangesToNextcloud() + + // IMPORTANT: return the config otherwise cypress-split will not work + return config }, }, |