refactor(private-zoom): rename full feature surface
This commit is contained in:
@@ -43,7 +43,7 @@ describe("global route context", () => {
|
||||
"https://example.com/characters/maya/chat",
|
||||
"//example.com/characters/maya/chat",
|
||||
"/characters/unknown/chat",
|
||||
"/characters/maya/private-room",
|
||||
"/characters/maya/private-zoom",
|
||||
"/characters/maya/chat?image=1",
|
||||
])("falls back to Elio for an invalid return target", (value) => {
|
||||
expect(resolveGlobalRouteContextValue(value)).toBe(
|
||||
|
||||
@@ -54,15 +54,15 @@ describe("navigation resolver", () => {
|
||||
).toBe(ROUTE_BUILDERS.authWithRedirect(subscriptionUrl));
|
||||
});
|
||||
|
||||
it("builds private room subscription return urls", () => {
|
||||
it("builds private zoom subscription return urls", () => {
|
||||
expect(
|
||||
ROUTE_BUILDERS.subscription("topup", {
|
||||
payChannel: "stripe",
|
||||
returnTo: "private-room",
|
||||
returnTo: "private-zoom",
|
||||
sourceCharacterSlug: "maya",
|
||||
}),
|
||||
).toBe(
|
||||
"/subscription?type=topup&payChannel=stripe&returnTo=private-room&character=maya",
|
||||
"/subscription?type=topup&payChannel=stripe&returnTo=private-zoom&character=maya",
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ describe("route meta", () => {
|
||||
expect(getRouteAccess(ROUTES.splash)).toBe("authOnly");
|
||||
expect(getRouteAccess(ROUTES.auth)).toBe("authOnly");
|
||||
expect(getRouteAccess(ROUTES.chat)).toBe("guestEntry");
|
||||
expect(getRouteAccess(ROUTES.privateRoom)).toBe("guestEntry");
|
||||
expect(getRouteAccess(ROUTES.privateZoom)).toBe("guestEntry");
|
||||
expect(getRouteAccess(ROUTES.tip)).toBe("public");
|
||||
expect(getRouteAccess(ROUTES.externalEntry)).toBe("public");
|
||||
expect(getRouteAccess(ROUTES.profile)).toBe("realUser");
|
||||
@@ -26,12 +26,12 @@ describe("route meta", () => {
|
||||
expect(routes).toEqual({
|
||||
splash: "/characters/maya/splash",
|
||||
chat: "/characters/maya/chat",
|
||||
privateRoom: "/characters/maya/private-room",
|
||||
privateZoom: "/characters/maya/private-zoom",
|
||||
tip: "/characters/maya/tip",
|
||||
});
|
||||
expect(getRouteAccess(routes.splash)).toBe("authOnly");
|
||||
expect(getRouteAccess(routes.chat)).toBe("guestEntry");
|
||||
expect(getRouteAccess(routes.privateRoom)).toBe("guestEntry");
|
||||
expect(getRouteAccess(routes.privateZoom)).toBe("guestEntry");
|
||||
expect(getRouteAccess(routes.tip)).toBe("public");
|
||||
});
|
||||
|
||||
@@ -41,8 +41,8 @@ describe("route meta", () => {
|
||||
expect(getRouteAccess("/characters/maya/coins-rules")).toBe("public");
|
||||
});
|
||||
|
||||
it("includes private room in static routes", () => {
|
||||
expect(ALL_STATIC_ROUTES).toContain(ROUTES.privateRoom);
|
||||
it("includes private zoom in static routes", () => {
|
||||
expect(ALL_STATIC_ROUTES).toContain(ROUTES.privateZoom);
|
||||
});
|
||||
|
||||
it("includes tip in static routes", () => {
|
||||
|
||||
@@ -9,7 +9,7 @@ import type {
|
||||
export type AppSubscriptionType = "vip" | "topup";
|
||||
export type AppSubscriptionReturnTo =
|
||||
| "chat"
|
||||
| "private-room"
|
||||
| "private-zoom"
|
||||
| "profile"
|
||||
| null;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ const GLOBAL_ROUTE_ACCESS: Partial<Record<string, RouteAccess>> = {
|
||||
[ROUTES.splash]: "authOnly",
|
||||
[ROUTES.auth]: "authOnly",
|
||||
[ROUTES.chat]: "guestEntry",
|
||||
[ROUTES.privateRoom]: "guestEntry",
|
||||
[ROUTES.privateZoom]: "guestEntry",
|
||||
[ROUTES.tip]: "public",
|
||||
[ROUTES.externalEntry]: "public",
|
||||
[ROUTES.profile]: "realUser",
|
||||
@@ -24,7 +24,7 @@ const GLOBAL_ROUTE_ACCESS: Partial<Record<string, RouteAccess>> = {
|
||||
const CHARACTER_ROUTE_ACCESS: Readonly<Record<string, RouteAccess>> = {
|
||||
splash: "authOnly",
|
||||
chat: "guestEntry",
|
||||
"private-room": "guestEntry",
|
||||
"private-zoom": "guestEntry",
|
||||
tip: "public",
|
||||
};
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ export const ROUTES = {
|
||||
root: "/",
|
||||
splash: "/splash",
|
||||
chat: "/chat",
|
||||
privateRoom: "/private-room",
|
||||
privateZoom: "/private-zoom",
|
||||
tip: "/tip",
|
||||
externalEntry: "/external-entry",
|
||||
auth: "/auth",
|
||||
@@ -36,7 +36,7 @@ export type StaticRoute = (typeof ROUTES)[keyof typeof ROUTES];
|
||||
export interface CharacterRoutes {
|
||||
readonly splash: string;
|
||||
readonly chat: string;
|
||||
readonly privateRoom: string;
|
||||
readonly privateZoom: string;
|
||||
readonly tip: string;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ export function getCharacterRoutes(
|
||||
return {
|
||||
splash: `${root}/splash`,
|
||||
chat: `${root}/chat`,
|
||||
privateRoom: `${root}/private-room`,
|
||||
privateZoom: `${root}/private-zoom`,
|
||||
tip: `${root}/tip`,
|
||||
};
|
||||
}
|
||||
@@ -110,7 +110,7 @@ export const ROUTE_BUILDERS = {
|
||||
export const ALL_STATIC_ROUTES: readonly StaticRoute[] = [
|
||||
ROUTES.splash,
|
||||
ROUTES.chat,
|
||||
ROUTES.privateRoom,
|
||||
ROUTES.privateZoom,
|
||||
ROUTES.tip,
|
||||
ROUTES.externalEntry,
|
||||
ROUTES.auth,
|
||||
|
||||
Reference in New Issue
Block a user