# LockNKey Browser Extension - Quick Testing Guide

## 🚀 Quick Start

### Load Extension in Chrome

1. Open Chrome and navigate to: `chrome://extensions`
2. Enable **Developer mode** (toggle in top-right corner)
3. Click **"Load unpacked"**
4. Select folder: `dist/chrome` (in this directory)

### Verify It Works

1. **Check service worker**:
   - On extensions page, find "LockNKey - Quantum Password Manager"
   - Click "Service worker" link
   - Should see: `"LockNKey background service worker initialized"`

2. **Test on GitHub**:
   - Go to: https://github.com/login
   - Look for 🛡️ button next to password field
   - Open DevTools (F12) to see: `"LockNKey content script loaded"`

3. **Test popup**:
   - Click extension icon in Chrome toolbar
   - Popup should open with Vault/Generate/Status tabs

## 🔧 Rebuild After Changes

```bash
npm run build
```

Then reload extension in Chrome:
- Go to `chrome://extensions`
- Click the reload icon (circular arrow) on LockNKey card

## 📋 Full Test Suite

See detailed testing instructions in:
`.claude/task/2025-10-05-browser-extension-testing-results.md`

## 🐛 Common Issues

### Service Worker Not Running
- **Symptom**: "Cannot read properties of undefined (reading 'sendMessage')"
- **Fix**: Make sure extension is loaded in Chrome, click service worker link to activate

### Q-Shield Button Missing
- **Check**: DevTools console for "LockNKey content script loaded" message
- **Fix**: Reload extension, refresh the web page

### Popup Doesn't Open
- **Check**: Right-click extension icon → "Inspect popup" → check console
- **Fix**: Verify `dist/chrome/popup.html` exists after build

## 🎯 Current Status

- ✅ Extension builds successfully
- ✅ process.env bug fixed
- ✅ Manifest icon references removed
- ⏳ Manual testing required (automated testing blocked by MCP limitations)

**Last Build**: Run `npm run build` to verify
**Extension Path**: `dist/chrome/`
