Files

1.7 KiB

LinkSyncExtension Tests

Testing Strategy

Browser extensions are tested differently than server applications:

  1. Manual Testing - Primary testing method
  2. Firefox Nightly Testing - Test in development mode
  3. Puppeteer Playwright - Automated E2E tests (optional)

Manual Testing Checklist

Installation

  • Load extension in Firefox
  • Verify icon appears in toolbar
  • Click icon opens popup

Settings

  • Enter server URL
  • Enter API key
  • Select sync mode
  • Save settings
  • Verify settings persist after reload

Bookmark Management

  • Add bookmark with form
  • Verify bookmark appears in list
  • Edit bookmark
  • Delete bookmark
  • Search filter works

Collections

  • Load collections list
  • Execute query
  • Create dynamic collection

Sync

  • Click "Sync Now"
  • Verify sync indicator
  • Check last sync timestamp

Offline Mode

  • Disconnect network
  • Add bookmark
  • Reconnect network
  • Verify bookmark syncs

Puppeteer Test Setup

// tests/puppeteer.config.js
module.exports = {
    browsers: ['chromium'],
    config: {
        launch: {
            args: ['--no-sandbox', '--disable-setuid-sandbox']
        }
    },
    // Test scripts in tests/
}

Run Tests

# Manual testing - run in Firefox
# Install Firefox Nightly and load extension

# Automated testing (if Puppeteer installed)
npm install puppeteer
npx puppeteer tests/puppeteer.test.js

Notes

  • Browser extensions cannot be fully automated
  • Manual testing is primary verification method
  • Use Firefox Nightly for development testing
  • Test in different browsers for compatibility