Merge branch 'main' into za/901-epp-delete-domain

This commit is contained in:
zandercymatics 2023-09-28 14:00:09 -06:00
commit 26b49b3e5a
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
21 changed files with 98 additions and 13 deletions

View file

@ -11,6 +11,7 @@ applications:
command: ./run.sh
health-check-type: http
health-check-http-endpoint: /health
health-check-invocation-timeout: 40
env:
# Send stdout and stderr straight to the terminal without buffering
PYTHONUNBUFFERED: yup

View file

@ -11,6 +11,7 @@ applications:
command: ./run.sh
health-check-type: http
health-check-http-endpoint: /health
health-check-invocation-timeout: 40
env:
# Send stdout and stderr straight to the terminal without buffering
PYTHONUNBUFFERED: yup

View file

@ -11,6 +11,7 @@ applications:
command: ./run.sh
health-check-type: http
health-check-http-endpoint: /health
health-check-invocation-timeout: 40
env:
# Send stdout and stderr straight to the terminal without buffering
PYTHONUNBUFFERED: yup

View file

@ -11,6 +11,7 @@ applications:
command: ./run.sh
health-check-type: http
health-check-http-endpoint: /health
health-check-invocation-timeout: 40
env:
# Send stdout and stderr straight to the terminal without buffering
PYTHONUNBUFFERED: yup

View file

@ -11,6 +11,7 @@ applications:
command: ./run.sh
health-check-type: http
health-check-http-endpoint: /health
health-check-invocation-timeout: 40
env:
# Send stdout and stderr straight to the terminal without buffering
PYTHONUNBUFFERED: yup

View file

@ -11,6 +11,7 @@ applications:
command: ./run.sh
health-check-type: http
health-check-http-endpoint: /health
health-check-invocation-timeout: 40
env:
# Send stdout and stderr straight to the terminal without buffering
PYTHONUNBUFFERED: yup

View file

@ -11,6 +11,7 @@ applications:
command: ./run.sh
health-check-type: http
health-check-http-endpoint: /health
health-check-invocation-timeout: 40
env:
# Send stdout and stderr straight to the terminal without buffering
PYTHONUNBUFFERED: yup

View file

@ -11,6 +11,7 @@ applications:
command: ./run.sh
health-check-type: http
health-check-http-endpoint: /health
health-check-invocation-timeout: 40
env:
# Send stdout and stderr straight to the terminal without buffering
PYTHONUNBUFFERED: yup

View file

@ -11,6 +11,7 @@ applications:
command: ./run.sh
health-check-type: http
health-check-http-endpoint: /health
health-check-invocation-timeout: 40
env:
# Send stdout and stderr straight to the terminal without buffering
PYTHONUNBUFFERED: yup

View file

@ -11,6 +11,7 @@ applications:
command: ./run.sh
health-check-type: http
health-check-http-endpoint: /health
health-check-invocation-timeout: 40
env:
# Send stdout and stderr straight to the terminal without buffering
PYTHONUNBUFFERED: yup

View file

@ -11,6 +11,7 @@ applications:
command: ./run.sh
health-check-type: http
health-check-http-endpoint: /health
health-check-invocation-timeout: 40
env:
# Send stdout and stderr straight to the terminal without buffering
PYTHONUNBUFFERED: yup

View file

@ -11,6 +11,7 @@ applications:
command: ./run.sh
health-check-type: http
health-check-http-endpoint: /health
health-check-invocation-timeout: 40
env:
# Send stdout and stderr straight to the terminal without buffering
PYTHONUNBUFFERED: yup

View file

@ -11,6 +11,7 @@ applications:
command: ./run.sh
health-check-type: http
health-check-http-endpoint: /health
health-check-invocation-timeout: 40
env:
# Send stdout and stderr straight to the terminal without buffering
PYTHONUNBUFFERED: yup

View file

@ -11,6 +11,7 @@ applications:
command: ./run.sh
health-check-type: http
health-check-http-endpoint: /health
health-check-invocation-timeout: 40
env:
# Send stdout and stderr straight to the terminal without buffering
PYTHONUNBUFFERED: yup

View file

@ -399,6 +399,11 @@ a.usa-button--unstyled:visited {
border-color: color('accent-cool-lighter');
}
.dotgov-status-box--action-need {
background-color: color('warning-lighter');
border-color: color('warning');
}
#wrapper {
padding-top: units(3);
padding-bottom: units(6) * 2 ; //Workaround because USWDS units jump from 10 to 15

View file

@ -0,0 +1,24 @@
# Generated by Django 4.2.1 on 2023-09-27 00:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("registrar", "0031_transitiondomain_and_more"),
]
operations = [
migrations.AlterField(
model_name="transitiondomain",
name="status",
field=models.CharField(
blank=True,
choices=[("ready", "Ready"), ("hold", "Hold")],
default="ready",
help_text="domain status during the transfer",
max_length=255,
verbose_name="Status",
),
),
]

View file

@ -3,15 +3,16 @@ from django.db import models
from .utility.time_stamped_model import TimeStampedModel
class StatusChoices(models.TextChoices):
READY = "ready", "Ready"
HOLD = "hold", "Hold"
class TransitionDomain(TimeStampedModel):
"""Transition Domain model stores information about the
state of a domain upon transition between registry
providers"""
class StatusChoices(models.TextChoices):
CREATED = "created", "Created"
HOLD = "hold", "Hold"
username = models.TextField(
null=False,
blank=False,
@ -27,6 +28,7 @@ class TransitionDomain(TimeStampedModel):
max_length=255,
null=False,
blank=True,
default=StatusChoices.READY,
choices=StatusChoices.choices,
verbose_name="Status",
help_text="domain status during the transfer",
@ -39,4 +41,9 @@ class TransitionDomain(TimeStampedModel):
)
def __str__(self):
return self.username
return (
f"username: {self.username} "
f"domainName: {self.domain_name} "
f"status: {self.status} "
f"email sent: {self.email_sent} "
)

View file

@ -5,6 +5,28 @@
{{ block.super }}
<div class="margin-top-4 tablet:grid-col-10">
<div
class="usa-summary-box dotgov-status-box margin-top-3 padding-left-2{% if domain.state == domain.State.UNKNOWN or domain.state == domain.State.DNS_NEEDED%} dotgov-status-box--action-need{% endif %}"
role="region"
aria-labelledby="summary-box-key-information"
>
<div class="usa-summary-box__body">
<p class="usa-summary-box__heading font-sans-md margin-bottom-0"
id="summary-box-key-information"
>
<span class="text-bold text-primary-darker">
Status:
</span>
{% if domain.state == domain.State.UNKNOWN or domain.state == domain.State.DNS_NEEDED%}
DNS Needed
{% else %}
{{ domain.state|title }}
{% endif %}
</p>
</div>
</div>
<br>
{% url 'domain-nameservers' pk=domain.id as url %}
{% if domain.nameservers|length > 0 %}
{% include "includes/summary_item.html" with title='DNS name servers' value=domain.nameservers list='true' edit_link=url %}

View file

@ -33,17 +33,18 @@
</thead>
<tbody>
{% for domain in domains %}
{% comment %} ticket 796
{% if domain.application_status == "approved" or (domain.application does not exist) %} {% endcomment %}
<tr>
<th th scope="row" role="rowheader" data-label="Domain name">
{{ domain.name }}
</th>
<td data-sort-value="{{ domain.created_time|date:"U" }}" data-label="Date created">{{ domain.created_time|date }}</td>
{% comment %} Should this be domain.status?
<td data-label="Status">{{ domain.status|title }}</td>
{% endcomment %}
<td data-label="Status">{{ domain.application_status|title }}</td>
<td data-label="Status">
{% if domain.state == "unknown" or domain.state == "dns needed"%}
DNS Needed
{% else %}
{{ domain.state|title }}
{% endif %}
</td>
<td>
<a href="{% url "domain" pk=domain.pk %}">
<svg
@ -53,9 +54,15 @@
role="img"
width="24"
>
{% if domain.state == "deleted" or domain.state == "on hold" %}
<use xlink:href="{%static 'img/sprite.svg'%}#visibility"></use>
</svg>
View <span class="usa-sr-only">{{ domain.name }}</span>
{% else %}
<use xlink:href="{%static 'img/sprite.svg'%}#settings"></use>
</svg>
Manage <span class="usa-sr-only">{{ domain.name }}</span>
{% endif %}
</a>
</td>
</tr>

View file

@ -25,6 +25,7 @@ from registrar.models import (
from registrar.views.application import ApplicationWizard, Step
from .common import less_console_noise
from .common import MockEppLib
class TestViews(TestCase):
@ -47,8 +48,9 @@ class TestViews(TestCase):
self.assertIn("/login?next=/register/", response.headers["Location"])
class TestWithUser(TestCase):
class TestWithUser(MockEppLib):
def setUp(self):
super().setUp()
username = "test_user"
first_name = "First"
last_name = "Last"
@ -59,6 +61,7 @@ class TestWithUser(TestCase):
def tearDown(self):
# delete any applications too
super().tearDown()
DomainApplication.objects.all().delete()
self.user.delete()
@ -91,6 +94,7 @@ class LoggedInTests(TestWithUser):
response = self.client.get("/")
# count = 2 because it is also in screenreader content
self.assertContains(response, "igorville.gov", count=2)
self.assertContains(response, "DNS Needed")
# clean up
role.delete()
@ -1141,6 +1145,7 @@ class TestDomainDetail(TestWithDomainPermissions, WebTest):
# click the "Edit" link
detail_page = home_page.click("Manage")
self.assertContains(detail_page, "igorville.gov")
self.assertContains(detail_page, "Status")
def test_domain_user_management(self):
response = self.client.get(
@ -1307,6 +1312,7 @@ class TestDomainDetail(TestWithDomainPermissions, WebTest):
)
self.assertContains(page, "Domain name servers")
@skip("Broken by adding registry connection fix in ticket 848")
def test_domain_nameservers_form(self):
"""Can change domain's nameservers.

View file

@ -19,7 +19,7 @@ def index(request):
pk=F("domain__id"),
name=F("domain__name"),
created_time=F("domain__created_at"),
application_status=F("domain__domain_application__status"),
state=F("domain__state"),
)
context["domains"] = domains
return render(request, "home.html", context)