Skip to content
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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

therealslimhsiehdy
Copy link
Contributor

@therealslimhsiehdy therealslimhsiehdy commented Jan 21, 2025

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 expiring
  • if 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 expiring
  • On 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"

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

  • Met the acceptance criteria, or will meet them in a subsequent PR
  • Created/modified automated tests
  • Update documentation in READMEs and/or onboarding guide

Ensured code standards are met (Original Developer)

  • If any updated dependencies on Pipfile, also update dependencies in requirements.txt.
  • Interactions with external systems are wrapped in try/except
  • Error handling exists for unusual or missing values

Validated user-facing changes (if applicable)

  • Tag @dotgov-designers in this PR's Reviewers for design review. If code is not user-facing, delete design reviewer checklist
  • Verify new pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
  • Checked keyboard navigability
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)

As a code reviewer, I have

Reviewed, tested, and left feedback about the changes

  • Pulled this branch locally and tested it
  • Verified code meets all checks above. Address any checks that are not satisfied
  • Reviewed this code and left comments. Indicate if comments must be addressed before code is merged
  • Checked that all code is adequately covered by tests
  • Verify migrations are valid and do not conflict with existing migrations

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.

  • New pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
  • Checked keyboard navigability
  • Meets all designs and user flows provided by design/product
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
  • (Rarely needed) Tested as both an analyst and applicant user

As a designer reviewer, I have

Verified that the changes match the design intention

  • Checked that the design translated visually
  • Checked behavior. Comment any found issues or broken flows.
  • Checked different states (empty, one, some, error)
  • Checked for landmarks, page heading structure, and links

Validated user-facing changes as a designer

  • Checked keyboard navigability
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
  • Tested with multiple browsers (check off which ones were used)
    • Chrome
    • Microsoft Edge
    • FireFox
    • Safari
  • (Rarely needed) Tested as both an analyst and applicant user

References

Screenshots

Copy link

🥳 Successfully deployed to developer sandbox rh.

Copy link

🥳 Successfully deployed to developer sandbox rh.

Copy link

🥳 Successfully deployed to developer sandbox rh.

Copy link

🥳 Successfully deployed to developer sandbox rh.

@asaki222 asaki222 changed the title #3363: UAT 1 Bug Fixes - [RH] #3363: UAT 1 Bug Fixes - [AD] Jan 22, 2025
Copy link

🥳 Successfully deployed to developer sandbox rh.

@therealslimhsiehdy therealslimhsiehdy changed the title #3363: UAT 1 Bug Fixes - [AD] #3363: UAT Quick Bug Fixes - [AD] Jan 22, 2025
Copy link

🥳 Successfully deployed to developer sandbox rh.

Copy link

🥳 Successfully deployed to developer sandbox rh.

@@ -443,6 +443,12 @@ def setUp(self):
name="domainrenewal.gov",
)

self.domainnotexpiring, _ = Domain.objects.get_or_create(
Copy link
Contributor

@abroddrick abroddrick Jan 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpck please use camel case or snake case but not all lowercase for your variables, all lowercase makes it harder to read. Same comment for the variable below

name="domainnotexpiring.gov", expiration_date=timezone.now().date() + timedelta(days=65)
)

self.domainnodomainmanager, _ = Domain.objects.get_or_create(name="domainnodomainmanager")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick In general don't use invalid domain names in test unless you want to test for an invalid case. We really should, down the road, make it so a domain can never be created that is invalid, but in the meantime you can not have a domain that doesn't have .gov so change any of your tests that are missing the .gov so that they have the correct ending.

@@ -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):
Copy link
Contributor

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.

"""Domain detail overview page."""

template_name = "domain_renewal.html"

def get_context_data(self, **kwargs):
"""Grabbing security email information for the renewal form"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"""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):
Copy link
Contributor

@abroddrick abroddrick Jan 25, 2025

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

if security_email is None or security_email in default_emails:
context["security_email"] = None
return context
context["security_email"] = security_email
Copy link
Contributor

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

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()):
Copy link
Contributor

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

Suggested change
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


def in_editable_state(self, pk):
"""Override in_editable_state from DomainPermission
Allow renewal form to be accessed"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Allow renewal form to be accessed"""
Allow renewal form to be accessed
returns boolean"""

suggestion

Allow renewal form to be accessed"""

requested_domain = None
if Domain.objects.filter(id=pk).exists():
Copy link
Contributor

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.

Copy link
Contributor

@abroddrick abroddrick left a 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.

@abroddrick abroddrick self-assigned this Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Domain Renewal UAT Testing 1 Bug Bundle
3 participants