Refactored reports to use pregenerated docs instead (#2831)

* Refactored reports to use pregenerated docs instead

* Fixed e2e test

* Fixed anothr bug

* Cleanup

* Fixed timezone conversion

* Updated ref files

* Updated reference files, refreshed ui/ux for report generation. Buttons toggle on and off based on if report exists

* Fixed linting errors, removed pytz

* Fixed test failure

* e2e test fix

* Speeding up unit tests

* Removed python time library that was causing performance issues with unit tests

* Updated poetry lock

* Unit test improvements

* Made change that ken reccomended
This commit is contained in:
Alex Janousek
2025-08-15 15:02:54 -04:00
committed by GitHub
parent 748c35d2df
commit 8d33f28b76
50 changed files with 632 additions and 204 deletions

View File

@@ -90,14 +90,14 @@ def get_notifications_csv_mock(
None,
[
"Phone Number,Template,Sent by,Batch File,Carrier Response,Status,Time,Carrier\n",
"8005555555,foo,,,Did not like it,Delivered,1943-04-19 08:00:00 AM US/Eastern,AT&T Mobility\r\n",
"8005555555,foo,,,Did not like it,Delivered,1943-04-19 08:00:00,AT&T Mobility\r\n",
],
),
(
"Anne Example",
[
"Phone Number,Template,Sent by,Batch File,Carrier Response,Status,Time,Carrier\n",
"8005555555,foo,Anne Example,,Did not like it,Delivered,1943-04-19 08:00:00 AM US/Eastern,AT&T Mobility\r\n", # noqa
"8005555555,foo,Anne Example,,Did not like it,Delivered,1943-04-19 08:00:00,AT&T Mobility\r\n", # noqa
],
),
],
@@ -145,7 +145,7 @@ def test_generate_notifications_csv_without_job(
"bar.csv",
"Did not like it",
"Delivered",
"1943-04-19 08:00:00 AM US/Eastern",
"1943-04-19 08:00:00",
"AT&T Mobility",
],
),
@@ -174,7 +174,7 @@ def test_generate_notifications_csv_without_job(
"bar.csv",
"Did not like it",
"Delivered",
"1943-04-19 08:00:00 AM US/Eastern",
"1943-04-19 08:00:00",
"AT&T Mobility",
"🐜",
"🐝",
@@ -206,7 +206,7 @@ def test_generate_notifications_csv_without_job(
"bar.csv",
"Did not like it",
"Delivered",
"1943-04-19 08:00:00 AM US/Eastern",
"1943-04-19 08:00:00",
"AT&T Mobility",
"🐜,🐜",
"🐝,🐝",
@@ -385,4 +385,4 @@ def test_get_errors_for_csv(
def test_convert_report_date_to_preferred_timezone():
original = "2023-11-16 05:00:00"
altered = convert_report_date_to_preferred_timezone(original)
assert altered == "2023-11-16 12:00:00 AM US/Eastern"
assert altered == "2023-11-16 00:00:00"