Closed marvinhagemeister closed 5 months ago
There's definitely a bit of work to be done to make Astral smoother. Thanks for the feedback. History navigation should be a really easy ask if it's not already a part of Astral.
Found out that uncaught exceptions and other things are dispatched as an event, so that was more me not knowing about it only. Got history navigation working as well by doing:
await page.evaluate(() => window.history.go(-1));
Closing because I think all of the individual points have been addressed through various PRs. Feel free to correct me if wrong.
I'm currently considering moving to astral for e2e testing for Fresh 2. We currently rely on a very old puppeteer instance. In Fresh we don't need much functionality so this seems like a perfect fit.
Here are some random thoughts while porting the test suite:
await(await page.$(".update"))!.click();
works, but a locator API would be a little smoother (that said I don't mind it too much)Page.url
can be undefined, but afaik every page in a browser has at least the default urlabout:blank
. Would remove a few null assertions in test casespage.evaluate
could infer return typeOverall it's a really nice experience. I love that it auto-installs chromium when not present. That's much better than what we had before. Looking forward to using it more 👍