mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-05-03 20:12:24 +02:00
5.1 KiB
5.1 KiB
Testing Front Matter Lite
This guide explains how to test the Front Matter Lite extension in various environments.
Prerequisites
- Built extension (run
npm run build) - VS Code installed locally OR
- Access to github.dev/vscode.dev
Testing Methods
1. Testing in VS Code Extension Development Host
This is the fastest way to test during development:
- Open the lite folder in VS Code
- Build the extension:
npm run build - Press F5 to launch Extension Development Host
- In the new window, open a folder or workspace
- The Front Matter Lite sidebar should appear in the Activity Bar
To test virtual workspace features:
- In Extension Development Host, open Command Palette (F1)
- Run "Open Remote Repository"
- Enter a GitHub repository URL (e.g.,
https://github.com/username/repo) - The extension will activate in virtual workspace mode
2. Testing in github.dev
-
Package the extension:
npm install -g @vscode/vsce vsce package -
This creates a
.vsixfile -
Navigate to github.dev:
- Go to any GitHub repository
- Press
.(period key) - OR change
github.comtogithub.devin the URL
-
Install the extension:
- Click Extensions icon in Activity Bar
- Click "..." menu
- Choose "Install from VSIX..."
- Select the generated
.vsixfile
-
Test the features
3. Testing in vscode.dev
Similar to github.dev:
- Go to https://vscode.dev
- Open a folder or repository
- Install the extension from VSIX (as above)
Test Scenarios
Scenario 1: Register a Content Folder
- Open a repository with markdown files
- In Explorer, right-click on a folder
- Select "Front Matter Lite > Register Content Folder (Lite)"
- Enter a title
- Verify:
- Success message appears
- Folder appears in Dashboard
- Configuration is saved
Scenario 2: Create Content
- Ensure at least one folder is registered
- Click "Create Content" in the Dashboard OR
- Run Command: "Front Matter Lite: Create Content (Lite)"
- Select a content folder
- Enter a file name
- Verify:
- File is created with front matter
- File opens in editor
- Front matter includes title, date, tags
Scenario 3: View Content in Dashboard
- Register a folder with existing markdown files
- Click "Refresh" in the Dashboard
- Verify:
- Files are listed
- File names and folders are shown
- Clicking a file opens it
Scenario 4: Virtual Workspace Detection
- Open repository via "Open Remote Repository" or github.dev
- Check Output channel "Front Matter Lite"
- Verify message: "Running in virtual workspace mode"
- Verify information message appears about limited features
Expected Behavior
Working Features ✅
- ✅ Register content folders
- ✅ Create new content files
- ✅ View registered folders in dashboard
- ✅ List content files in dashboard
- ✅ Open files from dashboard
- ✅ Basic front matter template
- ✅ Virtual workspace detection
Known Limitations ❌
- ❌ Cannot edit front matter in UI (use editor)
- ❌ No media upload/management
- ❌ No git integration
- ❌ No custom scripts
- ❌ No file system watch (manual refresh needed)
- ❌ Limited to 100 files per folder
Debugging
Enable Logging
- View > Output
- Select "Front Matter Lite" from dropdown
- Check for error messages
Common Issues
Extension not appearing:
- Check that it's built:
npm run build - Verify
dist/extension-web.jsexists - Check package.json has correct
browserentry point
Commands not working:
- Check Output channel for errors
- Verify workspace has folders
- Ensure running in compatible environment
Dashboard not loading:
- Check browser console (if in github.dev/vscode.dev)
- Verify webview is enabled
- Check for Content Security Policy errors
Browser Console (github.dev/vscode.dev)
- Press F12 to open Developer Tools
- Check Console tab for JavaScript errors
- Check Network tab for failed requests
Manual Testing Checklist
- Extension activates in virtual workspace
- Dashboard appears in Activity Bar
- Can register a folder via context menu
- Registered folders appear in dashboard
- Can create content via command
- Content file has correct front matter
- Files appear in dashboard after refresh
- Clicking file in dashboard opens it
- Virtual workspace mode detected
- Configuration persists
- Works in github.dev
- Works in vscode.dev
- Works in local VS Code
Performance Testing
Test with different repository sizes:
- Small repo (<10 files)
- Medium repo (10-50 files)
- Large repo (50-100 files)
Verify:
- Dashboard loads within 2 seconds
- File creation is responsive
- No UI freezing
Reporting Issues
When reporting issues, include:
- Environment (github.dev, vscode.dev, local)
- Workspace type (virtual or file)
- Steps to reproduce
- Output channel logs
- Browser console errors (if applicable)
- Extension version
Next Steps
After testing:
- Document any issues found
- Verify all test scenarios pass
- Test in different browsers (Chrome, Firefox, Edge, Safari)
- Get feedback from users
- Iterate on improvements