Closed Bug 1059828 Opened 10 years ago Closed 10 years ago

Tests: Auth views

Categories

(developer.mozilla.org Graveyard :: Code Cleanup, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: groovecoder, Assigned: jbennett)

References

Details

(Whiteboard: [dev-papercut])

When we hit https://bugzilla.mozilla.org/show_bug.cgi?id=1055870#c2 we realized our new auth views aren't adequately covered by tests.

So, we should cover the following scenarios with view tests:

* Existing user Sign-ins (Persona & GitHub) [1]

* New user Sign-ups (Persona & GitHub) [2]

[1] https://github.com/mozilla/kuma/blob/5b6221e193fd815fd07153276320c24f6d749c7d/kuma/users/tests/test_views.py#L461-L519
[2] https://github.com/mozilla/kuma/blob/5b6221e193fd815fd07153276320c24f6d749c7d/kuma/users/tests/test_views.py#L550-L570
Whiteboard: [dev-papercut]
Hi! I'm evidently an implicit needinfo? on this :)

How can I help move this along?
Putting the Git Hub sign-in workflow as a blocker, but only because this bug covers some of the tests we need.  We can unblock once enough tests have landed to cover the release.
Blocks: 1052453
Component: General → Code Cleanup
Addendum: we can scope-box this to be just enough tests to cover the integrity of the auth flow. i.e., we don't need to cover every case.

:ubernostrum - I'm guessing ~6-10 core tests per provider (Persona & GitHub)? Think we can get that done by Tuesday Sep 16th?
Flags: needinfo?(jbennett)
Sure thing.
Flags: needinfo?(jbennett)
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/ad37d0609f66b6ed67317dde06f16c37b75fc97e
Bug 1059828: Begin adding tests for allauth workflows.

This consolidates and/or obsoletes some of our pre-existing tests with
new, more granular tests of the Persona workflow.

Tests added/consolidated here verify that:

* Persona authentication failure is handled gracefully.

* Persona authentication failure produces the correct error message.

* Persona authentication during signup properly leads into profile
  creation.

* Persona-based profile creation shows the correct Persona-relevant
  messages.

* Persona sign-in with an existing account redirects correctly (to
  home page or to page the user signed in from).

* After signing in with Persona, auth-related UI elements show Persona
  identification.

* Pages displayed to non-authenticated users come pre-loaded with the
  stub Persona form and relevant data attributes.

* After signing up with Persona, a new Django User object and a new
  SocialAccount object are created, and populated with the correct data.

* After signing up with Persona, auth-related UI elements show Persona
  identification.

https://github.com/mozilla/kuma/commit/1954e547e91ecdb93ea79670aad2a35a2aa15803
Merge pull request #2750 from ubernostrum/auth-tests-1059828

Bug 1059828: Begin adding tests for allauth workflows.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.