Files
zeekay 01c9bc491d chore: scrub uniswap — use @luxamm/* (lux fork) only
Replace every @uniswap/* package import with @luxamm/* (lux fork
already canonical for SDK pieces). Replace app.uniswap.org URLs with
lux.exchange, uniswap.org with lux.network. Replace brand strings
(Uniswap Wallet → Lux Wallet, Uniswap Extension → Lux Extension,
Uniswap Labs → Lux Labs Inc.) where they appear in user-facing UI.
Rename handleUniswapAppDeepLink → handleLuxAppDeepLink, also rename
focusOrCreateUniswapInterfaceTab → focusOrCreateLuxInterfaceTab.

Manifest host_permissions updated to lux.exchange and *.lux.network.

Lockfile regeneration: TODO — run pnpm install to refresh after this
commit. Transitive @uniswap/* references in pnpm-lock.yaml are
upstream-package internals.

Protocol-level identifiers (UniswapMethodHandler, UniswapMethods,
UniswapOpenSidebarRequest, handleUniswapX, UniswapXOrderDetails) are
preserved because they reference wire-protocol method names
(uniswap_openSidebar) and external SDK type exports — renaming would
break upstream contracts. iOS Uniswap target directory and
uniswapteam.slack.com / github.com/Uniswap/universe doc refs are
out-of-scope per directive (separate native-build cleanup).

Same hard-banishment rule as tamagui (per feedback memory).
2026-06-10 22:35:41 -07:00
..

Extension E2E Tests

End-to-end tests for the Uniswap Chrome Extension using Playwright.

Setup

  1. Install dependencies (from repo root):

    bun install
    
  2. Install Playwright browsers (from extension directory):

    cd apps/extension
    bun playwright install chromium
    

Running Tests

Build and run all tests:

bun run e2e

Build and run smoke tests only:

bun run e2e:smoke

Run tests without rebuilding:

bun run playwright:test

Run tests in UI mode (for debugging):

bun playwright test --ui --config=e2e/config/playwright.config.ts

Run tests in headless environment (CI/SSH):

Chrome extensions require a display server. If you're running in a headless environment, use xvfb:

# Install xvfb if needed
sudo apt-get install xvfb
# Run tests with xvfb
xvfb-run -a bun run e2e:smoke

Test Structure

  • config/ - Playwright configuration
  • fixtures/ - Test fixtures for extension loading
  • tests/smoke/ - Smoke tests for critical functionality
    • basic-setup.test.ts - Verifies extension loads correctly
    • onboarding-flow.test.ts - Tests fresh install onboarding
    • sidebar-loads.test.ts - Tests sidebar functionality (auto-onboards)
    • wallet-connection.test.ts - Tests dApp connection flow (auto-onboards)
  • utils/ - Helper utilities including programmatic onboarding

Test Fixtures

freshExtensionTest

  • Loads extension with no user data
  • Triggers onboarding flow
  • Use for testing fresh installation scenarios

onboardedExtensionTest

  • Loads extension with fresh user data
  • Automatically completes onboarding with test wallet
  • Uses test seed phrase: test test test test test test test test test test test junk
  • Use for testing wallet functionality

Programmatic Onboarding

Tests that require an onboarded extension will automatically complete the onboarding process using a test seed phrase. This approach:

  • Avoids committing sensitive user data
  • Ensures consistent test environment
  • Works identically in CI and local development
  • No manual setup required

CI Integration

Tests run automatically on PRs that affect the extension or its dependencies using GitHub Actions.