From ede380a4e0c8491cfeb91f868a8a857d46a356c3 Mon Sep 17 00:00:00 2001 From: Okechi Jones-Williams Date: Mon, 11 May 2026 13:11:47 +0100 Subject: [PATCH] Updated People page --- tests/e2e/web/specs/onboardingFlow.spec.ts | 15 ++++-- tests/e2e/web/specs/signIn.spec.ts | 61 ++++++++++++++++++++++ 2 files changed, 73 insertions(+), 3 deletions(-) diff --git a/tests/e2e/web/specs/onboardingFlow.spec.ts b/tests/e2e/web/specs/onboardingFlow.spec.ts index 0466074c..97fba1fd 100644 --- a/tests/e2e/web/specs/onboardingFlow.spec.ts +++ b/tests/e2e/web/specs/onboardingFlow.spec.ts @@ -237,7 +237,10 @@ test.describe('when given valid input', () => { await expect(dbInfo.user.username).toContain(googleAccountOne.username) }) - test('should successfully skip the onboarding flow', async ({app, fakerAccount}) => { + test('should successfully skip the onboarding flow', async ({ + app, + fakerAccount + }) => { await app.registerWithEmail(fakerAccount) await app.skipOnboardingHeadToProfile(fakerAccount) @@ -317,7 +320,10 @@ test.describe('when given valid input', () => { }) test.describe('should successfully complete the onboarding flow after using the back button', () => { - test("the first time it's an option", async ({app, fakerAccount}) => { + test("the first time it's an option", async ({ + app, + fakerAccount + }) => { await app.registerWithEmail(fakerAccount) await app.onboarding.clickContinueButton() await app.onboarding.clickBackButton() @@ -341,7 +347,10 @@ test.describe('when given valid input', () => { await expect(dbInfo.user.username).toContain(fakerAccount.username) }) - test("the second time it's an option", async ({app, fakerAccount}) => { + test("the second time it's an option", async ({ + app, + fakerAccount + }) => { await app.registerWithEmail(fakerAccount) await app.onboarding.clickContinueButton() await app.onboarding.clickContinueButton() diff --git a/tests/e2e/web/specs/signIn.spec.ts b/tests/e2e/web/specs/signIn.spec.ts index a4d16533..fb2b779b 100644 --- a/tests/e2e/web/specs/signIn.spec.ts +++ b/tests/e2e/web/specs/signIn.spec.ts @@ -3,11 +3,72 @@ import {expect, test} from '../fixtures/signInFixture' test.describe('when given valid input', () => { test('should be able to sign in to an available account', async ({ app, +<<<<<<< HEAD signedOutAccount: account, }) => { await app.signinWithEmail(account) await app.home.goToHomePage() await app.home.verifySignedInHomePage(account.display_name) +======= + dev_one_account + }) => { + await app.signinWithEmail(dev_one_account) + await app.home.goToHomePage() + await app.home.verifySignedInHomePage(dev_one_account.display_name) + }) + + // test('Trial', async ({ + // app, + // dev_one_account + // }) => { + // await app.signinWithEmail(dev_one_account) + // await app.home.clickPeopleLink() + // }) + + test('should successfully delete an account created via email and password', async ({ + app, + signedOutAccount: account, + }) => { + await app.registerWithEmail(fakerAccount) + await app.skipOnboardingHeadToProfile(fakerAccount) + + //Verify displayed information is correct + await app.profile.verifyDisplayName(fakerAccount.display_name) + + //Verify database info + const dbInfo = await userInformationFromDb(fakerAccount) + + await expect(dbInfo.user.name).toContain(fakerAccount.display_name) + await expect(dbInfo.user.username).toContain(fakerAccount.username) + + await app.deleteProfileFromSettings() + }) + + test('should successfully delete an account created via google auth', async ({ + app, + googleAccountTwo, + headless, + }) => { + test.skip(headless, 'Google popup auth test requires headed mode') + await app.home.goToRegisterPage() + await app.auth.signInToGoogleAccount( + googleAccountTwo.email, + googleAccountTwo.display_name, + googleAccountTwo.username, + ) + await app.skipOnboardingHeadToProfile(googleAccountTwo) + + //Verify displayed information is correct + await app.profile.verifyDisplayName(googleAccountTwo.display_name) + + //Verify database info + const dbInfo = await userInformationFromDb(googleAccountTwo) + + await expect(dbInfo.user.name).toContain(googleAccountTwo.display_name) + await expect(dbInfo.user.username).toContain(googleAccountTwo.username) + + await app.deleteProfileFromSettings() +>>>>>>> 35402a77 (Updated People page) }) test('the profile count should update successfully when applying a filter', async ({