Skip to content

Commit

Permalink
Merge branch 'dev' into LTD-5714-other-ogd-sessionwizard
Browse files Browse the repository at this point in the history
  • Loading branch information
Tllew authored Jan 14, 2025
2 parents e00265e + c1888a6 commit 508d3b7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h1 class="govuk-heading-l">
{% for location in application.goods_locations.data %}
{% if application.goods_locations.type == 'sites' %}
<tr class="govuk-table__row">
<td class="govuk-table__header" scope="row">{{ location.name }}</td>
<td class="govuk-table__cell">{{ location.name }}</td>
<td class="govuk-table__cell">
{{ location|get_address }}
</td>
Expand Down
2 changes: 1 addition & 1 deletion exporter/templates/organisation/members/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tbody class="govuk-table__body">
{% for user in data.results %}
<tr class="govuk-table__row">
<td class="govuk-table__header" scope="row">
<td class="govuk-table__cell">
{% if not user.pending %}
{{ user.first_name }} {{ user.last_name }}
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion exporter/templates/organisation/roles/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<tbody class="govuk-table__body">
{% for role in roles.results %}
<tr class="govuk-table__row" id="role-{{ role.name }}">
<td class="govuk-table__header" scope="row">
<td class="govuk-table__cell">
{{ role.name }}
</td>
<td class="govuk-table__cell">
Expand Down
2 changes: 1 addition & 1 deletion exporter/templates/organisation/sites/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<tbody class="govuk-table__body">
{% for site in sites %}
<tr class="govuk-table__row">
<td class="govuk-table__header" scope="row">
<td class="govuk-table__cell">
{{ site.name }}
{% if site.id == organisation.primary_site.id %}
<span class="govuk-hint">(Registered office address)</span>
Expand Down
17 changes: 11 additions & 6 deletions unit_tests/exporter/organisation/members/test_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ def test_pending_users_in_organisation():
context["data"] = {
"results": [
{
"id": "11c74ddd-c119-48cc-8696-e096218ca583",
"email": "[email protected]",
"id": "11c74ddd-c119-48cc-8696-e096218ca583", # /PS-IGNORE
"email": "[email protected]", # /PS-IGNORE
"first_name": "",
"last_name": "",
"status": "Active",
Expand All @@ -18,8 +18,8 @@ def test_pending_users_in_organisation():
"phone_number": "",
},
{
"id": "2a43805b-c082-47e7-9188-c8b3e1a83cb0",
"email": "[email protected]",
"id": "2a43805b-c082-47e7-9188-c8b3e1a83cb0", # /PS-IGNORE
"email": "[email protected]", # /PS-IGNORE
"first_name": "John",
"last_name": "Smith",
"status": "Active",
Expand All @@ -33,8 +33,13 @@ def test_pending_users_in_organisation():
soup = BeautifulSoup(html, "html.parser")
rows = soup.find("tbody", {"class": "govuk-table__body"}).find_all("tr", recursive=False)
assert rows[0].find(class_="govuk-tag govuk-tag--blue").text.strip() == "Pending"
assert rows[1].find(class_="govuk-table__header").text.strip() == "John Smith"

values_for_assert = ["[email protected]", "Administrator", "Active", "View John Smith's profile"]
values_for_assert = [
"John Smith",
"[email protected]", # /PS-IGNORE
"Administrator",
"Active",
"View John Smith's profile",
]
for index, value in enumerate(rows[1].find_all(class_="govuk-table__cell")):
assert values_for_assert[index] == value.text.strip()

0 comments on commit 508d3b7

Please sign in to comment.