From e949bdf4a7792ad210f1a85cffa6f8d3a16b54b5 Mon Sep 17 00:00:00 2001 From: Brian Love Date: Fri, 22 May 2026 10:12:21 -0700 Subject: [PATCH] fix(tests): resolve two pre-existing main CI failures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. **libs/langgraph agent.provider.spec.ts** — "runs a silent license check when a valid license is supplied" was using the legacy tier slug `'developer-seat'` (hyphen), but PR #516 (May 21) renamed the `LicenseTier` union to underscored slugs (`'developer_seat'`). The token was rejected as `malformed` by `parseLicenseToken`, the warn nag fired, and the test failed. Update the test to use the new slug. 2. **apps/website e2e website.spec.ts** — "pricing page lead form validates required fields" clicked `button[type="submit"]` without scoping, which picked the first such button on the page. Stripe Checkout (PR #508) added a `
` with a submit button per buyable tier — those now appear before the LeadForm's "Get in touch" button. The test was POSTing to /api/checkout/session, which hit getStripe() with no STRIPE_SECRET_KEY in CI and 500'd, leaving the page in a state without any visible form. Scope the click + assertion to the LeadForm via the "Get in touch" button text. Co-Authored-By: Claude Opus 4.7 (1M context) --- apps/website/e2e/website.spec.ts | 12 ++++++++++-- libs/langgraph/src/lib/agent.provider.spec.ts | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/apps/website/e2e/website.spec.ts b/apps/website/e2e/website.spec.ts index 6ee385c1..4721d6da 100644 --- a/apps/website/e2e/website.spec.ts +++ b/apps/website/e2e/website.spec.ts @@ -29,8 +29,16 @@ test('pricing page shows plan cards', async ({ page }) => { test('pricing page lead form validates required fields', async ({ page }) => { await page.goto('/pricing'); - await page.click('button[type="submit"]'); - await expect(page.locator('form').first()).toBeVisible(); + // The pricing page also has Stripe-checkout submit buttons in + // PricingGrid; scope to the LeadForm's "Get in touch" button so this + // test exercises the lead form (not the checkout flow which would + // POST to /api/checkout/session and require Stripe to be configured). + const leadForm = page + .locator('form') + .filter({ has: page.getByRole('button', { name: /get in touch/i }) }) + .first(); + await leadForm.getByRole('button', { name: /get in touch/i }).click(); + await expect(leadForm).toBeVisible(); }); test('contact page submits a lead payload and renders success state', async ({ page }) => { diff --git a/libs/langgraph/src/lib/agent.provider.spec.ts b/libs/langgraph/src/lib/agent.provider.spec.ts index f01dee65..e3783363 100644 --- a/libs/langgraph/src/lib/agent.provider.spec.ts +++ b/libs/langgraph/src/lib/agent.provider.spec.ts @@ -40,7 +40,7 @@ describe('provideAgent', () => { const token = await signLicense( { sub: 'cus_test', - tier: 'developer-seat', + tier: 'developer_seat', iat: 1_700_000_000, exp: 2_000_000_000, seats: 1,