# 🧪 DocuElevate Browser Extension Test Page

## How to Test (v1.1.0 - Web Clipping)

1. Make sure the DocuElevate browser extension is installed and configured
2. URL Mode: Click extension icon, select "Send URL" mode, click "Send to DocuElevate"
3. Clip Full Page: Click extension icon, select "Clip Page" mode, click "Clip Full Page"
4. Clip Selection: Select text below, click extension icon, click "Clip Selection"
5. Context Menu - URL: Right-click page and select "Send URL to DocuElevate"
6. Context Menu - Full: Right-click page and select "Clip Full Page to DocuElevate"
7. Context Menu - Selection: Select text, right-click, select "Clip Selection to DocuElevate"

## 📄 Sample Document Links (URL Mode)

These links point to sample documents that can be processed by DocuElevate:

📕 Sample PDF Document (dummy.pdf) 📗 Example PDF File (file-sample_150kB.pdf) 📘 Learning Container Sample PDF

## 🖼️ Sample Image Links (URL Mode)

These links point to sample images that can be processed:

🖼️ Placeholder Image (PNG, 800x600) 📷 Placeholder Image (JPG, 1024x768)

## 📝 Selectable Content for Clip Testing

Use this content to test the selection clipping feature:

### Important Document

This is a sample paragraph that you can select and clip to DocuElevate. Select this text with your mouse, then right-click and choose "Clip Selection to DocuElevate" from the context menu.

Key Points:

- Web clipping allows you to save any web content as PDF
- You can clip full pages or just selected portions
- Pages are converted to PDF in your browser before upload
- All styling and formatting is preserved

This content will be captured with its styling and converted to a PDF document that's sent to DocuElevate for processing!

## ✅ Expected Behavior (v1.1.0)

### URL Mode:

- Extension Popup: Shows "Send URL" mode with current page URL
- Context Menu: "Send URL to DocuElevate" option appears
- Success: Notification with task ID appears

### Clip Mode:

- Extension Popup: Shows "Clip Page" mode with two buttons
- Full Page: Captures entire page as PDF and uploads
- Selection: Captures only selected content as PDF
- Context Menu: "Clip Full Page" and "Clip Selection" options
- Success: Notification confirms clip was uploaded

## 🔍 Testing Checklist (v1.1.0)

### Installation & Configuration:

- ☐ Extension icon appears in browser toolbar
- ☐ Popup opens when clicking extension icon
- ☐ Configuration can be saved (server URL)
- ☐ Mode toggle buttons work (URL/Clip)

### URL Mode:

- ☐ Current URL is displayed in popup
- ☐ "Send to DocuElevate" button works
- ☐ Context menu "Send URL to DocuElevate" works
- ☐ Success notification appears with task ID

### Clip Mode:

- ☐ "Clip Full Page" button works
- ☐ "Clip Selection" button works (after selecting text)
- ☐ Context menu "Clip Full Page to DocuElevate" works
- ☐ Context menu "Clip Selection to DocuElevate" works
- ☐ PDF is generated correctly with styles
- ☐ Upload succeeds and task ID is shown

### Error Handling:

- ☐ Clear error message if server unreachable
- ☐ Error message if no text selected (Clip Selection)
- ☐ Authentication errors handled properly

## 🐛 Troubleshooting

If the extension doesn't work:

1. Check that the extension is enabled in `chrome://extensions/`
2. Verify your DocuElevate server URL is correct
3. Open DevTools (F12) and check the Console for errors
4. Make sure your DocuElevate server is running and accessible
5. If using authentication, verify your session cookie is valid
6. For clipping: Ensure browser supports `chrome.tabs.printToPDF` API
7. Check that `/api/files/upload` endpoint is accessible