test: Address flaky setup e2e (no-changelog) (#6085)

* test: Add /setup intercept for `skipSetup` command (no-changelog)

* Drop all tables for e2e reset, intercept account setup request

* Fix linting issues

* Allow to skip setup account request intercept and linting fixes

* Make sure variables are loaded

* Use PATCH for enabling of e2e features

* Do not exclude migration table from truncation

* Add user sign-up intercept
This commit is contained in:
OlegIvaniv
2023-05-03 14:06:06 +02:00
committed by GitHub
parent 700cc39cbc
commit e88232ede2
6 changed files with 65 additions and 35 deletions

View File

@@ -11,7 +11,7 @@ module.exports = defineConfig({
},
defaultCommandTimeout: 10000,
requestTimeout: 12000,
numTestsKeptInMemory: 0,
numTestsKeptInMemory: 2,
experimentalMemoryManagement: true,
e2e: {
baseUrl: BASE_URL,
@@ -35,8 +35,13 @@ module.exports = defineConfig({
return null
}
},
'enable-feature': (feature) =>
fetch(BASE_URL + `/e2e/enable-feature/${feature}`, { method: 'POST' }),
'set-feature': ({ feature, enabled }) => {
return fetch(BASE_URL + `/e2e/feature/${feature}`, {
method: 'PATCH',
body: JSON.stringify({ enabled }),
headers: { 'Content-Type': 'application/json' }
})
},
});
},
},