18F / identity-oidc-expressjs

An example Login.gov client application which authenticates users via OpenID Connect (OIDC). Built with Node.js, Express.js, and Passport.js.
Other
12 stars 7 forks source link

Automated Tests #7

Open s2t2 opened 6 years ago

s2t2 commented 6 years ago

The following scenarios should be tested (maybe):

Login Test

  1. Unauthenticated user visits home page, and clicks "Login with LOA1".
  2. Expect to be redirected to a localhost login.gov URL - will probably need to be mocked/faked to avoid having to run the identity-idp server locally (so that begs the question of how valuable this test would be in general)
  3. User clicks "Sign In" then "Next" then "Submit"
  4. Expect to be redirected to the /profile page.

Passport Authentication Test

  1. Unauthenticated user visits profile page.
  2. Expect to be redirected back to the home page.
s2t2 commented 6 years ago

Some relevant test-related code from the forest service permit platform: