diff --git a/frontend/tests/functional/user-permissions.test.ts b/frontend/tests/functional/user-permissions.test.ts index 7293243c7..412cb716b 100644 --- a/frontend/tests/functional/user-permissions.test.ts +++ b/frontend/tests/functional/user-permissions.test.ts @@ -33,10 +33,6 @@ Object.entries(userGroups).forEach(([userGroup, userGroupData]) => { mailer, page }) => { - console.log("EXPECTED TEST EXECUTED"); - page.on('requestfailed', request => { - console.log(request.url() + ' ' + request.failure().errorText); - }); await usersPage.goto(); await usersPage.editItemButton(vars.user.email).click(); await usersPage.form.fill({ diff --git a/frontend/tests/utils/test-utils.ts b/frontend/tests/utils/test-utils.ts index 3474d8214..3021598d6 100644 --- a/frontend/tests/utils/test-utils.ts +++ b/frontend/tests/utils/test-utils.ts @@ -273,8 +273,14 @@ export const test = base.extend({ data: { ...testData }, - populateDatabase: async ({ pages, loginPage, sideBar, data }, use) => { + populateDatabase: async ({ pages, loginPage, sideBar, data, browser }, use) => { test.slow(); + + const context = await browser.newContext(); + context.on('requestfailed', request => { + console.log('[REQUEST_FAILED] ' + request.url() + ' ' + request.failure().errorText); + }); + const start = new Date(); await new Promise((resolve) => setTimeout(resolve, 3000)); const end = new Date(); @@ -290,6 +296,7 @@ export const test = base.extend({ 'dependency' in pageData ? pageData.dependency : null ); } + await context.close(); await sideBar.logout(); await use(); }