mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-24 09:14:46 +01:00
5f242b2bed
* Solve ospath issue * try separate cypress cache * Separate install * ls * try * Try to put everything in same cache * Remove cypress plugin snapshot * fix cohorts and funnels
28 lines
873 B
JavaScript
28 lines
873 B
JavaScript
const webpackPreprocessor = require('@cypress/webpack-preprocessor')
|
|
|
|
const { createEntry } = require('../../webpack.config')
|
|
|
|
module.exports = (on, config) => {
|
|
const options = {
|
|
webpackOptions: createEntry('cypress'),
|
|
watchOptions: {},
|
|
}
|
|
|
|
on('file:preprocessor', webpackPreprocessor(options))
|
|
try {
|
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
require('cypress-terminal-report/src/installLogsPrinter')(on)
|
|
} catch (e) {}
|
|
|
|
on('before:browser:launch', (browser, launchOptions) => {
|
|
if (browser.name === 'chrome') {
|
|
// https://www.ghacks.net/2013/10/06/list-useful-google-chrome-command-line-switches/
|
|
// Compatibility with gh actions
|
|
launchOptions.args.push('--window-size=1280,720')
|
|
return launchOptions
|
|
}
|
|
})
|
|
|
|
return config
|
|
}
|