mirror of
https://github.com/luxfi/wallet.git
synced 2026-10-30 15:13:19 +00:00
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).
47 lines
1.9 KiB
TypeScript
47 lines
1.9 KiB
TypeScript
import { expect } from '@playwright/test'
|
|
import { freshExtensionTest as test } from 'e2e/fixtures/extension.fixture'
|
|
import { ONE_SECOND_MS } from '@l.x/utils/src/time/time'
|
|
|
|
test.describe('Extension Onboarding Flow', () => {
|
|
test('onboarding tab opens automatically on fresh install', async ({ context }) => {
|
|
// Wait for onboarding tab to open automatically
|
|
const onboardingPage = await context.waitForEvent('page', {
|
|
predicate: (page) => page.url().includes('onboarding.html'),
|
|
timeout: ONE_SECOND_MS * 10,
|
|
})
|
|
|
|
// Verify onboarding page loaded
|
|
expect(onboardingPage).toBeTruthy()
|
|
await onboardingPage.waitForLoadState('networkidle')
|
|
|
|
// Check that the onboarding page is loaded
|
|
// Look for onboarding-specific elements
|
|
await onboardingPage.waitForSelector('[data-testid="onboarding-intro"], button, input', { timeout: 5000 })
|
|
|
|
// Verify we're on the onboarding page
|
|
const title = await onboardingPage.title()
|
|
expect(title).toContain('Lux Extension')
|
|
})
|
|
|
|
test.skip('sidebar is disabled before onboarding completion', async () => {
|
|
// This test requires clicking the actual extension button in Chrome's toolbar,
|
|
// which is not easily accessible via Playwright. The expected behavior is that
|
|
// clicking the extension button opens onboarding instead of the sidebar when
|
|
// the extension is not yet onboarded.
|
|
// Direct navigation to sidepanel.html doesn't trigger the redirect logic
|
|
// that happens when using the extension button.
|
|
})
|
|
|
|
test('background script initializes on fresh install', async ({ context }) => {
|
|
// Wait for any extension page to load
|
|
await context.waitForEvent('page', {
|
|
predicate: (page) => page.url().includes('chrome-extension://'),
|
|
timeout: 5000,
|
|
})
|
|
|
|
// MV3 extensions use service workers
|
|
const serviceWorkers = context.serviceWorkers()
|
|
expect(serviceWorkers.length).toBeGreaterThan(0)
|
|
})
|
|
})
|