electron-automation-template
Use Playwright to test the Notion native app
Introduction
Automate tests for your Electron apps using Playwright & TypeScript!
GitHub Repo
https://github.com/steven-the-qa/electron-automation-templateTech Stack
- Playwright (ElectronJS app testing support)
- TypeScript (type safety)
- NodeJS (writing to the file system)
- RobotJS (Playwright doesn’t do keyboard navigation well within a select menu)
Getting Started
- Clone the repository
- IF ON WINDOWS (maybe just Windows 10, idk), install an extra dependency to support RobotJS keyboard commands BEFORE installing all dependencies (otherwise, things get weird):
npm install -g node-gyp
- Install the Visual Studio Tools with the “Desktop Development with C++” workload to support node-gyp
- To install all dependencies minus unnecessary Playwright browsers (because Electron), run:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm ci
- To run tests, run
npm test
from the root directory