How to UI Test (Jest?) an app that relies on Google Auth.


(Nicholas Thompson) #1

Hi,

We have an app that is a frontend to a Rails-based API. We authenticate against that API using Google Single Sign On. React App hits Google SSO, gets a one-off token, passes that to our API and that uses it to authenticate the user and provides back an OAuth token for the app to use against the API.

I’d like to begin writing some UI tests, however I’d ideally like the tests to not have to deal with logging into Google too…

Does anyone have any tips or blog posts about how to test an app that does 3rd party auth like this?

Thanks,
Nick