feat: Make use of db:reset in all test suites (no-changelog) (#4739)

* 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
This commit is contained in:
Alex Grozav
2022-11-28 19:11:33 +02:00
committed by GitHub
parent aac207a947
commit 622118f983
11 changed files with 71 additions and 35 deletions

View File

@@ -11,10 +11,10 @@ module.exports = defineConfig({
experimentalSessionAndOrigin: true,
experimentalInteractiveRunEvents: true,
setupNodeEvents(on) {
setupNodeEvents(on, config) {
on('task', {
'db:reset': () => fetch(BASE_URL + '/e2e/db/reset', { method: 'POST' }),
'db:setup-owner': (payload) =>
'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),