From e2cdfc01cdeb87e5af5f4bf618575b0817c07999 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Sat, 4 Apr 2026 14:34:50 +0200 Subject: [PATCH] Remove unnecessary console logs and update Playwright reporter configuration --- playwright.config.ts | 5 ++++- tests/e2e/web/specs/onboardingFlow.spec.ts | 17 ----------------- tests/e2e/web/specs/signIn.spec.ts | 16 ++-------------- tests/e2e/web/specs/signUp.spec.ts | 12 +++--------- 4 files changed, 9 insertions(+), 41 deletions(-) diff --git a/playwright.config.ts b/playwright.config.ts index 094ee5a4..ec94cf50 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -38,7 +38,10 @@ export default defineConfig({ // If there is a known intermittent browser timing issue for some tests, it's fine to give 1 retry to those flaky tests retries: process.env.CI ? 0 : 0, workers: process.env.CI ? 1 : undefined, - reporter: [['html', {outputFolder: `tests/reports/playwright-report`, open: 'on-failure'}]], + reporter: [ + ['list'], + ['html', {outputFolder: `tests/reports/playwright-report`, open: 'on-failure'}], + ], use: { baseURL: 'http://localhost:3000', trace: 'on-first-retry', diff --git a/tests/e2e/web/specs/onboardingFlow.spec.ts b/tests/e2e/web/specs/onboardingFlow.spec.ts index 20a4c16a..a433ee85 100644 --- a/tests/e2e/web/specs/onboardingFlow.spec.ts +++ b/tests/e2e/web/specs/onboardingFlow.spec.ts @@ -11,9 +11,6 @@ test.describe('when given valid input', () => { profilePage, onboardingAccount, }) => { - console.log( - `Starting "should successfully complete the onboarding flow with email" with ${onboardingAccount.username}`, - ) await registerWithEmail(homePage, authPage, onboardingAccount) await onboardingPage.clickContinueButton() //First continue await onboardingPage.clickContinueButton() //Second continue @@ -230,9 +227,6 @@ test.describe('when given valid input', () => { googleAccountOne, headless, }) => { - console.log( - `Starting "should successfully complete the onboarding flow with google account" with ${googleAccountOne.username}`, - ) test.skip(headless, 'Google popup auth test requires headed mode') await homePage.goToRegisterPage() await authPage.fillPasswordField('') //The test only passes when this is added...something is weird here @@ -261,9 +255,6 @@ test.describe('when given valid input', () => { profilePage, fakerAccount, }) => { - console.log( - `Starting "should successfully skip the onboarding flow" with ${fakerAccount.username}`, - ) await registerWithEmail(homePage, authPage, fakerAccount) await skipOnboardingHeadToProfile(onboardingPage, signUpPage, profilePage, fakerAccount) @@ -285,9 +276,6 @@ test.describe('when given valid input', () => { profilePage, fakerAccount, }) => { - console.log( - `Starting "should successfully enter optional information after completing flow" with ${fakerAccount.username}`, - ) await registerWithEmail(homePage, authPage, fakerAccount) await skipOnboardingHeadToProfile(onboardingPage, signUpPage, profilePage, fakerAccount) await profilePage.clickEditProfileButton() @@ -328,9 +316,6 @@ test.describe('when given valid input', () => { fakerAccount, onboardingAccount, }) => { - console.log( - `Starting "should successfully use the start answering option" with ${fakerAccount.username}`, - ) await registerWithEmail(homePage, authPage, fakerAccount) await onboardingPage.clickSkipOnboardingButton() await signUpPage.fillDisplayName(fakerAccount.display_name) @@ -365,7 +350,6 @@ test.describe('when given valid input', () => { profilePage, fakerAccount, }) => { - console.log(`Starting "the first time its an option" with ${fakerAccount.username}`) await registerWithEmail(homePage, authPage, fakerAccount) await onboardingPage.clickContinueButton() await onboardingPage.clickBackButton() @@ -397,7 +381,6 @@ test.describe('when given valid input', () => { profilePage, fakerAccount, }) => { - console.log(`Starting "the second time its an option" with ${fakerAccount.username}`) await registerWithEmail(homePage, authPage, fakerAccount) await onboardingPage.clickContinueButton() await onboardingPage.clickContinueButton() diff --git a/tests/e2e/web/specs/signIn.spec.ts b/tests/e2e/web/specs/signIn.spec.ts index 9261422c..a2755816 100644 --- a/tests/e2e/web/specs/signIn.spec.ts +++ b/tests/e2e/web/specs/signIn.spec.ts @@ -1,4 +1,4 @@ -import { userInformationFromDb } from '../../utils/databaseUtils' +import {userInformationFromDb} from '../../utils/databaseUtils' import {seedUser} from '../../utils/seedDatabase' import {expect, test} from '../fixtures/signInFixture' import {testAccounts} from '../utils/accountInformation' @@ -6,7 +6,7 @@ import { deleteProfileFromSettings, registerWithEmail, signinWithEmail, - skipOnboardingHeadToProfile + skipOnboardingHeadToProfile, } from '../utils/testCleanupHelpers' //Seed the account @@ -31,9 +31,6 @@ test.describe('when given valid input', () => { authPage, dev_one_account, }) => { - console.log( - `Starting "should be able to sign in to an available account" with ${dev_one_account.username}`, - ) await signinWithEmail(homePage, authPage, dev_one_account) await homePage.goToHomePage() await homePage.verifySignedInHomePage(dev_one_account.display_name) @@ -48,9 +45,6 @@ test.describe('when given valid input', () => { settingsPage, fakerAccount, }) => { - console.log( - `Starting "should successfully delete an account created via email and password" with ${fakerAccount.username}`, - ) await registerWithEmail(homePage, authPage, fakerAccount) await skipOnboardingHeadToProfile(onboardingPage, signUpPage, profilePage, fakerAccount) @@ -76,9 +70,6 @@ test.describe('when given valid input', () => { googleAccountTwo, headless, }) => { - console.log( - `Starting "should successfully delete an account created via google auth" with ${googleAccountTwo.username}`, - ) test.skip(headless, 'Google popup auth test requires headed mode') await homePage.goToRegisterPage() await authPage.fillPasswordField('') //The test only passes when this is added...something is weird here @@ -109,9 +100,6 @@ test.describe('when given invalid input', () => { dev_one_account, page, }) => { - console.log( - `Starting "should not be able to sign in to an available account" with ${dev_one_account.username}`, - ) await signinWithEmail(homePage, authPage, dev_one_account.email, 'ThisPassword') await expect( page.getByText('Failed to sign in with your email and password', {exact: true}), diff --git a/tests/e2e/web/specs/signUp.spec.ts b/tests/e2e/web/specs/signUp.spec.ts index aac82b12..65f2afbe 100644 --- a/tests/e2e/web/specs/signUp.spec.ts +++ b/tests/e2e/web/specs/signUp.spec.ts @@ -1,9 +1,9 @@ import {expect, test} from '../fixtures/base' import {registerWithEmail} from '../utils/testCleanupHelpers' -test.describe('when given valid input', () => { - test('placeholder', async () => {}) -}) +// test.describe('when given valid input', () => { +// test('placeholder', async () => {}) +// }) test.describe('when an error occurs', () => { test('should disable the button "Next" when the display name field is empty', async ({ @@ -13,9 +13,6 @@ test.describe('when an error occurs', () => { onboardingPage, signUpPage, }) => { - console.log( - `Starting "should disable the button "Next" when the display name field is empty" with ${specAccount.username}`, - ) await registerWithEmail(homePage, authPage, specAccount) await onboardingPage.clickSkipOnboardingButton() await signUpPage.fillDisplayName('') @@ -31,9 +28,6 @@ test.describe('when an error occurs', () => { onboardingPage, signUpPage, }) => { - console.log( - `Starting "should disable the button "Next" when the username field is empty" with ${specAccount.username}`, - ) await registerWithEmail(homePage, authPage, specAccount) await onboardingPage.clickSkipOnboardingButton() await signUpPage.fillDisplayName(specAccount.display_name)