Bind custom emoji library membership to the signed-in user instead of the client. CustomEmojiService now tracks saved emoji ids per user id in localStorage (metoyou_custom_emoji_saved:<userId>) and the picker only shows the active user's set, seeded on first load from legacy savedByUser rows the user created. This stops a second account on the same client (or Electron's shared SQLite database) from inheriting another user's emoji picker, while keeping synced assets available for message rendering. Adds unit coverage for per-user scoping and a single-page-load Playwright e2e that switches users client-side (second user joins the first user's server) and asserts no library leak. Co-authored-by: Cursor <cursoragent@cursor.com>
End-to-End Tests
Playwright suite for the MetoYou / Toju product client. The tests exercise browser flows such as authentication, chat, voice, screen sharing, and settings with reusable page objects and helpers.
Commands
Run these from the repository root:
npm run test:e2eruns the full Playwright suite.npm run test:e2e:uiopens Playwright UI mode.npm run test:e2e:debugruns the suite in debug mode.npm run test:e2e:reportopens the HTML report intest-results/html-report.
You can also run npx playwright test from e2e/ directly.
Runtime
playwright.config.tsstartscd ../toju-app && npx ng serveas the test web server.- The suite targets
http://localhost:4200. - Tests currently run with a single Chromium worker.
- The browser launches with fake media-device flags and grants microphone/camera permissions.
- Artifacts are written to
../test-results/artifacts, and the HTML report is written to../test-results/html-report.
Structure
| Path | Description |
|---|---|
tests/ |
Test specs grouped by feature area such as auth/, chat/, voice/, screen-share/, and settings/ |
pages/ |
Reusable Playwright page objects |
helpers/ |
Test helpers, fake-server utilities, and WebRTC helpers |
fixtures/ |
Shared test fixtures |
Notes
- The suite is product-client focused; it does not currently spin up the marketing website.
- Keep reusable browser flows in
pages/and cross-test utilities inhelpers/.