mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Merge branch 'main' of https://github.com/GSA/notifications-admin into notify-678
This commit is contained in:
@@ -54,7 +54,7 @@ def mock_get_service_settings_page_common(
|
||||
(
|
||||
create_active_user_with_permissions(),
|
||||
[
|
||||
"Label Value Action",
|
||||
"",
|
||||
"Service name Test Service Change service name",
|
||||
"Sign-in method Text message code Change sign-in method",
|
||||
"Send text messages On Change your settings for sending text messages",
|
||||
@@ -66,7 +66,7 @@ def mock_get_service_settings_page_common(
|
||||
(
|
||||
create_platform_admin_user(),
|
||||
[
|
||||
"Label Value Action",
|
||||
"",
|
||||
"Service name Test Service Change service name",
|
||||
"Sign-in method Text message code Change sign-in method",
|
||||
"Send text messages On Change your settings for sending text messages",
|
||||
|
||||
@@ -819,7 +819,7 @@ def test_usage_page(
|
||||
assert normalize_spaces(unselected_nav_links[0].text) == "2010 to 2011 fiscal year"
|
||||
assert normalize_spaces(unselected_nav_links[1].text) == "2009 to 2010 fiscal year"
|
||||
|
||||
annual_usage = page.find_all("div", {"class": "grid-col-6"})
|
||||
annual_usage = page.find_all("div", {"class": "keyline-block"})
|
||||
|
||||
# annual stats are shown in two rows, each with three column; email is col 1
|
||||
# email_column = normalize_spaces(annual_usage[0].text + annual_usage[2].text)
|
||||
@@ -827,13 +827,13 @@ def test_usage_page(
|
||||
# assert '1,000 sent' in email_column
|
||||
|
||||
sms_column = normalize_spaces(annual_usage[0].text)
|
||||
assert "Text messages" in sms_column
|
||||
assert "251,800 sent" in sms_column
|
||||
assert "250,000 free allowance" in sms_column
|
||||
assert "0 free allowance remaining" in sms_column
|
||||
assert (
|
||||
"You have sent 251,800 messages of your 250,000 free messages allowance. You have 0 messages remaining."
|
||||
in sms_column
|
||||
)
|
||||
assert "$29.85 spent" not in sms_column
|
||||
assert "1,500 at 1.65 pence" in sms_column
|
||||
assert "300 at 1.70 pence" in sms_column
|
||||
assert "1,500 at 1.65 pence" not in sms_column
|
||||
assert "300 at 1.70 pence" not in sms_column
|
||||
|
||||
|
||||
@freeze_time("2012-03-31 12:12:12")
|
||||
@@ -862,12 +862,12 @@ def test_usage_page_no_sms_spend(
|
||||
service_id=SERVICE_ONE_ID,
|
||||
)
|
||||
|
||||
annual_usage = page.find_all("div", {"class": "grid-col-6"})
|
||||
annual_usage = page.find_all("div", {"class": "keyline-block"})
|
||||
sms_column = normalize_spaces(annual_usage[0].text)
|
||||
assert "Text messages" in sms_column
|
||||
assert "1,000 sent" in sms_column
|
||||
assert "250,000 free allowance" in sms_column
|
||||
assert "249,000 free allowance remaining" in sms_column
|
||||
assert (
|
||||
"You have sent 1,000 messages of your 250,000 free messages allowance. You have 249,000 messages remaining."
|
||||
in sms_column
|
||||
)
|
||||
assert "$0.00 spent" not in sms_column
|
||||
assert "pence per message" not in sms_column
|
||||
|
||||
@@ -938,10 +938,13 @@ def test_usage_page_with_0_free_allowance(
|
||||
year=2020,
|
||||
)
|
||||
|
||||
annual_usage = page.select("main .grid-col-6")
|
||||
annual_usage = page.select("main .grid-col-12 .keyline-block")
|
||||
sms_column = normalize_spaces(annual_usage[0].text)
|
||||
|
||||
assert "0 free allowance" in sms_column
|
||||
assert (
|
||||
"You have sent 251,800 messages of your 0 free messages allowance. You have"
|
||||
in sms_column
|
||||
)
|
||||
assert "free allowance remaining" not in sms_column
|
||||
|
||||
|
||||
|
||||
@@ -310,7 +310,7 @@ def test_should_show_live_search_if_service_has_lots_of_folders(
|
||||
],
|
||||
[
|
||||
# 'Email',
|
||||
"Text message",
|
||||
"Start with a blank template",
|
||||
"Copy an existing template",
|
||||
],
|
||||
),
|
||||
@@ -323,7 +323,7 @@ def test_should_show_live_search_if_service_has_lots_of_folders(
|
||||
],
|
||||
[
|
||||
# 'Email',
|
||||
"Text message",
|
||||
"Start with a blank template",
|
||||
"Copy an existing template",
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user