mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
622118f983
* feat: Make use of db:reset in all test suites * refactor: Rename task to no longer use db: prefix * feat: wrap cypress tasks into commands * refactor: rename resetDatabase to resetAll * fix: update test:e2e:all to use --headless
27 lines
660 B
JavaScript
27 lines
660 B
JavaScript
const fetch = require('node-fetch');
|
|
const { defineConfig } = require('cypress');
|
|
|
|
const BASE_URL = 'http://localhost:5678';
|
|
|
|
module.exports = defineConfig({
|
|
e2e: {
|
|
baseUrl: BASE_URL,
|
|
video: false,
|
|
screenshotOnRunFailure: true,
|
|
experimentalSessionAndOrigin: true,
|
|
experimentalInteractiveRunEvents: true,
|
|
|
|
setupNodeEvents(on, config) {
|
|
on('task', {
|
|
'reset': () => fetch(BASE_URL + '/e2e/db/reset', { method: 'POST' }),
|
|
'setup-owner': (payload) =>
|
|
fetch(BASE_URL + '/e2e/db/setup-owner', {
|
|
method: 'POST',
|
|
body: JSON.stringify(payload),
|
|
headers: { 'Content-Type': 'application/json' },
|
|
}),
|
|
});
|
|
},
|
|
},
|
|
});
|