This repository provides a sample setup for end-to-end testing of Obsidian plugins using Playwright. It is based on the approach developed by proog in their obsidian-trash-explorer plugin, and extends it by automating the setup process to make testing possible in CI environments.
- Works on macOS for local testing
- Verified operation in GitHub Actions
- Automates setup of Obsidian, test vault, and plugin
- Uses Electron directly with unpacked Obsidian sources
npm install
./scripts/setup-obsidian.sh # Unpacks and prepares Obsidian
npm run e2e:setup # Creates a test vault and registers it to Obsidian
npm run e2e # Runs Playwright-based E2E testsSee ci.yml for details.
Based on the work in proog/obsidian-trash-explorer