sindresorhus / electron-dl

Simplified file downloads for your Electron app
MIT License
1.15k stars 138 forks source link

Status of tests and remote module #146

Open mquevill opened 2 years ago

mquevill commented 2 years ago

This package relies on the remote module for testing (via Spectron). Spectron is being deprecated and does not support Electron v14+. Currently, the only tests are checking the badge count when files are being downloaded.

The most promising alternative to Spectron I've seen is Playwright, which has some Electron automation, but does not have access to the whole API. (This is also because Playwright does not rely on the remote module.) Switching to Playwright would also require significant rewriting of the test cases. What are some good test cases that should be targeted?

Ideas I've had for new tests:

I've done some initial testing with switching to Playwright, and it seems to work fairly well with the current setup with Electron and Ava, but just can't access API functions like getBadgeCount() from Electron.

sindresorhus commented 2 years ago

I'm fine with simplifying it as you see fit, like switching to Playwright. I don't think the badge tests are very important. What's important to test is to ensure that it correctly download the files.