-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#3363: UAT Quick Bug Fixes - [AD] #3372
base: main
Are you sure you want to change the base?
Conversation
🥳 Successfully deployed to developer sandbox rh. |
🥳 Successfully deployed to developer sandbox rh. |
🥳 Successfully deployed to developer sandbox rh. |
🥳 Successfully deployed to developer sandbox rh. |
… rh/3363-uat-1-bug-fixes
🥳 Successfully deployed to developer sandbox rh. |
🥳 Successfully deployed to developer sandbox rh. |
… rh/3363-uat-1-bug-fixes
🥳 Successfully deployed to developer sandbox rh. |
@@ -657,6 +662,21 @@ def test_domain_renewal_form_domain_manager_edit(self): | |||
self.assertEqual(edit_page.status_code, 200) | |||
self.assertContains(edit_page, "Domain managers can update all information related to a domain") | |||
|
|||
@override_flag("domain_renewal", active=True) | |||
def test_domain_renewal_form_not_expired_or_expiring(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick All new functions should have docstring comment of some kind, especially a test.
src/registrar/views/domain.py
Outdated
"""Domain detail overview page.""" | ||
|
||
template_name = "domain_renewal.html" | ||
|
||
def get_context_data(self, **kwargs): | ||
"""Grabbing security email information for the renewal form""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Grabbing security email information for the renewal form""" | |
"""Grabs the security email information and adds security_email to the renewal form context | |
sets it to None if it uses a default email""" |
context["security_email"] = security_email | ||
return context | ||
|
||
def in_editable_state(self, pk): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment 100 percent I am reading this as inedible
maybe you could just say is_editable? usually with boolean returns using is_ or has_ to indicate a yes no (true/false) state helps with readability. not blocking on it though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh we are overriding the DomainPermission method for this use case. We would need to rename the method in DomainPermission as well.
if security_email is None or security_email in default_emails: | ||
context["security_email"] = None | ||
return context | ||
context["security_email"] = security_email |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion if you move this line before the if statement you can delete the return currently on 331 and just have one return in your function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abroddrick Sounds good! should I modify this logic in the DomainView class as well?
src/registrar/views/domain.py
Outdated
if Domain.objects.filter(id=pk).exists(): | ||
requested_domain = Domain.objects.get(id=pk) | ||
|
||
if requested_domain and (requested_domain.is_expiring() or requested_domain.is_expired()): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: you can just return this
if requested_domain and (requested_domain.is_expiring() or requested_domain.is_expired()): | |
# return if domain is expired or close to expiring | |
return requested_domain and (requested_domain.is_expiring() or requested_domain.is_expired()): |
you can then remove the return true/false lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated!
src/registrar/views/domain.py
Outdated
|
||
def in_editable_state(self, pk): | ||
"""Override in_editable_state from DomainPermission | ||
Allow renewal form to be accessed""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow renewal form to be accessed""" | |
Allow renewal form to be accessed | |
returns boolean""" |
suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abroddrick updated!
Allow renewal form to be accessed""" | ||
|
||
requested_domain = None | ||
if Domain.objects.filter(id=pk).exists(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment: I am just skimming but, I do recall that the one you are overriding has checks for if the domain is editbable that then include a check on state (so that you cannot change/edit an on hold or deleted domain. Reading this code, it looks like an onhold or deleted domain could still have and editable renewal form. Instead, you may want to call the super in_editable_state and add that to your return value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a drive-by code read through, and see my comment regarding a corner case you may be missing with on hold and deleted domains. I didn't go indepth into the code, but another suggestion( besides the one I made already) is that you can make sure is expired and is expiring never show on deleted and on hold domains by adding a check on state to you is_expiring and is_expired functions so that if the domain is in either of these states it returns false. If you don't do this it looks like your state_display function on models domain will result in deleted and on hold domains being flagged as expired/expiring... We would definitely not want that.
🥳 Successfully deployed to developer sandbox rh. |
🥳 Successfully deployed to developer sandbox rh. |
… rh/3363-uat-1-bug-fixes
…manage.get.gov into rh/3363-uat-1-bug-fixes
🥳 Successfully deployed to developer sandbox rh. |
2 similar comments
🥳 Successfully deployed to developer sandbox rh. |
🥳 Successfully deployed to developer sandbox rh. |
🥳 Successfully deployed to developer sandbox rh. |
🥳 Successfully deployed to developer sandbox rh. |
…manage.get.gov into rh/3363-uat-1-bug-fixes
🥳 Successfully deployed to developer sandbox rh. |
🥳 Successfully deployed to developer sandbox rh. |
Ticket
Resolves #3363
Changes
Update the expiring soon banner to the slim version
usa-site-alert--slim
Tool tip for any domains that are expiring soon to have the text of
This domain will expire soon. Go to “Manage” to renew the domain.
if we open any expired or expiring domain and add
/renewal
at the end of the URL and we are not a domain manager, we should get a 403 and NOT be able to see the form UNLESS it's expired or expiringif we open any domain and add
/renewal
at the end of the URL we should get a 403 and NOT be able to see the form UNLESS it's expired or expiringOn the Renewal Form, the "require", "contact us" and "requirements for operating..." links should open to a new tab
Content change on the Renewal form - "Review these details below" to "Review the details below"
Text fix: On the Renewal form for the section of "requirements for operating..." there's an extra space between the last word and the period - remove the space
For the "Renew to maintain access" URL text in the Domain Overview section, make sure it is normal blue
For the Renewal Form, update the button text from "Submit" to "Submit and renew"
Address onhold/deleted in sorting!
Context for reviewers
While we are doing UAT testing, we found some bugs that we were decently "quick" fixes to resolve
Setup
Please look at Google Sheet, specifically the bug/questions section on how to reproduce/directions - if confused reach out to Rebecca or Aditi.
Code Review Verification Steps
As the original developer, I have
Satisfied acceptance criteria and met development standards
Ensured code standards are met (Original Developer)
Validated user-facing changes (if applicable)
As a code reviewer, I have
Reviewed, tested, and left feedback about the changes
Validated user-facing changes as a developer
Note: Multiple code reviewers can share the checklists above, a second reviewer should not make a duplicate checklist. All checks should be checked before approving, even those labeled N/A.
As a designer reviewer, I have
Verified that the changes match the design intention
Validated user-facing changes as a designer
References
Screenshots