Skip to content

Commit 385dde1

Browse files
wesbillmanPinky
andauthored
Fix community profile onboarding back navigation (#2058)
Signed-off-by: Wes <[email protected]> Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co>
1 parent 9f82850 commit 385dde1

2 files changed

Lines changed: 4 additions & 19 deletions

File tree

‎desktop/src/features/onboarding/ui/CommunityOnboardingFlow.tsx‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -334,16 +334,6 @@ export function CommunityOnboardingFlow({
334334
>
335335
Next
336336
</Button>
337-
<Button
338-
className="h-9 rounded-full bg-foreground/10 px-6 hover:bg-foreground/15"
339-
data-testid="community-profile-back"
340-
disabled={isPending || isUploadingAvatar}
341-
onClick={clear}
342-
type="button"
343-
variant="ghost"
344-
>
345-
Back
346-
</Button>
347337
</OnboardingFooter>
348338
</>
349339
)

‎desktop/tests/e2e/onboarding.spec.ts‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ test("first-community shows the scenario cards for localhost", async ({
767767
).toBeVisible();
768768
});
769769

770-
test("first-community profile step uses onboarding Next and Back controls", async ({
770+
test("connected first-community profile step cannot discard resumable onboarding", async ({
771771
page,
772772
}) => {
773773
await seedActiveIdentity(page, BLANK_TYLER_IDENTITY);
@@ -786,6 +786,7 @@ test("first-community profile step uses onboarding Next and Back controls", asyn
786786
stage: "profile",
787787
relayUrl: "wss://default.example.com",
788788
communityName: "Default",
789+
communityId: "e2e-default-community",
789790
createdAt: timestamp,
790791
updatedAt: timestamp,
791792
}),
@@ -799,7 +800,6 @@ test("first-community profile step uses onboarding Next and Back controls", asyn
799800
await installMockBridge(page, undefined, {
800801
relayWsUrl: "wss://default.example.com",
801802
skipOnboardingSeed: true,
802-
skipCommunitySeed: true,
803803
});
804804
await page.goto("/");
805805

@@ -858,20 +858,15 @@ test("first-community profile step uses onboarding Next and Back controls", asyn
858858
).toBe(true);
859859
await expect(page.getByTestId("community-profile-next")).toHaveText("Next");
860860
await expect(page.getByTestId("community-profile-next")).toBeDisabled();
861-
await expect(page.getByTestId("community-profile-back")).toHaveText("Back");
862-
863-
await page.getByTestId("community-profile-back").click();
864-
await expect(
865-
page.getByRole("button", { name: "Add me to a community" }),
866-
).toBeVisible();
861+
await expect(page.getByTestId("community-profile-back")).toHaveCount(0);
867862
await expect
868863
.poll(() =>
869864
page.evaluate(
870865
(key) => window.localStorage.getItem(key),
871866
COMMUNITY_ONBOARDING_TRANSACTION_STORAGE_KEY,
872867
),
873868
)
874-
.toBeNull();
869+
.not.toBeNull();
875870
});
876871

877872
test("identity fallback text does not count as a real onboarding name", async ({

0 commit comments

Comments
 (0)