mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(cypress): Make sure cypress can preprocess files corrently (this drops 78 dependencies)
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
4c306a3a55
commit
ee18e43d97
4 changed files with 7539 additions and 6243 deletions
|
|
@ -6,8 +6,10 @@ import {
|
|||
waitOnNextcloud,
|
||||
} from './cypress/dockerNode'
|
||||
import { defineConfig } from 'cypress'
|
||||
import webpackPreprocessor from '@cypress/webpack-preprocessor'
|
||||
import type { Configuration } from 'webpack'
|
||||
|
||||
import browserify from '@cypress/browserify-preprocessor'
|
||||
import webpackConfig from './webpack.config.js'
|
||||
|
||||
export default defineConfig({
|
||||
projectId: '37xpdh',
|
||||
|
|
@ -45,8 +47,7 @@ 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) {
|
||||
// Fix browserslist extend https://github.com/cypress-io/cypress/issues/2983#issuecomment-570616682
|
||||
on('file:preprocessor', browserify({ typescript: require.resolve('typescript') }))
|
||||
on('file:preprocessor', webpackPreprocessor({ webpackOptions: webpackConfig as Configuration }))
|
||||
|
||||
// Disable spell checking to prevent rendering differences
|
||||
on('before:browser:launch', (browser, launchOptions) => {
|
||||
|
|
@ -113,7 +114,7 @@ export default defineConfig({
|
|||
},
|
||||
])
|
||||
|
||||
const config = require('@nextcloud/webpack-vue-config')
|
||||
const config = webpackConfig
|
||||
config.module.rules.push({
|
||||
test: /\.svg$/,
|
||||
type: 'asset/source',
|
||||
|
|
|
|||
|
|
@ -19,4 +19,4 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
import './commands'
|
||||
import './commands.ts'
|
||||
|
|
|
|||
13769
package-lock.json
generated
13769
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -120,8 +120,8 @@
|
|||
"devDependencies": {
|
||||
"@babel/node": "^7.20.7",
|
||||
"@babel/preset-typescript": "^7.22.5",
|
||||
"@cypress/browserify-preprocessor": "^3.0.2",
|
||||
"@cypress/vue2": "^2.0.1",
|
||||
"@cypress/webpack-preprocessor": "^5.17.1",
|
||||
"@jest/globals": "^29.5.0",
|
||||
"@nextcloud/babel-config": "^1.0.0",
|
||||
"@nextcloud/cypress": "^1.0.0-beta.2",
|
||||
|
|
|
|||
Loading…
Reference in a new issue