mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-14 16:47:02 +02:00
Add additional copy buttons
This commit is contained in:
parent
54072a479e
commit
be07a06a15
4 changed files with 26 additions and 38 deletions
|
@ -2022,10 +2022,14 @@ class TestDomainInformationAdmin(TestCase):
|
|||
# Check for the right title, email, and phone number in the response.
|
||||
# We only need to check for the end tag
|
||||
# (Otherwise this test will fail if we change classes, etc)
|
||||
expected_email = "meoward.jones@igorville.gov"
|
||||
expected_creator_fields = [
|
||||
# Field, expected value
|
||||
("title", "Treat inspector</td>"),
|
||||
("email", "meoward.jones@igorville.gov</td>"),
|
||||
("email", f"{expected_email}</td>"),
|
||||
# Check for the existence of the copy button input.
|
||||
# Lets keep things simple to minimize future conflicts.
|
||||
("email_copy_button_input", f'<input class="dja-clipboard-input" type="hidden" value="{expected_email}"'),
|
||||
("phone", "(555) 123 12345</td>"),
|
||||
]
|
||||
self.test_helper.assert_response_contains_distinct_values(response, expected_creator_fields)
|
||||
|
@ -2034,20 +2038,24 @@ class TestDomainInformationAdmin(TestCase):
|
|||
self.assertContains(response, "Meoward Jones")
|
||||
|
||||
# == Check for the submitter == #
|
||||
expected_email = "mayor@igorville.gov"
|
||||
expected_submitter_fields = [
|
||||
# Field, expected value
|
||||
("title", "Admin Tester</td>"),
|
||||
("email", "mayor@igorville.gov</td>"),
|
||||
("email", f"{expected_email}</td>"),
|
||||
("email_copy_button_input", f'<input class="dja-clipboard-input" type="hidden" value="{expected_email}"'),
|
||||
("phone", "(555) 555 5556</td>"),
|
||||
]
|
||||
self.test_helper.assert_response_contains_distinct_values(response, expected_submitter_fields)
|
||||
self.assertContains(response, "Testy2 Tester2")
|
||||
|
||||
# == Check for the authorizing_official == #
|
||||
expected_email = "testy@town.com"
|
||||
expected_ao_fields = [
|
||||
# Field, expected value
|
||||
("title", "Chief Tester</td>"),
|
||||
("email", "testy@town.com</td>"),
|
||||
("email_copy_button_input", f'<input class="dja-clipboard-input" type="hidden" value="{expected_email}"'),
|
||||
("phone", "(555) 555 5555</td>"),
|
||||
]
|
||||
self.test_helper.assert_response_contains_distinct_values(response, expected_ao_fields)
|
||||
|
@ -2069,10 +2077,12 @@ class TestDomainInformationAdmin(TestCase):
|
|||
self.assertContains(response, "Phone</th>", count=3)
|
||||
|
||||
# == Test the other_employees field == #
|
||||
expected_email = "testy@town.com"
|
||||
expected_other_employees_fields = [
|
||||
# Field, expected value
|
||||
("title", "Another Tester</td>"),
|
||||
("email", "testy2@town.com</td>"),
|
||||
("email", f"{expected_email}</td>"),
|
||||
("email_copy_button_input", f'<input class="dja-clipboard-input" type="hidden" value="{expected_email}"'),
|
||||
("phone", "(555) 555 5557</td>"),
|
||||
]
|
||||
self.test_helper.assert_response_contains_distinct_values(response, expected_other_employees_fields)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue