Automattic / wp-e2e-tests

Automated end-to-end tests for WordPress.com
https://github.com/Automattic/wp-calypso
GNU General Public License v2.0
110 stars 20 forks source link

Test more login flows #956

Open Tug opened 6 years ago

Tug commented 6 years ago

Copying the list of cases from our internal trello board to a github issue for more visibility:

We have a lot of possible cases for login that could benefit from e2e testing:

alisterscott commented 6 years ago

Hi @Tug

@Automattic/flowpatrol have been having trouble with the existing tests for 2fa etc. since they use the shared accounts accessed randomly they sometimes fail due to lots of runs happening and so aren't consistent

Do you have any thoughts on this?

We have a magic login test for a new customer, so maybe we could just extend that to create a simple, single 2fa scenario that is repeatable? Something like

  1. Create new free account
  2. Login to new account using magic link
  3. Add 2fa device
  4. Login using 2fa code
  5. Login via magic link (and 2fa) code

What do you think?

Thanks

Tug commented 6 years ago

Surely, not all 2FA tests should be run for all PRs. As you said they might fail if they're run too frequently and they're quite slow! I wonder if, much like with eslint on calypso, it would be possible to detect changes in some files related to 2FA and run those tests only in that case. Would that be a useful feature for wp-e2e-tests you think?

alisterscott commented 6 years ago

I wonder if, much like with eslint on calypso, it would be possible to detect changes in some files related to 2FA and run those tests only in that case. Would that be a useful feature for wp-e2e-tests you think?

Good idea, we'll plan to do this