Walk Create Community through the Figma screens and restore a chosen logo after reload, so a guest can leave without saving until they reach the email step.
This commit is contained in:
1 parent
ca1f58a50c
commit
2348a9e94f
61 files changed
+1110
-421
No files matched your search
@@ -1,7 +1,11 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import communitySize from "../../messages/en/create/community/communitySize.json";
|
||||
import { SIZE_BANDS } from "../../lib/create/deckTypes";
|
||||
import { isCommunitySizeStepBlocked } from "../../app/(app)/create/utils/createFlowFooterLabels";
|
||||
import {
|
||||
isCommunityNameStepBlocked,
|
||||
isCommunitySizeStepBlocked,
|
||||
isCommunityStructureStepBlocked,
|
||||
} from "../../app/(app)/create/utils/createFlowFooterLabels";
|
||||
|
||||
/**
|
||||
* Inclusive bounds. 100 stays in 13 to 100. More than 100 starts at 101.
|
||||
@@ -64,3 +68,37 @@ describe("community size bands", () => {
|
||||
).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("community name and type continue gates", () => {
|
||||
it("blocks the name step until a title is entered", () => {
|
||||
expect(isCommunityNameStepBlocked("community-name", undefined)).toBe(true);
|
||||
expect(isCommunityNameStepBlocked("community-name", " ")).toBe(true);
|
||||
expect(isCommunityNameStepBlocked("community-name", "Garden Club")).toBe(
|
||||
false,
|
||||
);
|
||||
expect(isCommunityNameStepBlocked("community-size", "")).toBe(false);
|
||||
});
|
||||
|
||||
it("blocks the type step until a main kind and a maturity are chosen", () => {
|
||||
expect(
|
||||
isCommunityStructureStepBlocked("community-structure", [], ["earlyStage"]),
|
||||
).toBe(true);
|
||||
expect(
|
||||
isCommunityStructureStepBlocked(
|
||||
"community-structure",
|
||||
["mutualAid"],
|
||||
[],
|
||||
),
|
||||
).toBe(true);
|
||||
expect(
|
||||
isCommunityStructureStepBlocked(
|
||||
"community-structure",
|
||||
["mutualAid"],
|
||||
["established"],
|
||||
),
|
||||
).toBe(false);
|
||||
expect(
|
||||
isCommunityStructureStepBlocked("community-size", [], []),
|
||||
).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user