test(e2e): align specs with the community edition and record the e2e baseline

The first full e2e run on this branch failed 19 tests, all on features the
community edition removed: /api/tier, Stripe, /api/compliance, the billing
settings tab, the payment pages and the upgrade dialog. Those checks now
assert that the endpoints and pages are gone (404); tier, billing and
team-settings probes are dropped from the remaining journeys. The rerun is
410 passed, 18 skipped, 0 failed.
This commit is contained in:
shumeiko.it
2026-10-20 01:36:38 +02:00
parent 01a2d8a4ce
commit 20567ecb10
11 changed files with 57 additions and 348 deletions

View File

@@ -329,97 +329,40 @@ test.describe('Act 3 — Persona Bonding & Identity', () => {
});
// ══════════════════════════════════════════════════════════════════════════════
// ACT 4 — THE TIER WALL (FOMO Engineering)
// FREE user hits a paid feature. Must feel like a door, not a wall.
// The upgrade path must be clear, immediate, and emotionally charged.
// ACT 4 — NO PAYWALL
// The community edition has no plans or tiers (ADR-0001). Everything a user
// can see must work without paying.
// ══════════════════════════════════════════════════════════════════════════════
test.describe('Act 4 — Tier Wall: FOMO & Upgrade Pressure', () => {
test('U4.1 — 403 response shows WHAT they are missing (not just "upgrade required")', async ({ request }) => {
// Hit a genuinely gated (TEAMS) endpoint as a non-Team user — personal
// features (personas, spawn, install) are all free (Solo) now, so the only
// real wall left is a Team feature.
const res = await request.post(`${API}/api/cloud-sync/toggle`, {
data: { enabled: true },
});
if (res.status() === 403) {
const data = await res.json();
// Must tell user what tier they need — not just "forbidden"
expect(data.required).toBeDefined();
expect(['TEAMS', 'ENTERPRISE']).toContain(data.required);
// Must give them a direct path to upgrade — no dead ends
expect(data.upgradeUrl).toBeDefined();
expect(data.upgradeUrl).toMatch(/https?:\/\//);
}
});
test('U4.2 — Upgrade URL leads to valid domain (not 404)', async ({ request }) => {
const res = await request.get(`${API}/api/costs`);
if (res.status() === 403) {
const data = await res.json();
if (data.upgradeUrl) {
// The URL must be reachable — broken upgrade URLs = lost revenue
expect(data.upgradeUrl).toMatch(/waggle-os\.ai|waggle\.ai/);
}
}
});
test('U4.3 — Tier ladder is coherent (FREE < TEAMS < ENTERPRISE)', async ({ request }) => {
const res = await request.get(`${API}/api/tier`);
expect(res.ok()).toBe(true);
const data = await res.json();
// Tier must be a known value — no typos in production
expect(['TRIAL', 'FREE', 'TEAMS', 'ENTERPRISE']).toContain(data.tier);
// Capabilities object must exist
expect(data.capabilities).toBeDefined();
});
test('U4.4 — FREE user can still do meaningful work (not a crippled demo)', async ({ request }) => {
// These must work on FREE — otherwise no one stays to upgrade
const freeEndpoints = [
test.describe('Act 4 — No paywall', () => {
test('U4.1 — core features work without a paid plan', async ({ request }) => {
const endpoints = [
`${API}/api/workspaces`,
`${API}/api/personas`,
`${API}/api/memory/frames?workspace=default&limit=5`,
`${API}/api/skills`,
`${API}/api/connectors`,
];
for (const url of freeEndpoints) {
for (const url of endpoints) {
const res = await request.get(url);
// Must be accessible on any tier — 429 under test load is acceptable
// 429 under test load is acceptable
expect(res.ok() || res.status() === 429, `${url} returned ${res.status()}`).toBe(true);
}
});
test('U4.5 — Stripe checkout session has a valid URL format', async ({ request }) => {
const res = await request.post(`${API}/api/stripe/create-checkout-session`, {
data: { tier: 'TEAMS', billingPeriod: 'monthly' },
});
if (res.status() === 200) {
const data = await res.json();
// Real Stripe URL — must be the actual checkout, not a stub
expect(data.url).toMatch(/https:\/\/checkout\.stripe\.com|https:\/\/billing\.stripe\.com/);
} else if (res.status() === 503) {
// OK — Stripe not configured in test env
const data = await res.json();
expect(data.error).toBe('STRIPE_NOT_CONFIGURED');
} else {
// 400 = tier config missing — also acceptable in test env
expect([400, 503]).toContain(res.status());
}
});
test('U4.6 — Cost dashboard teases value before the wall (FREE sees hint, not nothing)', async ({ request }) => {
test('U4.2 — cost tracking is open, not gated', async ({ request }) => {
const res = await request.get(`${API}/api/costs`);
if (res.status() === 403) {
const data = await res.json();
expect(data.error).toBe('TIER_INSUFFICIENT');
expect(data.required).toBe('TEAMS');
} else if (res.ok()) {
expect(res.status()).not.toBe(403);
if (res.ok()) {
const data = await res.json();
expect(data.today ?? data.allTime).toBeDefined();
}
});
test('U4.3 — there are no billing endpoints', async ({ request }) => {
expect((await request.get(`${API}/api/tier`)).status()).toBe(404);
expect((await request.post(`${API}/api/stripe/create-checkout-session`, { data: {} })).status()).toBe(404);
});
});
// ══════════════════════════════════════════════════════════════════════════════
@@ -1062,7 +1005,6 @@ test.describe('Act 10 — The Compulsion Loop: Full Value Cycle', () => {
// This is the "smoke test of smoke tests" — if any of these fail, the product is broken
const criticalPaths = [
{ url: `${API}/health`, name: 'System health' },
{ url: `${API}/api/tier`, name: 'Billing tier' },
{ url: `${API}/api/workspaces`, name: 'Workspaces' },
{ url: `${API}/api/personas`, name: 'Personas (17)' },
{ url: `${API}/api/skills`, name: 'Skills' },