Files
LexAI/tests/e2e/extension.test.ts
john kevin asprec 04a4a2dc99 chore: remove unused deps, pin toolchain, single-source version, quarantine e2e
- Uninstall zustand, tailwindcss, autoprefixer, tweetnacl-util (all
  unused); README no longer advertises Tailwind/Zustand.
- Fix stale 'Tone' -> 'Explain' copy in Options.
- Add .nvmrc/engines/packageManager (Node 22 to match CI).
- wxt.config.ts reads manifest version from package.json so the two
  can never drift.
- Ignore *.zip build artifacts.
- Skip the two e2e specs with literal [EXTENSION_ID] placeholders
  (cannot pass; TODO references the e2e-ID-resolution task).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 21:26:51 +08:00

32 lines
1.1 KiB
TypeScript

import { test, expect } from '@playwright/test';
// TODO(P6-T1): these specs hard-code a literal [EXTENSION_ID] placeholder and can
// never pass. Skipped until a Playwright global-setup resolves the real extension
// ID from the loaded unpacked build's service-worker URL.
test.skip('LexAI popup opens correctly', async ({ page }) => {
// Navigate to extension popup
await page.goto('chrome-extension://[EXTENSION_ID]/popup/index.html');
// Check LexAI branding is present
await expect(page.locator('text=LexAI')).toBeVisible();
// Check settings button is present
await expect(page.locator('button:has-text("Open Settings")')).toBeVisible();
});
test.skip('Options page saves API key', async ({ page }) => {
await page.goto('chrome-extension://[EXTENSION_ID]/options/index.html');
// Fill in API key
await page.fill('input[type="password"]', 'sk-test-key');
// Select provider
await page.selectOption('select:first-of-type', 'openai');
// Save
await page.click('button:has-text("Save Settings")');
// Confirm saved
await expect(page.locator('text=Saved!')).toBeVisible();
});