22from playwright .sync_api import Page
33from pages .base_page import BasePage
44from pages .call_and_recall .call_and_recall_page import CallAndRecallPage
5- from pages .call_and_recall .invitations_monitoring_page import InvitationsMonitoringPage
6- from pages .call_and_recall .generate_invitations_page import GenerateInvitationsPage
75from pages .call_and_recall .non_invitations_days_page import NonInvitationDaysPage
8- from pages .call_and_recall .invitations_plans_page import InvitationsPlansPage
9- from pages .call_and_recall .create_a_plan_page import CreateAPlanPage
106from utils .user_tools import UserTools
117
128
@@ -46,9 +42,9 @@ def test_add_then_delete_non_invitation_day(page: Page) -> None:
4642 # Then todays date is visible in the non-invitation days table
4743 NonInvitationDaysPage (page ).verify_date_is_visible ()
4844 # When I click the delete button for the non-invitation day
49- NonInvitationDaysPage (page ).click_delete_button ()
50- # And I press OK on my confirmation prompt TODO: This is a modal/popup that needs to be handled
51- NonInvitationDaysPage (page ).confirm_delete_action ( )
45+ # NonInvitationDaysPage(page).click_delete_button() TODO: this step should be executed as part of the next step (delete this step once confirmed working )
46+ # And I press OK on my confirmation prompt
47+ BasePage (page ).safe_accept_dialog ( page . get_by_role ( "button" , name = "Delete" ) )
5248 # Then todays date is not visible in the non-invitation days table
5349 NonInvitationDaysPage (page ).verify_date_is_not_visible ()
5450
@@ -65,7 +61,5 @@ def test_non_invitation_day_note_is_mandatory(page: Page) -> None:
6561 NonInvitationDaysPage (page ).enter_date ("14/11/2030" )
6662 # And I click the "Add Non-Invitation Day" button
6763 NonInvitationDaysPage (page ).click_add_non_invitation_day_button ()
68- # Then I get an alert message that "contains" "The Note field is mandatory" TODO: This is a modal/popup that needs to be handled
69- NonInvitationDaysPage (page ).verify_alert_message_contains (
70- "The Note field is mandatory"
71- )
64+ # Then I get an alert message that "contains" "The Note field is mandatory"
65+ BasePage (page ).assert_dialog_text ("The Note field is mandatory" )
0 commit comments