Add routine management features for child and parent views
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m8s
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m8s
- Implemented routine child-mode flow tests to ensure proper functionality of routine assignment and task completion. - Created notification tests for parent view to verify routine completion notifications for children. - Developed ChildRoutineOverlay component for displaying routine tasks and handling user interactions. - Added RoutineApproveDialog component for approving or rejecting completed routines. - Created unit tests for ChildRoutineOverlay and RoutineEditView components to ensure correct behavior and rendering. - Enhanced RoutineEditView with proper handling of task addition and form submission. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -3,6 +3,7 @@ from tests.conftest import TEST_SECRET_KEY, TEST_REFRESH_TOKEN_EXPIRY_DAYS
|
||||
import os
|
||||
from werkzeug.security import generate_password_hash
|
||||
from datetime import date as date_type
|
||||
import api.child_api as child_api_module
|
||||
|
||||
from flask import Flask
|
||||
from api.child_api import child_api
|
||||
@@ -71,6 +72,24 @@ def setup_child_and_chore(child_name='TestChild', age=8, chore_points=10):
|
||||
return child['id'], 'chore1'
|
||||
|
||||
|
||||
def test_local_day_iso_check_handles_utc_rollover():
|
||||
# 22:30 UTC on 2026-05-11 is 12:30 local on 2026-05-12 in Pacific/Kiritimati (UTC+14).
|
||||
assert child_api_module._is_iso_timestamp_on_local_day(
|
||||
'2026-05-11T22:30:00+00:00',
|
||||
'2026-05-12',
|
||||
'Pacific/Kiritimati',
|
||||
)
|
||||
|
||||
|
||||
def test_local_day_epoch_check_handles_utc_rollover():
|
||||
# Same instant as above represented as epoch seconds.
|
||||
assert child_api_module._is_epoch_timestamp_on_local_day(
|
||||
1778538600,
|
||||
'2026-05-12',
|
||||
'Pacific/Kiritimati',
|
||||
)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Child Confirm Flow
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user