|
1 | | -from datetime import datetime |
2 | | -from utils import date_time_utils |
3 | 1 | from utils.click_helper import click |
4 | 2 | from playwright.sync_api import Page |
5 | 3 |
|
6 | 4 |
|
7 | | -class ReportsPageUtils: |
8 | | - def __init__(self): |
9 | | - pass |
10 | | - |
11 | | - |
12 | | -# Timestamp Date Formatting |
13 | | -def report_timestamp_date_format() -> str: |
14 | | - """Gets the current date time and converts it to the timestamp format used on the report pages |
15 | | -
|
16 | | - Returns: |
17 | | - date report last requested (str): The current datetime in the "date report last requested" timestamp format. |
18 | | -
|
19 | | - """ |
20 | | - dtu = date_time_utils.DateTimeUtils |
21 | | - return dtu.format_date(datetime.now(), "%d/%m/%Y" + " at " + "%H:%M:%S") |
22 | | - |
23 | | - |
24 | | -def fobt_kits_logged_but_not_read_report_timestamp_date_format() -> str: |
25 | | - """Gets the current date time and converts it to the timestamp format used on the fobt_kits_logged_but_not_read report page |
26 | | -
|
27 | | - Returns: |
28 | | - fobt_kits_logged_but_not_read timestamp (str): The current datetime in the "fobt_kits_logged_but_not_read report" timestamp format. |
29 | | -
|
30 | | - """ |
31 | | - dtu = date_time_utils.DateTimeUtils |
32 | | - return dtu.format_date(datetime.now(), "%d %b %Y %H:%M:%S") |
33 | | - |
34 | | - |
35 | | -def screening_practitioner_appointments_report_timestamp_date_format() -> str: |
36 | | - """Gets the current date time and converts it to the timestamp format used on the screening practitioner appointments report page |
37 | | -
|
38 | | - Returns: |
39 | | - screening practitioner appointments timestamp (str): The current datetime in the "screening practitioner appointments report" timestamp format. |
40 | | -
|
41 | | - """ |
42 | | - dtu = date_time_utils.DateTimeUtils |
43 | | - return dtu.format_date(datetime.now(), "%d.%m.%Y" + " at " + "%H:%M:%S") |
44 | | - |
45 | | - |
46 | 5 | # Reports page main menu links |
47 | 6 | def go_to_failsafe_reports_page(page: Page) -> None: |
48 | 7 | click(page, page.get_by_role("link", name="Failsafe Reports")) |
|
0 commit comments