diff --git a/src/components/Invites/campaign-maps.test.ts b/src/components/Invites/campaign-maps.test.ts index 2c303e884..7e74de50e 100644 --- a/src/components/Invites/campaign-maps.test.ts +++ b/src/components/Invites/campaign-maps.test.ts @@ -59,6 +59,17 @@ describe('classifyBareCampaign', () => { }) }) + // Regression: both country-launch cohorts ship BARE links with no inviter. + // Mapping them in UTM_CAMPAIGN_TO_BADGE_MAP alone is not enough — without a + // bare-campaign registration the link dead-ends on "Invalid Invite Code". + it.each(['naija', 'terere'])('country-launch campaign "%s" is a bare claimable skip', (c) => { + expect(classifyBareCampaign(c, undefined)).toEqual({ + isBareClaimCampaign: true, + isWaitlistSkip: true, + }) + expect(classifyBareCampaign(c.toUpperCase(), undefined).isBareClaimCampaign).toBe(true) + }) + it('only waitlist-skip campaigns promise a card-waitlist skip', () => { for (const c of BARE_VANITY_CAMPAIGNS) { expect(classifyBareCampaign(c, undefined).isWaitlistSkip).toBe(false) diff --git a/src/components/Invites/campaign-maps.ts b/src/components/Invites/campaign-maps.ts index 6f0910259..8035c5b10 100644 --- a/src/components/Invites/campaign-maps.ts +++ b/src/components/Invites/campaign-maps.ts @@ -90,7 +90,12 @@ export function resolveCampaign( // - Vanity: a commemorative badge with NO card-waitlist skip. Claimable from a // bare link, but `/invite` shows generic badge-claim copy (not "skip"). export const SKIP_CAMPAIGN = 'skip' -export const WAITLIST_SKIP_CAMPAIGNS: ReadonlySet = new Set([SKIP_CAMPAIGN, 'event_alumni']) +// naija and terere are the country-launch cohorts. Both are distributed as BARE +// campaign links with no inviter, and both are in peanut-api-ts +// POSTLAUNCH_SKIP_BADGE_CODES — so they belong here, not in BARE_VANITY_CAMPAIGNS +// (that set is for badges with no card-waitlist skip, and would show the wrong +// copy while the backend granted a skip anyway). +export const WAITLIST_SKIP_CAMPAIGNS: ReadonlySet = new Set([SKIP_CAMPAIGN, 'event_alumni', 'naija', 'terere']) export const BARE_VANITY_CAMPAIGNS: ReadonlySet = new Set([ 'touched_grass', 'card_alpha',