Remove the deprecated plugins file
This commit is contained in:
parent
1ac8e5004f
commit
545b5be7d4
@ -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}',
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
|
@ -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;
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user