Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amazingphilippe committed Dec 20, 2024
1 parent a9f3428 commit 32b995e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion app/translations/csv/fr.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2060,4 +2060,5 @@
"Notification Id","ID de la notification"
"Crown organisation","Organisation de la Couronne"
"Users will be prompted to sign the agreement before they can go live","Les utilisateurs seront invités à signer l'accord avant de pouvoir activer le service"
"Trial mode services","Services en mode d'essai"
"Trial mode services","Services en mode d'essai"
"Invite team member","Inviter un membre de l'équipe"
10 changes: 5 additions & 5 deletions tests/app/main/views/test_platform_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,8 @@ def test_shows_archived_label_instead_of_live_or_research_mode_label(
page = BeautifulSoup(response.data.decode("utf-8"), "html.parser")

table_body = page.find_all("table")[0].find_all("tbody")[0]
service_mode = table_body.find_all("tbody")[0].find_all("tr")[1].td.text.strip()
# get second column, which contains flags as text.
# get first column as table header, which contains flags as span.
service_mode = table_body.find_all("tbody")[0].find_all("tr")[0].th.span.text.strip()
assert service_mode == "archived"


Expand Down Expand Up @@ -602,9 +602,9 @@ def test_should_order_services_by_usage_with_inactive_last(
table_body = page.find_all("table")[0].find_all("tbody")[0]
services = [service.tr for service in table_body.find_all("tbody")]
assert len(services) == 3
assert services[0].td.text.strip() == "My Service 2"
assert services[1].td.text.strip() == "My Service 1"
assert services[2].td.text.strip() == "My Service 3"
assert services[0].th.a.text.strip() == "My Service 2"
assert services[1].th.a.text.strip() == "My Service 1"
assert services[2].th.a.text.strip() == "My Service 3"


def test_sum_service_usage_is_sum_of_all_activity(fake_uuid):
Expand Down

0 comments on commit 32b995e

Please sign in to comment.