-
Notifications
You must be signed in to change notification settings - Fork 18
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
[litterbox] 2162: Delete Submitter field and Your contact information page #2693
Conversation
… es/2574-remove-submitter
🥳 Successfully deployed to developer sandbox es. |
🥳 Successfully deployed to developer sandbox es. |
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.
Getting some weird behavior with the email allow list when the profile_feature
flag is turned off. Basically if you remove yourself from the email allow list and send out an email when the flag is off, it says it sends successfully (though it did not). I think its because of this logic that is still lingering.
@@ -387,12 +387,12 @@ class PurposeForm(RegistrarForm): | |||
|
|||
|
|||
class YourContactForm(RegistrarForm): |
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.
self.assert_email_is_accurate( | ||
"ORGANIZATION ALREADY HAS A .GOV DOMAIN", 0, _creator.email, bcc_email_address=BCC_EMAIL | ||
) | ||
self.assertEqual(len(self.mock_client.EMAILS_SENT), 1) |
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.
self.assert_email_is_accurate( | |
"ORGANIZATION ALREADY HAS A .GOV DOMAIN", 0, _creator.email, bcc_email_address=BCC_EMAIL | |
) | |
self.assertEqual(len(self.mock_client.EMAILS_SENT), 1) | |
self.assert_email_is_accurate( | |
"ORGANIZATION ALREADY HAS A .GOV DOMAIN", 0, EMAIL, bcc_email_address=BCC_EMAIL | |
) | |
self.assertEqual(len(self.mock_client.EMAILS_SENT), 1) |
Can you change these tests too such that it tests on EMAIL rather than _creator.email?
@@ -112,9 +111,7 @@ def test_submission_confirmation_other_contacts_spacing(self): | |||
_, kwargs = self.mock_client.send_email.call_args | |||
body = kwargs["Content"]["Simple"]["Body"]["Text"]["Data"] | |||
self.assertIn("Other employees from your organization:", body) | |||
# spacing should be right between adjacent elements | |||
self.assertRegex(body, r"5556\n\nOther employees") |
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.
@therealslimhsiehdy See above ^^
class TestDomainContactInformation(TestDomainOverview): | ||
@less_console_noise_decorator | ||
def test_domain_your_contact_information(self): | ||
"""Can load domain's your contact information page.""" | ||
page = self.client.get(reverse("domain-your-contact-information", kwargs={"pk": self.domain.id})) | ||
self.assertContains(page, "Your contact information") | ||
|
||
@less_console_noise_decorator | ||
def test_domain_your_contact_information_content(self): | ||
"""Logged-in user's contact information appears on the page.""" | ||
self.user.first_name = "Testy" | ||
self.user.save() | ||
page = self.app.get(reverse("domain-your-contact-information", kwargs={"pk": self.domain.id})) | ||
self.assertContains(page, "Testy") | ||
|
||
|
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.
Basically, we're removing the feature flag. But as of now, this page will appear on the domain view page even though it no longer exists. This will return an error is a dead link when you navigate to it @therealslimhsiehdy
🥳 Successfully deployed to developer sandbox es. |
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.
LGTM after your changes, but I'd suggest that Alysia briefly looks this over as well before merging. There are quite a few varying submitter "flows" so its possible that something was missed, though I tried to be as thorough as I could
… es/2162-delete-submitter-v2
🥳 Successfully deployed to developer sandbox es. |
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 focused specifically on the migrations, they LGTM. I ran them in reverse a couple times to ensure if we need to revert that things will work fine. Only note: I agree with @zandercymatics's comment here that we should consider utilizing the export feature to save the data.
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.
LGTM
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.
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.
Nice work! Approved
FYI for the JS section bc it's variable naming I decided against updating that for now. Great catch on the second screenshot -- I've updated it in this commit |
🥳 Successfully deployed to developer sandbox es. |
1 similar comment
🥳 Successfully deployed to developer sandbox es. |
🥳 Successfully deployed to developer sandbox es. |
🥳 Successfully deployed to developer sandbox es. |
Ticket
Resolves #2162
Changes
submitter
from registrar modelsYour contact information
page from domain and domain request view since Your contact information uses submitter data which is now deprecated in favor of storing contact info through user profile (saved as Creator in Domain and DomainRequest)submitter
from models diagramsubmitter
and refactor email tests to test new behavior of sending emails to creators per Change email sending to use Creator email not submitter on domain requests #2157Context for reviewers
Now that the Creator field takes data from user profiles to associate domains and domain requests with a point of contact, we no longer need the submitter field and are removing it from the system.
Tagged @dotgov-designers since this involves removing a page that uses submitter data which we're removing.
Setup
Code Review Verification Steps
1. Test submitter no longer exists on /admin
2. Test Your contact page no longer exists on registrar
Verify that Your contact information no longer exists as a page on the following:
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
Ensured code standards are met (Code reviewer)
Validated user-facing changes as a developer
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)
Tested with multiple browsers, the suggestion is to use ones that the developer didn't (check off which ones were used)
(Rarely needed) Tested as both an analyst and applicant user
Note: Multiple code reviewers can share the checklists above, a second reviewers should not make a duplicate checklist
As a designer reviewer, I have
Verified that the changes match the design intention
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)
(Rarely needed) Tested as both an analyst and applicant user
Screenshots