Test page flow for unlogged in user registering a branch

Bug #102175 reported by Jonathan Lange
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Jonathan Lange

Bug Description

Write a test to ensure that on the Code homepage, an unlogged-in user can click the "Register a branch" link, be directed to the login page, login in, and then be directed to the "Register a branch" page.

Revision history for this message
David Allouche (ddaa) wrote :

Right. Setting to High importance because untested code is broken code, and the code.launchpad.net page really should not be broken.

Changed in launchpad-bazaar:
importance: Undecided → High
status: Unconfirmed → Confirmed
Jonathan Lange (jml)
Changed in launchpad-bazaar:
assignee: nobody → jml
Revision history for this message
Jonathan Lange (jml) wrote :

I've written a page test for this. Unfortunately, the test fails. After logging in, the user is directed to their main code page, rather than the branch registration page.

This is because the login redirects to the *traversed* URL, rather than the *requested* URL, and because the error is raised when processing the '+me' part of the URL.

I think the correct answer is changing the behaviour of the login redirect. However, it seems such a core part of the system, so I want to tread carefully.

Changed in launchpad-bazaar:
status: Confirmed → Needs Info
Revision history for this message
Jonathan Lange (jml) wrote :

The simple thing to do here is just use a different URL on the front page depending on whether or not the user logged in -- thanks jamesh

Jonathan Lange (jml)
Changed in launchpad-bazaar:
status: Needs Info → In Progress
Jonathan Lange (jml)
Changed in launchpad-bazaar:
status: In Progress → Fix Committed
Revision history for this message
Jonathan Lange (jml) wrote :

r4234

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.