Added separate ToS page (bug 1209226)#796
Conversation
There was a problem hiding this comment.
it looks like the only thing different here between the existing agreement page is the title, right? Can you maybe refactor them both to share a common base so there isn't any repeated content?
|
r- because of missing |
cfa23a6 to
f1f8856
Compare
|
I stubbed out the view for showing the API key but I was going to leave that for a separate PR. Everything else should be resolve aside from the one comment that I replied to. |
6a43fed to
7d680e8
Compare
There was a problem hiding this comment.
this template isn't used anymore so it can be deleted
There was a problem hiding this comment.
What do you mean? All sorts of templates extend from this.
There was a problem hiding this comment.
I meant apps/devhub/templates/devhub/api/agreement.html - where is this used?
There was a problem hiding this comment.
Ah right, so here is where I don't understand the UX of the current flow. Here is what happens in our hypothetical flow.
- User logs into AMO
- User clicks nav link to generate API key
- User is redirected to this page

- User accepts and is sent to actual API page
Now the issue here is that the page shown has nothing to do with API keys. it has a side bar that has a whole bunch of steps, none of which mean anything to someone trying to reach the API page. I must have missed this back in my last commit but this is why I suggested having a separate page for accepting the license.
|
r- for some fixups needed to the test logic. Let me know if you get stuck or have questions. |
ee71366 to
5f21905
Compare
There was a problem hiding this comment.
this still looks like unnecessary copy/paste to me. Why not just add the template as a parameter to submit()?
def api_key_agreement(request):
return submit(request, next_step=...,
template='devhub/api/agreement.html')
b3f1c97 to
acc218d
Compare
There was a problem hiding this comment.
Can't you just take off the follow argument and test it more directly?
response = self.client.get(reverse('devhub.submit.1'))
self.assertRedirects(response, reverse('devhub.submit.2'))
|
The redirect chain test looks a little fragile so I offered a solution for that. Otherwise, r+ on the latest changes. Thanks! |
acc218d to
86f574a
Compare
Added separate ToS page (bug 1209226)
Work in Progress:
Having issues with tests due to the fact that the user is populated somewhere in the unit tests which automatically causes the request to forward onto the next step (throwing assertion errors). Can't seem to figure out how to populate that request.user object.