From 62f4e402ac245d415c4aa60d3ac1e5573cd8cd13 Mon Sep 17 00:00:00 2001 From: Wes Date: Fri, 17 Jul 2026 18:00:07 -0600 Subject: [PATCH] Fix community profile onboarding back navigation Remove the post-connect Back action that discarded the resumable community onboarding transaction and exposed the legacy identity flow. Model the connected community in the regression test and assert the transaction remains. Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co> Signed-off-by: Wes --- .../onboarding/ui/CommunityOnboardingFlow.tsx | 10 ---------- desktop/tests/e2e/onboarding.spec.ts | 13 ++++--------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/desktop/src/features/onboarding/ui/CommunityOnboardingFlow.tsx b/desktop/src/features/onboarding/ui/CommunityOnboardingFlow.tsx index 7b1aa17ded9..ca1726cbaf6 100644 --- a/desktop/src/features/onboarding/ui/CommunityOnboardingFlow.tsx +++ b/desktop/src/features/onboarding/ui/CommunityOnboardingFlow.tsx @@ -334,16 +334,6 @@ export function CommunityOnboardingFlow({ > Next - ) diff --git a/desktop/tests/e2e/onboarding.spec.ts b/desktop/tests/e2e/onboarding.spec.ts index 9a82b2fecad..2af751beeb0 100644 --- a/desktop/tests/e2e/onboarding.spec.ts +++ b/desktop/tests/e2e/onboarding.spec.ts @@ -767,7 +767,7 @@ test("first-community shows the scenario cards for localhost", async ({ ).toBeVisible(); }); -test("first-community profile step uses onboarding Next and Back controls", async ({ +test("connected first-community profile step cannot discard resumable onboarding", async ({ page, }) => { await seedActiveIdentity(page, BLANK_TYLER_IDENTITY); @@ -786,6 +786,7 @@ test("first-community profile step uses onboarding Next and Back controls", asyn stage: "profile", relayUrl: "wss://default.example.com", communityName: "Default", + communityId: "e2e-default-community", createdAt: timestamp, updatedAt: timestamp, }), @@ -799,7 +800,6 @@ test("first-community profile step uses onboarding Next and Back controls", asyn await installMockBridge(page, undefined, { relayWsUrl: "wss://default.example.com", skipOnboardingSeed: true, - skipCommunitySeed: true, }); await page.goto("/"); @@ -858,12 +858,7 @@ test("first-community profile step uses onboarding Next and Back controls", asyn ).toBe(true); await expect(page.getByTestId("community-profile-next")).toHaveText("Next"); await expect(page.getByTestId("community-profile-next")).toBeDisabled(); - await expect(page.getByTestId("community-profile-back")).toHaveText("Back"); - - await page.getByTestId("community-profile-back").click(); - await expect( - page.getByRole("button", { name: "Add me to a community" }), - ).toBeVisible(); + await expect(page.getByTestId("community-profile-back")).toHaveCount(0); await expect .poll(() => page.evaluate( @@ -871,7 +866,7 @@ test("first-community profile step uses onboarding Next and Back controls", asyn COMMUNITY_ONBOARDING_TRANSACTION_STORAGE_KEY, ), ) - .toBeNull(); + .not.toBeNull(); }); test("identity fallback text does not count as a real onboarding name", async ({