Remove the deprecated plugins file

This commit is contained in:
Felipe Knorr Kuhn 2023-03-02 23:17:08 -08:00
parent 1ac8e5004f
commit 545b5be7d4
No known key found for this signature in database
GPG Key ID: 79619B52BB097C1A
2 changed files with 12 additions and 19 deletions

View File

@ -1,4 +1,4 @@
import { defineConfig } from 'cypress' import { defineConfig } from 'cypress';
export default defineConfig({ export default defineConfig({
projectId: 'ry4br7', projectId: 'ry4br7',
@ -12,12 +12,18 @@ export default defineConfig({
}, },
chromeWebSecurity: false, chromeWebSecurity: false,
e2e: { e2e: {
// We've imported your old cypress plugins here. setupNodeEvents(on: any, config: any) {
// You may want to clean this up later by importing these. const fs = require('fs');
setupNodeEvents(on, config) { const CONFIG_FILE = 'mempool-frontend-config.json';
return require('./cypress/plugins/index.js')(on, config) if (fs.existsSync(CONFIG_FILE)) {
let contents = JSON.parse(fs.readFileSync(CONFIG_FILE, 'utf8'));
config.env.BASE_MODULE = contents.BASE_MODULE ? contents.BASE_MODULE : 'mempool';
} else {
config.env.BASE_MODULE = 'mempool';
}
return config;
}, },
baseUrl: 'http://localhost:4200', baseUrl: 'http://localhost:4200',
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}', specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
}, },
}) });

View File

@ -1,13 +0,0 @@
const fs = require('fs');
const CONFIG_FILE = 'mempool-frontend-config.json';
module.exports = (on, config) => {
if (fs.existsSync(CONFIG_FILE)) {
let contents = JSON.parse(fs.readFileSync(CONFIG_FILE, 'utf8'));
config.env.BASE_MODULE = contents.BASE_MODULE ? contents.BASE_MODULE : 'mempool';
} else {
config.env.BASE_MODULE = 'mempool';
}
return config;
}