two-factor
two-factor copied to clipboard
Add e2e tests for critical paths
Some things can't be tested well with PHPUnit (like #490), so it could be helpful to have some e2e tests. I don't think they need to be comprehensive, but it'd be nice to cover the critical paths from user and security perspectives.
We might get a head start by looking at what @sjinks did ƒor https://github.com/sjinks/wp-two-factor-provider-webauthn
@iandunn would it make sense to leverage Playwright like Gutenberg and Core have evolved to do for e2e tests?
I haven't used it yet, so I'm open to someone more knowledgeable having a different opinion, but that sounds like a logical approach 👍🏻
It looks like that's also what was done in https://github.com/sjinks/wp-two-factor-provider-webauthn, so we might be able to copy a lot of that.
If you need some help, please feel free to ping me :-)
@sjinks if you're familiar with Playwright tests, then you can take a look at how WordPress core and Gutenberg both utilize that for their e2e tests and work on an initial PR to add those tests & GitHub Action for the Two-Factor plugin:
Thanks! Jeff.