From bd3e8e15c80609c524e53dde1b9b8a0ec5911121 Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Tue, 2 Jul 2024 15:55:10 -0700 Subject: [PATCH] revised e2e --- .../test_send_message_from_existing_template.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/end_to_end/test_send_message_from_existing_template.py b/tests/end_to_end/test_send_message_from_existing_template.py index 27aa0a08e..ef083ea14 100644 --- a/tests/end_to_end/test_send_message_from_existing_template.py +++ b/tests/end_to_end/test_send_message_from_existing_template.py @@ -256,6 +256,15 @@ def handle_existing_template_case(page): # Check to make sure that we've arrived at the next page. page.wait_for_load_state("domcontentloaded") + if "/tour" not in page.url: + # Only execute this part if the current page is not the /tour page + preview_button = page.get_by_text("Preview") + expect(preview_button).to_be_visible() + preview_button.click() + + # Check to make sure that we've arrived at the next page. + page.wait_for_load_state("domcontentloaded") + send_button = page.get_by_role("button", name="Send") expect(send_button).to_be_visible() # send_button.click()