mirror of
https://github.com/suitenumerique/drive.git
synced 2026-04-25 17:15:19 +02:00
🔧(e2e) improve e2e test debugging and db cleanup
Preserve django_site table during e2e db clearing to avoid breaking site configuration. Add video recording on first retry and screenshot capture on failure for easier debugging of flaky tests.
This commit is contained in:
committed by
Manuel Raynaud
parent
2d67ecc8f4
commit
d2ccd79e8c
@@ -1,7 +1,7 @@
|
||||
DO $$
|
||||
DECLARE r RECORD;
|
||||
BEGIN
|
||||
FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = 'public' AND tablename != 'django_migrations')
|
||||
FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = 'public' AND tablename != 'django_migrations' AND tablename != 'django_site')
|
||||
LOOP
|
||||
RAISE NOTICE 'Truncating table %', r.tablename;
|
||||
EXECUTE 'TRUNCATE TABLE ' || quote_ident(r.tablename) || ' CASCADE';
|
||||
|
||||
@@ -29,6 +29,8 @@ export default defineConfig({
|
||||
|
||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||
trace: "on-first-retry",
|
||||
video: 'on-first-retry',
|
||||
screenshot: 'only-on-failure',
|
||||
},
|
||||
|
||||
webServer: {
|
||||
|
||||
Reference in New Issue
Block a user