Skip to content

Testing: Playwright test for the Brand DNA key panel #334

Closed

Description

@yakew7

Summary

The Brand DNA AI provider stores a key and asks for consent before sending anything. Add an e2e test of that flow with the network blocked, so no real request can leave.

Where to look

  • components/brand-dna/ai-key-panel.tsx and lib/brand-dna/ai-key.ts
  • tests/e2e/file-launch.spec.ts: a recent e2e test to copy the style from
  • docs/brand-dna-providers.md: what is sent and when

Behaviour

  • Route every request to api.anthropic.com to a failure and assert none is made before the review is approved.

Acceptance criteria

  • The test saves a key, sees the review with the images, approves it and removes the key again.
  • After removing the key, the stored record is gone (read IndexedDB in the page).
  • pnpm test:e2e passes.

Getting started: fork the repo, then pnpm install and pnpm dev (Node 22+, pnpm 11, no API keys). Before opening a PR, run pnpm typecheck && pnpm test && pnpm lint && pnpm format:check && pnpm check:dashes && pnpm build (CI fails on unformatted files, so pnpm format first). See CONTRIBUTING.md and the first contribution walkthrough.

Everything needed is in the repository. This doesn't need maintainer access, secrets or paid services. Comment below to claim it, and ask questions here any time.

Activity

  1. Ghifariezra commented on Oct 21, 2026

    @Ghifariezra
    Contributor

    Hi! I’d like to work on this. I’ll add a Playwright e2e test for the key panel flow, following tests/e2e/file-launch.spec.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions