Comment on How do I convince my company to add tests for FE?
Blamemeta@lemm.ee 11 months ago
Don’t. You really can’t for most of it. At best, you can test whatever utility functions you have. The FE can and will break more in design than anything else, and that will never get caught by tests.
That said, try a wholistic approach. Playwright requires you to run the back end too, so you get a proper test suite going, instead of jest or whatever.
nitefox@sh.itjust.works [bot] 11 months ago
Yeah I don’t think unit testing would be useful. I don’t think though that integration tests etc are useless though, more so now that it is possible to test the UI states too. I didn’t know playwright to be fair, I read it “automatically” generates tests? Maybe I did misunderstand
Blamemeta@lemm.ee 11 months ago
It doesn’t generate them, you still have to write them. Ignore the marketing, look at the actual docs, same as any other framework.
There’s a few other frameworks, I just prefer playwright because I’m used to it.
timdrake@lemmy.world 11 months ago
There’s a VS Code extension that records the steps you took and creates the test for you. But more often than not, you would have to make some changes too.