mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
ci: Refactor e2e tests to delete boilerplate code (no-changelog) (#6524)
This commit is contained in:
committed by
GitHub
parent
abe7f71627
commit
0e071724ee
@@ -1,10 +1,9 @@
|
||||
const fetch = require('node-fetch');
|
||||
const { defineConfig } = require('cypress');
|
||||
|
||||
const BASE_URL = 'http://localhost:5678';
|
||||
|
||||
module.exports = defineConfig({
|
||||
projectId: "5hbsdn",
|
||||
projectId: '5hbsdn',
|
||||
retries: {
|
||||
openMode: 0,
|
||||
runMode: 2,
|
||||
@@ -19,31 +18,5 @@ module.exports = defineConfig({
|
||||
screenshotOnRunFailure: true,
|
||||
experimentalInteractiveRunEvents: true,
|
||||
experimentalSessionAndOrigin: true,
|
||||
|
||||
setupNodeEvents(on, config) {
|
||||
on('task', {
|
||||
reset: () => fetch(BASE_URL + '/e2e/db/reset', { method: 'POST' }),
|
||||
'setup-owner': (payload) => {
|
||||
try {
|
||||
return fetch(BASE_URL + '/e2e/db/setup-owner', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(payload),
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
})
|
||||
} catch (error) {
|
||||
console.error("setup-owner failed with: ", error)
|
||||
return null
|
||||
}
|
||||
},
|
||||
'set-feature': ({ feature, enabled }) => {
|
||||
return fetch(BASE_URL + `/e2e/feature/${feature}`, {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify({ enabled }),
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user